SUMMARY: yppasswdd fails to run make in /var/yp

From: Kevin Samborn (samborn@sunrise.com)
Date: Sat Jul 20 1991 - 15:46:33 CDT


Thanks for all the help. Unfortunately, the answers (of which there
were three or so types) were very contradictory, and I still don't
think I have the perfect solution. I ended up using both answer one
and answer two, but when looking at the processes, there is still a
child of rpc.yppasswdd hanging around forever ("** EXIT **").

The answers were of these three types (or combinations):

1) you must run rpc.yppasswdd with its full pathname, like this:

   if [ -f /usr/etc/rpc.yppasswdd -a -d /var/yp/$dname ]; then
      /usr/etc/rpc.yppasswdd /usr/local/yp/passwd -m passwd DIR=/usr/local/yp
      echo -n ' yppasswdd'
   fi

   The explanation of this seems to be that the entire command line is
   passed to make. By specifying the full pathname of the daemon,
   make decides that the target is up-to-date and proceeds. (I don't
   know what make does with the "-m" option though.)

   There was one interesting answer that I didn't try:
      from uunet!ruc.dk!jba (Jan B. Andersen)

      I've had a similar problem with SunOS 4.1_PSR_A, and solved it
      by hacking .../yp/Makefile. Problem is, rpc.passwd does a 'make
      <its-own-commandline>' instead of just 'make passwd'. Maybe this
      hasn't been fixed in 4.1.1 B? Try moving /bin/make to
      /bin/make.bin, and substitute /bin/make with a shell script that
      writes its arguments to a file for later inspection.
      
      Anyway, here's the code to add in the Makefile.
      
      rpc.yppasswdd:
          @echo "Dette er et gigantisk fix for rpc.yppasswdd"
          @echo "Hvorfor i h... h... h...... laver den en kommando der hedder"
          @echo "/bin/make rpc.yppasswdd /usr/etc/NIS-Master-files/passwd -m passwd"
          @echo "naar /bin/make passwd er rigeligt?"
          $(MAKE) $(MFLAGS) passwd
          exit 0

2) rpc.yppasswdd ignores (or mishandles) certain of its "-" options,
   so you need to specify an extra, like this:

   if [ -f /usr/etc/rpc.yppasswdd -a -d /var/yp/$dname ]; then
      rpc.yppasswdd /usr/local/yp/passwd -single -m passwd DIR=/usr/local/yp
      echo -n ' yppasswdd'
   fi

   There was no explanation for this, except that it is a bug.

3) there is a patch (#100201-03). (I didn't get it)

also-

some people said that in older versions of SunOS, the master password
file had to be on the same Disk Partition as /etc. However, I did not
verify this.

also-

a lot of people mentioned the -single & -nosingle arguments, but they
are undocumented, and I do not know what they mean.

Original Question:

        We are running NIS and rpc.yppasswdd. When a user changes
        their password, although the local master password file is
        updated, the make is not performed in /var/yp, causing the
        maps to not be updated.

        In fact, this is what I see from sps (immediately following a
        user changes their passwd):

           root 70 rpc.yppasswdd /usr/local/yp/passwd -m passwd
            | 22837 ** Exit **

        The local master passwd file is in /usr/local/yp/passwd

        This is how rpc.yppasswd is started from with /etc/rc.local
           
           dname=`domainname`
           if [ "$dname" -a -d /var/yp ]; then
              echo "NIS domainname is $dname" echo -n "starting NIS services:"
           
              if [ -f /usr/etc/ypserv -a -d /var/yp/$dname ]; then
                 ypserv; echo -n ' ypserv'
                 ypxfrd; echo -n ' ypxfrd'
              fi
              if [ -f /etc/security/passwd.adjunct ]; then
                 ypbind -s; echo -n ' ypbind'
              else
                 ypbind; echo -n ' ypbind'
              fi
              if [ -f /usr/etc/rpc.yppasswdd -a -d /var/yp/$dname ]; then
                 rpc.yppasswdd /usr/local/yp/passwd -m passwd DIR=/usr/local/yp
                 echo -n ' yppasswdd'
              fi
              echo '.'
           fi

        We are running:
           Sun SPARCstation 1
           SunOS 4.1.1 Rev. B _no_ C2 security (I heard there were
              problems with this)

        strings /usr/etc/rpc.yppasswdd | grep -i sun:
           @(#)rpc.yppasswdd.c 1.22 89/09/06 Copyr 1985 Sun Micro
           @(#)yppasswdxdr.c 1.8 88/02/08 Copyr 1985 Sun Micro

Thanks to:

Andrew Luebker <uunet!eye.psych.umn.edu!aahvdl>
Milt Ratcliff <milt@pe-nelson.com>
Doug Neuhauser <uunet!perry.berkeley.edu!doug>
Don Hooper <uunet!khonshu.Colorado.EDU!hoop>
Jim Mattson <uunet!cs.UCSD.EDU!mattson>
Volker Siebelink <uunet!nvs-01.uni-paderborn.de!volker>
Nathan Hoover <uunet!Teradyne.COM!nathan>
Claus Assmann <uunet!idefix.informatik.uni-kiel.dbp.de!ca>
Hannu Visti <uunet!sauna.cs.hut.fi!visti>
Jaap Romers <uunet!cs.utwente.nl!romers>
Mike Raffety <uunet!sbcoc.com!miker>
Brad Besmer <uunet!plotski.csc.ti.com!besmer>
Andy Feldt <uunet!phyast.nhn.uoknor.edu!feldt>
Jan B. Andersen <uunet!ruc.dk!jba>
Steve Harris <uunet!etnibsd!vsh>

--
kevin samborn                   "Anatidaephobia: The fear that somewhere,
samborn@sunrise.com                 somehow, a duck is watching you."
..!uunet!ezx!samborn



This archive was generated by hypermail 2.1.2 : Fri Sep 28 2001 - 23:06:20 CDT