From owner-freebsd-current Wed Oct 23 07:25:58 1996 Return-Path: owner-current Received: (from root@localhost) by freefall.freebsd.org (8.7.5/8.7.3) id HAA19019 for current-outgoing; Wed, 23 Oct 1996 07:25:58 -0700 (PDT) Received: from skynet.ctr.columbia.edu (skynet.ctr.columbia.edu [128.59.64.70]) by freefall.freebsd.org (8.7.5/8.7.3) with SMTP id HAA19013 for ; Wed, 23 Oct 1996 07:25:52 -0700 (PDT) Received: (from wpaul@localhost) by skynet.ctr.columbia.edu (8.6.12/8.6.9) id KAA17733; Wed, 23 Oct 1996 10:21:24 -0400 From: Bill Paul Message-Id: <199610231421.KAA17733@skynet.ctr.columbia.edu> Subject: Re: rpc.yppasswdd problem To: kuku@gilberto.physik.rwth-aachen.de Date: Wed, 23 Oct 1996 10:21:23 -0400 (EDT) Cc: current@freebsd.org In-Reply-To: <199610230659.HAA25334@gilberto.physik.rwth-aachen.de> from "Christoph Kukulies" at Oct 23, 96 07:59:22 am X-Mailer: ELM [version 2.4 PL24] Content-Type: text 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] > 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." =============================================================================