Network Information  «Prev  Next»
Lesson 8Changing NIS passwords
Objective Start the password daemon and enable network users to change their passwords.

Changing NIS passwords

You now have an NIS master server and NIS clients sharing password and group NIS maps. However, when you created the passwd map, you assigned every user a null password. This is a temporary measure, and you will now assign passwords to the users. Remember, however, that the passwords must be stored in the NIS map on the server if they are to be distributed across the network. Thus, you need a method for changing passwords on the server. This capability is provided by a pair of programs, a password daemon called rpc.yppasswd which runs on the NIS server and a password client program called yppasswd. Users who want to change their NIS passwords must use the command yppasswd instead of passwd:
$ yppasswd
Changing YP password for this_user on nis_master_server.
Please enter old password: [ hidden ]
Changing YP password for this_user.
Please enter new password: [ hidden ] 
Please retype new password: [ hidden ] 
The YP password has been changed on nis_master_server.

The superuser may use yppasswd to assign passwords to users, just as he or she can with the usual passwd command:
# yppasswd user

On many systems that use NIS passwords, the system administrator may move the original password program,
, to another name, such as /usr/bin/passwd.local, and then create a symbolic link from /usr/bin/passwd to /usr/sbin/yppasswd. The yppasswd daemon then runs automatically when users try to change their passwords.

Alternative passwd file

Using the –f option makes rpc.yppasswd use an alternative passwd file. For example:
rpc.yppasswd -f /var/yp/ypfiles/passwd

This command causes rpc.yppasswd to use the passwd file located in the /var/yp/ypfiles/ directory.

Changing NIS Passwords - Exercise

Click the Exercise link below to complete the NIS setup you began in the previous lesson.
Changing NIS Passwords - Exercise