Knowledge Base

How to Expire a User's Password in Linux

Linux logo

This article will show you how to expire a user's password in Linux.

Expiring a user's password in Linux can be accomplished using the passwd command. Here's how to do it:


1. Log in to your SSH account

Open a terminal and log in with root or sudo access.

2. Expire the user's password

You can expire the user's password using the -e option:

sudo passwd -e username

Replace username with the actual username.

The user will be required to change their password the next time they log in.

Important Considerations

  • Ensure you have the necessary permissions to change another user's password.
  • Always choose strong, unique passwords to maintain system security.

Next: How to Change a User's Password in Linux covers setting the password in the first place.

Please rate this article to help us improve our Knowledge Base.

0 0