NIS problem (and proposal for solutions)

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


Option a) probably wouldn't be the best option, since setting the
default hostname to 127.0.0.1 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 foo.com,
running;
host bobby
should return something like;
bobby.foo.com has address 192.168.58.200

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

Static hosts appear to get the following:
127.0.0.1 localhost
192.168.57.200 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
127.0.0.1 line and I'm very unfavourable to thought of having to change
the /etc/hosts every time I install a system again.

Cheers
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 "127.0.0.1 nis-srv localhost" 
> instead of "127.0.0.1 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