On Mon, 2016-08-22 at 10:23 +0200, Jakub Hrozek wrote:
On Mon, Aug 22, 2016 at 08:16:36AM +0000, Ondrej Valousek wrote:
>
> Ok, so you Jakub say that /etc/hostname should rather contain FQDN right?
No, I'm saying that gethostname()/hostname should return a FQDN. You're
likely to run into all kinds of issues anyway if your system is configured
with shortnames.
Seems to be different "standards", each distribution seems to have selected some
variant.
I think claiming that "gethostname()/hostname should return a FQDN" is THE
standard will
not hold, but some dists has adopted this to make life easier in some areas.
I added this short patch to sssd which will at least try to do the right thing:
---
sssd-1.13.1/src/providers/ad/ad_common.c.org 2016-08-21 17:47:09.501079617 +0200
+++ sssd-1.13.1/src/providers/ad/ad_common.c 2016-08-21 17:52:13.059669848 +0200
@@ -397,6 +397,11 @@
goto done;
}
hostname[HOST_NAME_MAX] = '\0';
+ /* If hostname is non FQDN, add ad_domain */
+ if (strchr(hostname,'.') == NULL) {
+ strncat(hostname, ".", HOST_NAME_MAX - 1);
+ strncat(hostname, domain, HOST_NAME_MAX - 1);
+ }
DEBUG(SSSDBG_CONF_SETTINGS,
"Setting ad_hostname to [%s].\n", hostname);
ret = dp_opt_set_string(opts->basic, AD_HOSTNAME, hostname);
>
> >
> > I was not sure what RedHat says in terms of "best practices" here.
>
> This is upstream list, the fact that my address ends with .redhat.com is
> irrelevant.
>
> >
> >
> > But I agree the from the admin prospective, we ideally need to have the same
configuration in sssd.conf
> > being shared by all hosts.
> > Ondrej
> _______________________________________________
> sssd-users mailing list
> sssd-users(a)lists.fedorahosted.org
>
https://lists.fedorahosted.org/admin/lists/sssd-users@lists.fedorahosted.org