yppasswd Command

Purpose

Changes your network password in Network Information Services (NIS).

Syntax

yppasswd [ -f[Name ]| -s [ Name [ ShellProg ]] ]

Description

The yppasswd command changes (or installs) a network password and associates it with the username you specify in the Name variable. To create or change a password, you must be the owner of the password you want to change. The NIS password can be different from the one on your own machine. Root users on an NIS server can change the password of another user without knowing the user's original password. To change the password of another user, the Root user enters their password in place of the user's original password. Root users on an NIS client do not have this privilege.

When you enter the yppasswd command on the command line, the system prompts you to enter the old password. Then the system prompts you to enter the new password. The password must be a minimum four characters long that includes uppercase and lowercase characters. Otherwise, the password must be six characters long or more. These rules are relaxed if you are insistent enough.

If you enter the old password incorrectly, you must enter the new password before the system gives you an error message. The system requires both passwords because the update command sends them to the server at the same time. The server detects the error and notifies you that the old password entered is incorrect.

To verify the new password, the system prompts you to enter it again. For the new password to take effect, the yppasswdd daemon must be running on your NIS server.
Note: The yppasswd command cannot establish rules for passwords as does the passwd command.

Flags

Table 1. Flags
Item Description
-f [ Name ] Changes gecos information of the user Name in the NIS maps. Gecos information is general information that is stored in the /etc/passwd file.
-s [ Name[ShellProg]] Changes the login shell for user Name in the NIS maps.

Example

  1. To change a user's NIS password, enter the following command:
    yppasswd Joe

    This example demonstrates how to change the NIS password for the user named Joe. The system first prompts you to enter the old password of Joe and then the new password.

  2. To change the login shell to /bin/ksh for the username Joe, if the yppasswdd daemon is not started with the -noshell flag, enter the following command:
    yppasswd  -s Joe /bin/ksh
  3. To change the gecos information in the passwd file for the username Joe, if the yppasswdd daemon is not started with the -nogecos flag, enter the following command:
    yppasswd  -f Joe
    Old NIS password:
    Joe's current gecos:
    John Doe Test User Id
    Change (yes) or (no)? >y
    To?>Joe User Test User Id