[Samba] Join AD fails DNS update
L.P.H. van Belle
belle at bazuin.nl
Wed Jun 25 01:35:11 MDT 2014
And Again, there are 2 ways how resolving is done... read the last part, i've put in a example...
And, yes i know that....
>The domain and search keywords are mutually exclusive. If
>more than one instance of these keywords is present, the last instance wins.
And yes, above is correct
but you really need to understand that putting the domain there also make this much easier to understand for none experienced users.
>> the domain name is determined from the hostname and the domain search path is constructed from the domain name.
and
>> The search list is normally determined from the local domain name; by default, it contains only the local domain name.
This may be changed by listing the desired domain search path following
and
>> The domain and search keywords are mutually exclusive. If more than one instance of these keywords is present, the last instance wins.
And to make sure you set the correct domain/search you can put it like this, it wont hurt, it isnt wrong and it helps people put in the correct domain/search.
it just adds the primary domain in the search 2 times.
This is not wrong.
domain search1.domain
search search1.domain
nameserver 1.1.1.1
this is the same and also not wrong..
search search1.domain
nameserver 1.1.1.1
and this is also the same, and not wrong.
domain search1.domain
nameserver 1.1.1.1
but which one helps a newbe the most with what he/she is do-ing.
....
even...
this is the same and not wrong. ( if you installed the right way )
nameserver 1.1.1.1
and dont forget this one.
man gethostname
>> The GNU C library does not employ the gethostname() system call; instead, it implements gethostname() as a library function that calls uname(2)
To draw another parallel, you seem to want the output of the command hostname --fqdn (which depends on the resolver), while others want hostname .
getfqdn seems to return a different result than gethostname if the hostname of the machine is an alias.
For example if I have this in /etc/hosts and with some python testing.
127.0.0.1 localhost localhost.localdomain localhost2 localhost2.localdomain2 mypersonaldomainname.tld
python -c 'import socket; print socket.getfqdn()'
gives localhost.localdomain
python -c 'import socket; print socket.gethostname()'
gives mypersonaldomainname.tld
and same with cfengine.
P.S. cfengine has sys.fqhost, sys.domain, sys.uqhost (which seem to be DNS based) and sys.host (which seems to be extracted from uname)
I hope its now more clear.
Best regards,
Louis
More information about the samba
mailing list