[Samba] bug in samba?

L.P.H. van Belle belle at bazuin.nl
Wed Jun 25 01:52:35 MDT 2014


So, comming back on the never ending resolving issues. 
 
Now im not a coder, but when we look at this example..
 
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
 
 
so how does samba get the hostname?  
 
 
 

Louis
 

 


More information about the samba mailing list