This post is a brief description of the very basic tools used to manage users and groups in uBuntu.
Add and Remove users
Add a new user. This command also creates a home directory at /home/username
adduser username
Delete a user. This command also removes the user’s home directory.
sudo deluser --remove-home username
Add and Remove Groups
Before creating a group, check if it exits
grep developers /etc/group
Then to create the group:
sudo addgroup superuberusers
Assign a user to groups
See what groups the user is in:
id tj
Set a user’s primary group:
usermod -g primarygroup username
Add a user to another group:
usermod -a -G anothergroup username
Set resource permissions
Change ownership of resources. This command recursively sets the group owner of a file or folder to the specified group
sudo chown -R :GROUPNAME location_of_files_or_folders
Make resources group writeable. This command sets the ‘group writeable’ flag on a resource
chmod -R g+w location_of_resources



