Ubuntu#

Users#

Graphical#

  1. Go to System -> Administration -> Users and Groups
  2. Press Unlock
  3. Press + Add User
  4. Enter a username and password. Use only letters or digits.
  5. Set any options you like under User Privileges and Advanced tabs.

Shell#

You should be using the adduser command, not useradd.

$ sudo adduser <username>
$ sudo passwd <username>

Groups#

Graphical#

  1. Go to System -> Administration -> Users and Groups
  2. Press Unlock
  3. Press Manage Groups -> + Add Group
  4. Enter a group name and group id. Use only letters or digits for the group name and digits for the group id.
  5. Add any existing users to the group by clicking on their names under Group Members

Shell#

To create a new group

$ sudo addgroup <groupname>

To add a user to a pre-existing group

$ sudo adduser <usermame> <groupname>

You can also edit

/etc/group

directly.

CentOS#

Add user to group#

$ sudo adduser <username>
$ sudo passwd <username>
$ sudo useradd -G wheel username

Linux - Linux Shell - Fixme