i

Fundamentals Of Linux

Understanding different types of groups and creation of groups

About groups

Users can be listed under groups. Groups allow you to set or access permissions on the group level instead of having to set permissions for every individual user in the system of the domain. Every Unix or Linux distribution will have a graphical tool to manage related groups. A fresh or new user should use this graphical tool. More experienced users can use command-line tools or CLI to manage users, but be careful: Some distributions packages do not allow the mixed-use of GUI and CLI tools to manage groups.

Group add

Groups can be added or created with the groupadd command. Stated below with the creation of five (empty) groups.


/etc/group

Users can be a member of different - several groups. Group membership is characterized by the /etc/group file. The first field is the name of the group. The second field is the encrypted groups and password (can be empty). The third field is the identification of a group or GID. The fourth field is the list of members and these groups have no members.

Usermod

Group membership can be changed or modified with the useradd or usermod command.
Be sure when using usermod to add any users to groups. By default, the usermod command will remove the user from every group by using the -a (append) switch prevents this behavior.

Groupmod

It can permanently remove a group using the groupdel command.


Groupdel


It can permanently remove a group using groupdel command.
By using this user can type the groups command to view a list of groups where the user belongs to.

Root

The root user also called the superuser (SU user) is the most powerful or GOD, account on your Linux system. Using users can do almost anything such as the creation of other users. Root user always has userId is 0