Copied to clipboard

passwd

The `passwd` command is used to change the user password.
Leave it blank for the current user

Example

  • Change the password for the current user: passwd
  • Change the password for user "john": passwd john
  • Change the password for user "john" but disallow passwords previously used by john: passwd -n 3 john
  • Change the password for user "john" but disallow the new password to be the same as the old password: passwd -n 1 -r n john
  • Disable the password for user "john": passwd -l john