From owner-freebsd-current Tue Oct 22 23:53:55 1996 Return-Path: owner-current Received: (from root@localhost) by freefall.freebsd.org (8.7.5/8.7.3) id XAA27408 for current-outgoing; Tue, 22 Oct 1996 23:53:55 -0700 (PDT) Received: from Campino.Informatik.RWTH-Aachen.DE (campino.Informatik.RWTH-Aachen.DE [137.226.225.2]) by freefall.freebsd.org (8.7.5/8.7.3) with SMTP id XAA27380 for ; Tue, 22 Oct 1996 23:53:46 -0700 (PDT) Received: from gilberto.physik.rwth-aachen.de (gilberto.physik.rwth-aachen.de [137.226.31.2]) by Campino.Informatik.RWTH-Aachen.DE (RBI-Z-5/8.6.12) with ESMTP id HAA00145; Wed, 23 Oct 1996 07:54:22 +0100 Received: (from kuku@localhost) by gilberto.physik.rwth-aachen.de (8.6.11/8.6.9) id HAA25334; Wed, 23 Oct 1996 07:59:23 +0100 From: Christoph Kukulies Message-Id: <199610230659.HAA25334@gilberto.physik.rwth-aachen.de> Subject: Re: rpc.yppasswdd problem In-Reply-To: <199610222112.RAA15455@skynet.ctr.columbia.edu> from Bill Paul at "Oct 22, 96 05:12:15 pm" To: wpaul@skynet.ctr.columbia.edu (Bill Paul) Date: Wed, 23 Oct 1996 07:59:22 +0100 (MET) Cc: kuku@gilberto.physik.rwth-aachen.de, current@FreeBSD.ORG Reply-To: Christoph Kukulies X-Mailer: ELM [version 2.4ME+ PL25 (25)] MIME-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit Sender: owner-current@FreeBSD.ORG X-Loop: FreeBSD.org Precedence: bulk > 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