Add New User with Specific Expire Date

Gabriel9999

Member
Joined
Mar 12, 2019
Messages
38
Reaction score
4
Credits
130
I want to add a user account to my linuxbox. But this user will have specific expire time which will be specified at the useradd definition.
 


JasKinasis

Well-Known Member
Joined
Apr 25, 2017
Messages
1,792
Reaction score
2,601
Credits
15,165
To set an expiry date for the users account with useradd, use the -e option.
e.g.
Bash:
useradd -e  2020-12-31 someuser

The above example will set the expiry date of 31st December 2020 for the account of a user called someuser.

Obviously, if you're setting up a new user, you might want to use several other options, not just the -e option.

A quick bit of duckduckgo-fu yielded this, which will probably help you out a lot. And probably explains things better than I could!
 

sp331yi

Well-Known Member
Joined
Apr 11, 2020
Messages
721
Reaction score
326
Credits
4,584
Was going to add same source -- TecMint.com -- one not to forget!
 

Staff online

Members online


Latest posts

Top