[Ilugc] NIS Password problem on client end
- From: sriram@xxxxxxxxxxxxxxxxxx (P. Sriram)
- Date: Wed, 16 Oct 2002 15:36:34 +0530 (IST)
On Tue, 15 Oct 2002, Aman wrote:
I'm running NIS Server on Redhat6.2. I've created 7 users in NIS Server
m/c. and I've created directories for the users with their name as the
login id on the client end(nis clients) . Now I've changed the password
for a user in NIS Server m/c and the thing is I'm still able to login
with the old password of the user from the client end.
But the new password chang effected only onm the server part.
Why is this so?
short answer: cd to /var/yp and run make. this will propagate the change
to all clients. in future, you can use yppasswd on the server also to
long answer: well, nis password change is partially broken in redhat
distros upto and including 7.3 (haven't tried on 8.0 yet). using nis,
since the passwords are on the server and not on the client, the
'classical' way of doing password change was to use yppasswd command
(instead of the passwd command). this would communicate with server and
make the change in the proper manner - in the passwd file on the server
and also in the nis database. every time a user changes a password thusly,
the server has to rebuild the nis database so that the change is seen by
all clients. if the passwd command is used on the server (not the yppasswd
command), it will update the passwd file but not the nis database - so
clients will continue to use the old password that was in the database.
this would appear to be the problem in this case. this can be fixed by
cd'ing to /var/yp and running make (which will rebuild the databases). the
permanent fix for this is to not run passwd on the server but only
yppasswd so that the database is rebuilt automatically. however, this
would need the server also to be a nis client. also, admin users like root
cannot use this method since traditionally these passwords are not part of
the nis database. enter the well known kludge of making passwd a link to
yppasswd and saving the real 'passwd' command for use by admin users only.
with newer version of nis and redhat, things are done better (through pam)
and invoking passwd command on the nis clients correctly invokes the yp
call to the server. as of redhat 7.3, invoking passwd on the server does
make the change to the database and the file but an error message pops up
claiming that the change has not been made (maybe, there is something in
my config file that is wrong; i dont think so).
Other related posts: