NFS Services Administrator's Guide

Configuring and Administering NIS+
Administering NIS+
Chapter 5 253
To Change a Password
To change the password of a non-root user, issue the following
command from any NIS+ client host:
passwd -r nisplus username -D domainname
The username is not necessary if you are logged in as a non-root user
and are changing your own password. The -D domainname is
necessary only if you are changing the password of a user in another
domain.
The nispasswd command changes the password in the NIS+ passwd
and cred tables. It does not change the password in the /etc/passwd
file. To change the password in the /etc/passwd file, use the
passwd(1) command.
If your NIS+ servers are running in NIS compatibility mode, users
on NIS clients must use the yppasswd command to change their
passwords in the NIS+ passwd table.
To change a non-root users password, you must have modify
permission for the passwd and cred tables or for the user’s entries in
the passwd and cred tables.
To change the password of a root user, follow these steps:
1. Log in as root to the host whose password you want to change.
2. Issue the passwd command to change the root password in the
/etc/passwd file:
passwd
3. Issue the following command to encrypt the root user’s secret key
with the new password:
chkey -p
CAUTION You can change the root password on the root master server, but do not
change the public or private key on the root master server. The root
master server’s keys are embedded in every directory object on every
client, replica server, and subdomain server.
For more information, see the following man pages: nispasswd(1),
yppasswd(1), passwd(1), chkey(1), and nis(1).