How to solve the Linux account expiration?

  
                

In Linux system operation, the validity period is usually not set when the account is set up. It is mainly used in the enterprise. How to extend the validity period when the Linux account expires? The following small series will introduce you to the solution of the Linux account expiration, let's learn together.

Method a: When adding a user

Parameter useradd linuxidc -e 01/28/12

or modify the following documents:

[ Root@linuxidc skel]# grep EXPIRE /etc/default/useradd

EXPIRE=

Instance: Specify the parameter to execute useradd -D -e

[root@linuxidc ~] # date +%F

2012-01-25

[root@linuxidc ~]# useradd -D -e 01/19/12 #→Modify the default account new account expiration time, Once set, the new user will expire after this time.

[root@linuxidc ~]# useradd -D

Copyright © Windows knowledge All Rights Reserved