Adding a Linux User
Adding a user to a Linux system is a task I do frequently enough that I wanted keep the steps handy:
Add the user account:
sudo useradd [USER_NAME]
Lock the user account:
sudo usermod -L [USER_NAME]
Setup the user's initial password:
sudo passwd [USER_NAME]
Add the user to a group (optional):
sudo usermod -a -G [GROUP_NAME] [USER_NAME]
Require the user to immediately change their password upon first login:
sudo chage -d 0 [USERNAME]
Unlock the useraccount:
sudo usermod -U [USERNAME]