Skip site navigation (1)Skip section navigation (2)
Date:      Tue, 22 Oct 1996 17:12:15 -0400 (EDT)
From:      Bill Paul <wpaul@skynet.ctr.columbia.edu>
To:        kuku@gilberto.physik.rwth-aachen.de
Cc:        current@freebsd.org
Subject:   Re: rpc.yppasswdd problem
Message-ID:  <199610222112.RAA15455@skynet.ctr.columbia.edu>
In-Reply-To: <199610221801.TAA22823@gilberto.physik.rwth-aachen.de> from "Christoph Kukulies" at Oct 22, 96 07:01:33 pm

next in thread | previous in thread | raw e-mail | index | archive | help
Of all the gin joints in all the towns in all the world, Christoph 
Kukulies had to walk into mine and say:

[chop]

> > > toots#  /usr/sbin/rpc.yppasswdd
> > > rpc.yppasswdd: this host is not an NIS master server -- aborting
> > > toots# 
> > > 
> > > toots# ps ax | grep yp
> > >    80  ??  Ss     0:00.41 ypserv
> > >   174  ??  Ss     0:00.02 ypbind -Stoots
> > > toots# 
> > > 
> > > What has changed ?
> > 
> > The hostname of your NIS master server?
> 
> No, toots is the master NIS server.
 
> toots> yppoll passwd.byname
> Map passwd.byname has order number 845988379. Tue Oct 22 14:46:19 1996
> The master server is toots.
> toots> 
> 
> I also rebuilt librpcsvc.so, installed the whole /usr/src/lib
> and all /usr/sbin.

Odd. Okay, try this: edit /usr/src/usr.sbin/rpc.yppasswdd/yppasswdd_main.c
and change the error message so that it prints out the hostnames that it's
comparing. Normally, the code looks like this:

        if (strncmp(mastername, (char *)&myname, sizeof(myname))) {
                yp_error("this host is not an NIS master server -- aborting");
                exit(1);
        }

Make it say this:

        if (strncmp(mastername, (char *)&myname, sizeof(myname))) {
                yp_error("this host is not an NIS master server \
(mastername:%s != myname:%s) -- aborting", mastername, myname);
                exit(1);
        }

This way you will be able to see why it fails. Alternatively, compile
rpc.yppasswdd with -g and examine mastername and myname with gdb.
Myname is determined by calling gethostname() to find the local host
name. Mastername is found by doing a yp_master() on the passwd.byname
map, so it should be the same as that returned by yppoll.

Let me know what hostnames this message prints out. Hopefully this
will show why rpc.yppasswdd thinks 'toots' isn't the NIS master for
your domain.

-Bill

-- 
=============================================================================
-Bill Paul            (212) 854-6020 | System Manager, Master of Unix-Fu
Work:         wpaul@ctr.columbia.edu | Center for Telecommunications Research
Home:  wpaul@skynet.ctr.columbia.edu | Columbia University, New York City
=============================================================================
 "If you're ever in trouble, go to the CTR. Ask for Bill. He will help you."
=============================================================================



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?199610222112.RAA15455>