What are other passwd options?

QuestionsQuestions8 SkillsProUser Account ManagementNov, 10 2025
068

The passwd command has several options that can be used to manage user passwords and accounts. Here are some commonly used options:

  1. -d: Deletes the password for the specified user, effectively allowing passwordless login.

    sudo passwd -d username
  2. -l: Locks the specified user account, preventing the user from logging in.

    sudo passwd -l username
  3. -u: Unlocks a previously locked user account.

    sudo passwd -u username
  4. -e: Forces the user to change their password at the next login.

    sudo passwd -e username
  5. -n: Sets the minimum number of days between password changes.

    sudo passwd -n days username
  6. -x: Sets the maximum number of days a password is valid before it must be changed.

    sudo passwd -x days username
  7. -w: Sets the number of days before password expiration during which the user is warned.

    sudo passwd -w days username
  8. -i: Sets the number of days after a password expires until the account is permanently disabled.

    sudo passwd -i days username

These options allow administrators to manage user passwords and account statuses effectively.

0 Comments

no data
Be the first to share your comment!