SUMMARY: NIS not binding properly under Solaris 2.4. Any ideas?

From: Christopher L. Barnard (cbarnard@cs.uchicago.edu)
Date: Wed Mar 15 1995 - 07:07:15 CST


Thanks to:

"Libelo, Lee" <libelo@hq.sylvania.com>
"Frederic Piard" <frederic.piard@erli.gsi.fr>
"Srinivasa R. Yalavarthy" <srini@concorde.com>
pug@ns2.arlut.utexas.edu (Pug)
scott@data (Scott Miller) ( <-- should have been scott@iqsc.com, I think )
Kevin.Sheehan@uniq.com.au (Kevin Sheehan {Consulting Poster Child})
Juergen Peus <grobi@uni-paderborn.de>
af@biomath.jussieu.fr
andrew@dcs.bbk.ac.uk (Andrew Watkins)

My original question:

> I'm having problems getting a new SparcStation 5 running Solaris 2.4 to
> properly bind to my NIS domain. The entire rest of the department is
> running SunOS 4.1.3_U1 and 4.1.4, so I expect that half of my problem is
> that I'm from the BSD school of unix, not the SysV.
>
> My first problem was that this machine couldn't find any NIS servers. I
> finally solved that problem by listing them all in the /etc/hosts file
> on this machine, but in fact what this machine is now doing is simply
> binding to the first machine listed in the file, every time. This is not
> the functionality that I want. I'd like this machine to poll the net to
> locate the nearest NIS server like the rest of the world does.
>
> The second problem is that it won't mount filesystems from the other
> servers on bootup. I have two mounts in the /etc/vfstab file, one from
> machine "banjo" and one from machine "cs". Neither machine is in
> /etc/hosts, but both are in the hosts NIS map. ypbind is definitely
> firing up before it tries to mount these filessystems, but these lines
> appear on the console when it gets to mounting these filesystems:
>
> nfs mount: cs:: RPC: Unknown host
> nfs mount: banjo:: RPC: Unknown host
>
> I know that everything is exported (er, I mean, "shared" [@#(&@* solaris])
> properly, because if I log in as root as soon as the machine is up and
> just type "mount /var/mail" and "mount /usr/solaris-local" they mount just
> fine.
>
> I'm suspicious that this machine isn't actually binding to an NIS server
> until a request comes along that requires it to. The reason I suspect
> this is that the first time I try to cd into an automounted directory,
> or if I try to log in as a user on the console, there is a 30 second
> wait the first time. I'm assuming that its madly scrambling out to find
> an NIS server during this delay. Also, if I log in as root immediately
> after bringing it up, "ypwhich" will sometimes respond that the machine
> isn't bound.
>
> This machine is running 2.4 with the zillions of patches on the 2.4
> distribution CD, as well as the "Recommended 2.4 patches" from sunsolve.

The solution:

When I did the default configuration for this machine, it created the
directory /var/yp/binding/`domainname`/ypservers. Because this file existed,
ypbind was called without the -broadcast option. However, none of the
three nis servers listed in this file were on the same subnet as this machine.
By deleting this file, ypbind was called with the -broadcast option, and
it located its nis servers just fine. That solved all of the problems I
was having.

(For those who are wondering why the machines were listed in the ypservers
file yet they didn't exist: we have four subnets in the department, and all
three NIS servers have four ethernets. However, NIS will only allow one
name per IP number and vice versa. So for the purposes of NIS the machines
actually have four names each: hostname11, hostname13, hostname20, and
hostname164. I just had "hostname" in the ypservers file- its name in DNS.
"hostname" in NIS defaults to hostname20, and the machine I was setting up
was on subnet 11. Hence the NIS server it actually wanted was "hostname11".)

+-----------------------------------------------------------------------+
| Christopher L. Barnard O When I was a boy I was told that |
| cbarnard@cs.uchicago.edu / \ anybody could become president. |
| (312) 702-8850 O---O Now I'm beginning to believe it. |
| http://cs-www.uchicago.edu/~cbarnard --Clarence Darrow |
+----------PGP public key available via finger or PGP keyserver---------+



This archive was generated by hypermail 2.1.2 : Fri Sep 28 2001 - 23:10:18 CDT