Path: utzoo!utgpu!cunews!bnrgate!brchh104!brchs1!bnr.ca!rice.edu!sun-spots-request From: jba@gorm.ruc.dk (Jan B. Andersen) Newsgroups: comp.sys.sun Subject: Re: Bug in rpc.yppasswdd ? Keywords: Miscellaneous Message-ID: <3797@brchh104.bnr.ca> Date: 12 Jun 91 19:40:00 GMT Sender: news@brchh104.bnr.ca Organization: Sun-Spots Lines: 53 Approved: Sun-Spots@rice.edu X-Original-Date: Thu, 6 Jun 91 11:00:47 GMT X-Sun-Spots-Digest: Volume 10, Issue 106, message 8 X-Note: Submissions: sun-spots@rice.edu, Admin: sun-spots-request@rice.edu djc@kesa.com (Don Christensen) writes: >I am having a problem getting rpc.yppasswdd to automatically do a yp make >whenever an NIS passwd gets changed. I am using the exact line [...] > > /usr/etc/yp/rpc.yppasswd /etc/passwd -m passwd DIR=/var/yp/kesa > > [...] I replaced /bin/make with a shell script that echoed its > arguments to a file as follows: > > #! /bin/sh > echo Make arguments are $* > /var/tmp/make.args > >After doing a yppasswd on a client, the /var/tmp/make.args file contained >the following: > > Make arguments are /usr/etc/yp/rpc.yppasswd \ > /etc/passwd -m passwd DIR=/var/yp/kesa > > (line broken by me for readability) > >It seems to me that this is incorrect ;^) Am I doing something wrong? To which rossc@extro.ucc.su.oz.au (Ross Cartlidge) replies: >Take out the DIR=/var/yp/kesa and it'll work fine. No - It won't work!! The problem is that rpc.yppasswdd generates the wrong set of arguments to make instead of using the -m value. I had the same problem until 10 min. ago (and thus had to run a cron-job every 10 min to update the maps), but inspired by your test I came up with the following fix: In /var/yp/Makefile, insert a target that matches whatever rpc.yppasswd generates and let that target do a 'make passwd' instead. On my system (with "rpc.yppasswdd /usr/etc/NIS-Master-files/passwd -m passwd" in /etc/rc.local) it becomes: rpc.yppasswdd: @echo "This is a gigantic fix for rpc.yppasswdd" @echo "Why does it call make with the arguments" @echo "rpc.yppasswdd /usr/etc/NIS-Master-files/passwd -m passwd" @echo "when 'passwd' would do nicely?" @echo "Go and simulate it" $(MAKE) $(MFLAGS) passwd exit 0 /| / Jan B. Andersen /^^^\ .----------------. / | / RUC, Hus 19,1 jba@dat.ruc.dk { o_o } | SIMULA does it | /--|/ Postbox 260 DG-passer@ruc.dk \ o / --> | with CLASS | `--' ' DK-4000 Roskilde Postmaster@ruc.dk --mm---mm-- `----------------'