home | O'Reilly's CD bookshelfs | FreeBSD | Linux | Cisco | Cisco Exam  


passwd

passwd [options ] [user ]

Create or change a password associated with a user name. Only the owner or a privileged user may change a password. Owners need not specify their user name.

Options

Normal users may change the so-called gecos information (user's full name, office, etc.) and login shell when using NIS or NIS+; otherwise only privileged users may change the following:

-D domain

Use the passwd.org_dir database in domain , instead of in the local domain. Solaris only.

-e

Change the login shell. Solaris only.

-g

Change the gecos information. Solaris only.

-r db

Change the password in password database db , which is one of files , nis , or nisplus . Only a privileged user may use files . Solaris only.

-s

Display password information:

  1. user name.

  2. Password status (NP for no password, PS for password, LK for locked).

  3. The last time the password was changed (in mm/dd/yy format).

  4. Number of days that must pass before user can rechange the password.

  5. Number of days before the password expires.

  6. Number of days prior to expiration that user is warned of impending expiration.

Options (privileged users only)

-a

Use with -s to display password information for all users. user should not be supplied.

-d

Delete password; user is no longer prompted for one.

-f

Force expiration of user 's password; user must change password at next login.

-h

Change the home (login) directory. Solaris only.

-l

Lock user 's password; mutually exclusive with -d .

-n

Set Item 4 of user 's password information. Usually used with -x .

-w

Set Item 6 for user .

-x

Set Item 5 for user . Use -1 to disable password aging, 0 to force expiration like -f .


Previous: Reference: page UNIX in a Nutshell: System V Edition Next: Reference: paste
Reference: page Book Index Reference: paste

The UNIX CD Bookshelf NavigationThe UNIX CD BookshelfUNIX Power ToolsUNIX in a NutshellLearning the vi Editorsed & awkLearning the Korn ShellLearning the UNIX Operating System