passwd

NAME

passwd - change user's password

SYNOPSIS

passwd [user]

DESCRIPTION

The passwd(1) utility changes the password for an account. The account belongs to the user invoking the utility, or to another user if one is specified on the command line.

The utility prompts for the old password for the account to validate that the user has permission to change the password for that account. Then the utility prompts for the new password, and prompts for it again. The same new password must be entered both times, or the password will not be changed. (This protects users from being locked out of their accounts by an incorrectly typed password.)

For security reasons, the old and new passwords are not echoed to the screen.

DIAGNOSTICS

The passwd(1) utility exits with status 0 if the password was successfully changed. If an error occurred, the passwd(1) utility exits with an error message and one of these statuses:

1
Password not changed
2
User could not be validated
3
New password not confirmed correctly

EXAMPLE

A typical passwd(1) session looks like this:

$ passwd rodney
Enter old password:
Re-enter old password:
Enter new password:
Confirm new password:

SEE ALSO

chpass(2)