Adding Users

To add a user that is separate from root.

With this command we'll add the user homersimpson:

useradd -g users -u 1001 -d /home/homersimpson -s /bin/bash -m homersimpson

The option -d defined the home folder and -m to create it. The option -u set the UID (take care if you'll add more than one user). The option -g add the user to group users and -s setup the default bash.

Set a password for the new user with the passwd command:

passwd homersimpson
Edit Page ‐ Yes, you can edit!

Older Revisions • May 5 at 8:47 am • Michael Tremer