Ubuntu#
Users#
Graphical#
- Go to System -> Administration -> Users and Groups
- Press Unlock
- Press + Add User
- Enter a username and password. Use only letters or digits.
- 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#
- Go to System -> Administration -> Users and Groups
- Press Unlock
- Press Manage Groups -> + Add Group
- Enter a group name and group id. Use only letters or digits for the group name and digits for the group id.
- 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