[Samba] setting the NIS domain ( or yp/dns domainname )

Rowland Penny rowlandpenny at googlemail.com
Thu Oct 9 03:04:09 MDT 2014

On 09/10/14 09:04, L.P.H. van Belle wrote:
> Hai,
> Im just wondering, im installing a bit again, checking my scripts etc.
> Lots of things most of us know, but just for history and others im typing it out.
> I noticed te following.
> Lots of things work or dont work base on :
>         hostname - show or set the system's host name
>         domainname - show or set the system's NIS/YP domain name
>         ypdomainname - show or set the system's NIS/YP domain name
>         nisdomainname - show or set the system's NIS/YP domain name
>         dnsdomainname - show the system's DNS domain name
> We know the following and we do set :
> /etc/hosts and we check
> hostname -s    = hostname
> hostname -d    = internal.domain.tld
> hostname -f     = hostname.internal.domain.tld
> and for /etc/resolv.conf
> search internal.domain.tld
> nameserver ip_DC.
> now i was testing also the following
> hostname -y   returns  Local domain name not set
> dnsdomanname returns  Local domain name not set
> i was thinking about the problem steve had, with the domainname on the client, but for a good NFS etc it would be nice if the nis/YP domain is also correct.
> ( i like correct setups )
> after setting sysctl kernel.domainname=internal.domain.tld
> all things resolve correct.
> So i was wondering, why dont we set the kernel.domainname on the server install of samba.
> Of is this just something i always forgot.
> What do you people think of setting kernel.domainname at install.
> im thinking of setting this also in my scripts, like : ( for debian/ubuntu )
> echo "kernel.domainname=`hostname -d`" > /etc/sysctl.d/00-domainname.conf
> Tell me your toughts.
> Best regards,
> Louis
Hi Louis, I 'think' that the correct cure would be to install the 'nis' 
package, I am basing this on all the commands working on my laptop 
(LM17) and this has 'nis' installed. All of the commands except 
'hostname -y' worked on my DC (Debian 7.5) and after I installed 'nis', 
they all now work.


More information about the samba mailing list