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.
 


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!
 
Was going to add same source -- TecMint.com -- one not to forget!
 


Top