Bug in rpc.yppasswdd ?
Jan B. Andersen
jba at gorm.ruc.dk
Thu Jun 13 05:40:00 AEST 1991
djc at 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 at 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 at dat.ruc.dk { o_o } | SIMULA does it |
/--|/ Postbox 260 DG-passer at ruc.dk \ o / --> | with CLASS |
`--' ' DK-4000 Roskilde Postmaster at ruc.dk --mm---mm-- `----------------'
More information about the Comp.sys.sun
mailing list