An Engineers Notebook

Linux: useradd and userdel

Create a user
useradd <username>

Create a user with different home directory
useradd -d /Engineers/Projects/ <username>

Create a user with an account expiry date
This is useful if you need to create a temporary account.
useradd -e 2016-02-07 <username>

Add a user to multiple groups
useradd -G admins,webadmin,developer

Delete a user
userdel <username>

Leave a Reply

Your email address will not be published.