Create a new user on a shared lab machine

Create the account. If you do not want to interfere with the GUI, then use adduser over useradd :

# OPTION 1
sudo adduser <new_username>

# or, OPTION 2 (lower-level):
sudo useradd <new_username>

The user may already exist without a home folder, in which case they also can’t SSH in.

Create the home folder if missing:

sudo mkhomedir_helper <new_username>
ls /home/<new_username>   # confirm

Add to the SSH groups so they can log in remotely:

sudo usermod -a -G ssh  <new_username>
sudo usermod -a -G sshd <new_username>

Grant superuser rights (only when justified):

sudo usermod -a -G sudo <new_username>

This site uses Just the Docs, a documentation theme for Jekyll.