Skip site navigation (1)Skip section navigation (2)
Date:      Wed, 23 Oct 1996 07:59:22 +0100 (MET)
From:      Christoph Kukulies <kuku@gilberto.physik.rwth-aachen.de>
To:        wpaul@skynet.ctr.columbia.edu (Bill Paul)
Cc:        kuku@gilberto.physik.rwth-aachen.de, current@FreeBSD.ORG
Subject:   Re: rpc.yppasswdd problem
Message-ID:  <199610230659.HAA25334@gilberto.physik.rwth-aachen.de>
In-Reply-To: <199610222112.RAA15455@skynet.ctr.columbia.edu> from Bill Paul at "Oct 22, 96 05:12:15 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.

OK, this is what I get upon the following change:
        printf("yppasswdd- debug:%s<=>%s\n",mastername,myname); 
        if (strncmp(mastername, (char *)&myname, sizeof(myname))) {
                yp_error("this host is not an NIS master server -- aborting");
                exit(1);
        }



toots# 
rpc.yppasswdd
yppasswdd- debug:toots<=>toots.physik.rwth-aachen.de
rpc.yppasswdd: this host is not an NIS master server -- aborting
toots# 
toots# hostname
toots.physik.rwth-aachen.de


So myname is the fully qualified name while mastername is just the .
short name.

> 
> 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."
> =============================================================================
> 

--Chris Christoph P. U. Kukulies kuku@gil.physik.rwth-aachen.de



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