Add New User with Specific Expire Date

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • Gabriel9999
    New Member
    • Jul 2019
    • 15

    Add New User with Specific Expire Date

    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.
  • SioSio
    Contributor
    • Dec 2019
    • 272

    #2
    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

    Comment

    • edizgeorgi
      New Member
      • Oct 2019
      • 8

      #3
      You can use the -e and -f options like below.
      $ useradd -e 2017-02-28 -f 60 john
      Last edited by Rabbit; Jun 11 '20, 07:18 PM. Reason: Removed external link

      Comment

      Working...