If you want to remove the expiration date for a user account in Linux, you can use the chage command to set the account to never expire. Here’s how to do it:
-
Open a terminal.
-
Run the following command, replacing
usernamewith the actual username:sudo chage -E -1 username
This command sets the expiration date to "never," allowing the user account to remain active indefinitely.
-
To verify that the expiration date has been removed, you can check the account details with:
sudo chage -l username
The output should indicate that the "Account expires" field shows "never," confirming that the account will not expire.
