[comp.sys.sun] Bug in YP password handling

peters@csserver.cs.msstate.edu (Frank W. Peters) (12/01/88)

Hmmm...we are having a strange problem with a 3/160 running SunOS 4.0.

YP documentation indicates that YP does NOT keep its own copy of the
/etc/passwd file.

Yet...we recently have had trouble with users attempting to change their
passwords.  They change it and all goes well...but when they attempt to
log in later...their password is still the OLD password.  So, naturally,
they log on and try to change their password again...  but the passwd
command ALREADY KNOWS THE NEW PASSWORD! If, however, I make the YP
database the new password takes affect.  

Anybody have any idea what's wrong?? And how I can fix it?

Please reply direct if you have any answers...I'd like to fix this
quick.

                Thanks
                Frank Peters

Internet:  peters@CC.MsState.EDU
BITNET:    PETERS@MSSTATE.BITNET

krempel@pacrat.npac.syr.edu (Henry B.J. Krempel) (12/14/88)

Frank W. Peters <peters@csserver.cs.msstate.edu>:
>Hmmm...we are having a strange problem with a 3/160 running SunOS 4.0.

>YP documentation indicates that YP does NOT keep its own copy of the
>/etc/passwd file.

>>Yet...we recently have had trouble with users attempting to change their
>passwords.  They change it and all goes well...but when they attempt to
>log in later...their password is still the OLD password... 

The documentation must be wrong,  we have a separate passwd file.  You
have to do two things to maintain a separate passwd file for the YP:

-	change the Makefile for the YP (in 4.0 it's in /var/yp) so that
the passwd entries check that file,  I think in 4.0 all you have to do is
change the PASSWD symbol:

PASSWD=/etc/passwd.yp


-	run yppasswdd with the appropriate arguments

/usr/etc/rpc.yppasswdd /etc/passwd.yp -m passwd DIR=/etc PASSWD=/etc/passwd.yp

Also,  make sure your users are running "yppasswd" to change their
password.  I did this by linking "passwd" to "yppasswd" in /usr/ucb.
Since this is before /bin on their paths,  it works,  and to use passwd,
I type: /bin/passwd ...

>From the behaviour you described,  it seems like you weren't running the
yppasswd daemon,  or you were using passwd to modify passwords. 

Also,  remember: it does take a little time to propagate.

Henry B. J. Krempel	<krempel@pacrat.npac.syr.edu>
Northeast Parallel Architectures Center (NPAC)
Syracuse University
250 Machinery Hall
Syracuse,  N.Y. 13244