Skip site navigation (1)Skip section navigation (2)
Date:      Wed, 23 Oct 1996 10:21:23 -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:  <199610231421.KAA17733@skynet.ctr.columbia.edu>
In-Reply-To: <199610230659.HAA25334@gilberto.physik.rwth-aachen.de> from "Christoph Kukulies" at Oct 23, 96 07:59:22 am

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]

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

Then you did change the NIS master's hostname after all. That's what
I said originally. /var/yp/Makefile figures out the hostname to encode
in the map by calling hostname(1), so if you change your hostname you
need to rebuild all your maps. (Note that yp_mkdb(8) will also grab
the hostname with gethostname() if you don't supply a hostname on
the command line -- this should amount to the same thing.)

At some point, you decided to go from 'toots' to 'toots.physik.rwth-aachen.de'
(no, don't deny it: the proof is right there :). This makes the value returned
by gethostname() different than what it was when you first built the maps.
So just touch all your map source files (/var/yp/master.passwd, /etc/group,
etc...) and then cd /var/yp; make. rpc.yppasswdd should start correctly then.

Again, I suppose I should make the error message more specific. :)

-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?199610231421.KAA17733>