NIS problem (and proposal for solutions)

Edward Murrell edward at
Mon Oct 9 02:40:25 BST 2006

Option a) probably wouldn't be the best option, since setting the
default hostname to will cause Kerberos to explode, since
Kerberos demands (very debatable if this is good behavior or not, but
this is what it does) that doing a host lookup on the hostname in the
default domain returns the IP of the interface that it's running on;

eg; if the machine is called bobby, and is in a network called,
host bobby
should return something like; has address

The current solution auto installed by Dapper on DHCP hosts is that the
hosts file looks like this; localhost bobby

Static hosts appear to get the following: localhost bobby

I've got Application servers running on both without issues. I haven't
run a KDC (main Kerberos server) on DHCP for fairly obvious reasons,
though no doubt someone will try.

I have however, had to debug why Kerberos wasn't working under the
default pre-dapper setup where the hostname does appear somewhere in the line and I'm very unfavourable to thought of having to change
the /etc/hosts every time I install a system again.

Edward Murrell

P.S. I have re-read this a couple of times before hitting send, but
we're out of coffee here, so if it doesn't make any sense, then you know
why. Please accept my apologies if this is the case. :-)

Raffaele Biscosi wrote:
> I think there are two (and a half) ways to avoid this problem:
> a) netcfg creates an /etc/hosts entry like " nis-srv localhost" 
> instead of " localhost nis-srv"
> b) change function print_hostname in yphelper.c: If called with 
> parameter "--hostname" only, print the result of 'gethostname' and exit 
> instead of calling 'gethostbyname'
> ( c) Mention the problem in NIS-package README and let administrators do the 
> work )
> Thanks,
>   Raffaele Biscosi

More information about the ubuntu-devel mailing list