+5 votes
276 views
Manage expiration and expiration of user password in Linux

in Linux / Unix by (552k points)
reopened | 276 views

1 Answer

+3 votes
Best answer

How to change the expiration date and expiration of passwords in Linux

As Linux system administrators, we must be clear about what tools are ideal for centralized administration and one of the most practical ways is to use the integrated distribution commands ..

Among the frequent tasks that we must carry out as IT support, is the administration of user accounts, both in their creation and editing , as well as establishing or changing the expiration and expiration of user passwords which is a Security policy every certain frequency modify said password.

For this, the chage command is useful which is used to modify the expiration information of the password of a specific user, allows us to see the age information of a user's account or change the number of days between password changes and the date of the last password..

Today in TechnoWikis we will see how to manage these details at the user level on Linux systems.

Once the password expiration and its expiration information have been configured, the system will use this information to determine when a user must change their password and thus indicate that they must make this change or else they will not be able to access To the system..

How to change the expiration date and expiration of passwords in Linux

Step 1

To see the age information of a user's account, we must use the -l parameter like this:
 sudo chage -l "user" 
image
Step 2

To set the date or number of days (since January 1, 1970) when this password was last modified, we need to use the -d parameter like this:
 sudo chage -d 2018-02-28 “user” 
image
Step 3

Thus, we have established that the next date of change will be on February 28, 2018. Now, thanks to the chage command it will also be possible to set the date or number of days (from January 1, 1970) in which it is no longer Access to the selected user's account will be possible using the -E parameter as follows:
 sudo chage -E 2018-03-05 “user” 
Step 4

In this case, when the user's account is locked, he must contact the system administrator to proceed with the unlocking of the system. image
Step 5

If the matter is to set a password limit, we have the opportunity to send a warning message or information to it using the -W parameter which allows us to set the number of warning days before the password change is required:
 sudo chage -W 15 “user” 
image
Step 6

In addition to this, it will be possible to set the number of days of inactivity after a password has expired before your account is locked, for this we execute the following:
 sudo chage -I 3 “user” (The number 3 can be defined as necessary) 
Step 7

To check the edited information, we can execute the following command again:
 sudo chage -l "users" 
image
Step 8

Finally, to obtain general help we will use the following command:
 man chage 
In this way, we can see how simple it is to manage user passwords in Linux distributions.

by (3.5m points)
edited

Related questions

+3 votes
1 answer
asked Apr 17, 2023 in Linux/Unix by backtothefuture (552k points) | 58 views
+5 votes
1 answer
asked Jun 23, 2019 in Linux / Unix by backtothefuture (552k points) | 185 views
+4 votes
1 answer
asked Nov 15, 2019 in Windows 10 by backtothefuture (552k points) | 234 views
+5 votes
1 answer
asked Jun 24, 2019 in Office by backtothefuture (552k points) | 353 views
+3 votes
1 answer
Sponsored articles cost $40 per post. You can contact us via Feedback

Most popular questions within the last 30 days

10,659 questions
10,791 answers
510 comments
3 users