By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
459,268 Members | 1,309 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 459,268 IT Pros & Developers. It's quick & easy.

Add New User with Specific Expire Date

P: 15
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.
Jun 8 '20 #1
Share this Question
Share on Google+
2 Replies


100+
P: 150
The -e option of the useradd command specifies an expiration date.
useradd -e YYYY-MM-DD user1

Use the -D option to change the default expiration date.
useradd -D -e YYYY-MM-DD
Jun 9 '20 #2

P: 8
You can use the -e and -f options like below.
$ useradd -e 2017-02-28 -f 60 john
Jun 11 '20 #3

Post your reply

Sign in to post your reply or Sign up for a free account.