Question: How Do I Expire a User in Linux?

Question: How Do I Expire a User in Linux?
Contents

Type chage -l userName command to display password expiration information for Linux user account. The -l option passed to the change show account aging information.

How do I change the expiry date of a user in Linux?

Set Password Expiry Date for an user using chage option -M

Root user (system administrators) can set the password expiry date for any user. In the following example, user dhinesh password is set to expire 10 days from the last password change.

How do I expire a password in Linux?

To force a user to change his/her password, first of all the password must have expired and to cause a user’s password to expire, you can use the passwd command, which is used to change a user’s password by specifying the -e or –expire switch along with username as shown.

Alexander Ross
Author

Alexander Ross

Alexander Ross has covered the video game industry for a decade, writing deep dives on game design, esports tournaments, VR developments, and gaming culture.