From owner-freebsd-current Tue Oct 22 14:13:31 1996 Return-Path: owner-current Received: (from root@localhost) by freefall.freebsd.org (8.7.5/8.7.3) id OAA03623 for current-outgoing; Tue, 22 Oct 1996 14:13:31 -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 OAA03588 for ; Tue, 22 Oct 1996 14:13:21 -0700 (PDT) Received: (from wpaul@localhost) by skynet.ctr.columbia.edu (8.6.12/8.6.9) id RAA15455; Tue, 22 Oct 1996 17:12:16 -0400 From: Bill Paul Message-Id: <199610222112.RAA15455@skynet.ctr.columbia.edu> Subject: Re: rpc.yppasswdd problem To: kuku@gilberto.physik.rwth-aachen.de Date: Tue, 22 Oct 1996 17:12:15 -0400 (EDT) Cc: current@freebsd.org In-Reply-To: <199610221801.TAA22823@gilberto.physik.rwth-aachen.de> from "Christoph Kukulies" at Oct 22, 96 07:01:33 pm 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] > > > 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." =============================================================================