It’s been a while since I’ve had to do any basic sysadmin stuff on a Linux box… seeing as I had to google the answers to this I thought I’d better write them down!
useradd syntax
useradd [options] {username}
Useful options are:
- -d
- declare the users home directory
- -m
- force ‘useradd’ to create the home directory
- -D
- accept the system defaults for account settings
An alternative for ‘useradd’ though is ‘adduser’:
adduser {username}
This will then prompt you for all the information needed to set up the account.
making the user an administrator (with sudo)
As the root user…
visudo
Then underneath the entry for ‘root’ just add in an entry with the desired user name:
{username} ALL=(ALL) ALL