G Gabriel9999 Member Joined Mar 12, 2019 Messages 38 Reaction score 4 Credits 130 Jun 8, 2020 #1 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.
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 Super Moderator Staff member Gold Supporter Joined Apr 25, 2017 Messages 1,980 Reaction score 3,009 Credits 17,633 Jun 8, 2020 #2 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! 15 Useful Useradd Commands with Examples in Linux In Linux, a 'useradd' command is a low-level utility that is used for adding/creating user accounts in Linux and other Unix-like operating systems. www.tecmint.com
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! 15 Useful Useradd Commands with Examples in Linux In Linux, a 'useradd' command is a low-level utility that is used for adding/creating user accounts in Linux and other Unix-like operating systems. www.tecmint.com
sp331yi Well-Known Member Joined Apr 11, 2020 Messages 720 Reaction score 326 Credits 4,584 Jun 8, 2020 #3 Was going to add same source -- TecMint.com -- one not to forget!
E edizgeorgi New Member Joined Jun 1, 2019 Messages 3 Reaction score 0 Credits 13 Jun 11, 2020 #4 You can use the -e and -f options like below. $ useradd -e 2017-02-28 -f 60 john For more details: https://www.poftut.com/add-new-user-account-linux/
You can use the -e and -f options like below. $ useradd -e 2017-02-28 -f 60 john For more details: https://www.poftut.com/add-new-user-account-linux/