There are two commands which you can use to create an user account on an Ubuntu Server installation. The first command is the adduser command which is not very flexible but is user friendly in that it prompts you for data with each and every step in the creation process.
The other more flexible command is useradd. Simply calling it with the desired username as a parameter will create a user account, but without listing extra options this user account won’t have a password or even a home directory. One of the better ways of calling it then is as such:
sudo useradd -d /home/newuseraccount -m newuseraccount
sudo passwd newuseraccount
The above will add a new user on the system with the username “newuseraccount”. The -d option specifies where to create the home directory and the -m forces the creation of your specified directory. Note it copies files for the new home directory from the /etc/skel folder. Although we could have specified a password by using the -p option, it might be a better idea to stick with the classic passwd call to do this.
Nifty.