passwd — Change user passwords or password phrases
Format
passwd [–u userid]
Description
passwd changes the login password or password phrase for the user ID specified. If userid is omitted, or if the -u option is omitted, the login name that is associated with the current terminal is used. You are prompted for the new password or password phrase, which might be truncated to the length defined as the maximum length for the passwords.
Users can change the password or password phrase for another user if they know the user ID and current password or password phrase.
Examples
- To change your password or password phrase, issue:
You are prompted for the old password or password phrase and the new password or password phrase.passwd
- To change the password or password phrase for user ID Steve, issue:
You are prompted for the old password or password phrase and the new password or password phrase.passwd -u steve
Exit values
- 0
- The password or password phrase was changed.
- 1
- Failure due to any of the following reasons:
- The specified user does not exist.
- The current password or password phrase is incorrect.
- The new password or password phrase does not meet the requirements of the installation exit.
- 2
- The new password or password phrase was not entered the same way twice.
- 4
- Error obtaining user login name.