Chris Straw
SHARE:

Copy/Paste – Ubuntu Add User with Home Directory with bash

Run the following command to add a standard user named cli_user1. Specify a different username as you wish. The -m flag tells the system to create a home directory for the user. By default, the home directory path is /home/{username} where {username} is the new account’s username.

Template:

sudo useradd -s /path/to/shell -d /home/{dirname} -m -G {secondary-group} {username}
sudo passwd {username}

I removed the -d to use the default directory /home/{username}
Actual (administrator account by using -G sudo):

sudo useradd -s /bin/bash -m -G sudo cstraw
sudo passwd cstraw