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

L.P.H. van Belle belle at bazuin.nl
Thu Oct 9 02:04:06 MDT 2014

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, 

More information about the samba mailing list