Forrest logo
back to the passwd tool

passwd:tldr:09155

passwd: Get the current status of the user.
$ passwd -S
try on your machine

The command "passwd -S" is used to display information about the status of user passwords in Linux or Unix systems. It provides a summary of the password-related status for all user accounts on the system.

Here's what the options in the command mean:

  • "passwd" is the command used to change or manage user passwords.
  • "-S" is the option used to display the password status of all user accounts.

When you execute the "passwd -S" command, you will see an output listing all user accounts on the system along with additional information. The output typically includes:

  • Username: The name of the user account.
  • Password status: It indicates whether the account password is locked (L) or unlocked (P). If the account is locked, the user cannot log in until it is unlocked.
  • Last password change: The date when the user last changed their password.
  • Minimum password age: The minimum number of days a user must wait before changing their password again.
  • Maximum password age: The maximum number of days before the user must change their password.
  • Password warning period: The number of days given to the user as a warning before their password expires.
  • Password inactivity period: The number of days the user is allowed to remain inactive after the password expires before the account is locked.

This command can be useful for system administrators to check the password status of all accounts, identify locked or expired passwords, and track password-related information for security purposes.

This explanation was created by an AI. In most cases those are correct. But please always be careful and never run a command you are not sure if it is safe.
back to the passwd tool