1–Understanding /etc/group File


Users can be either people (meaning accounts tied to physical users) or accounts which exist for specific applications to use.用户可以是人,也可以是为某些特殊应用而设立的。

Groups are logical expressions of organization, tying users together for a common purpose. Users within a group can read, write, or execute files owned by that group.组则是将一些有相同需求的用户联系在一起。


Chapter 33. Users and Groups




  1. group_name: It is the name of group. If you run ls -l command, you will see this name printed in the group field.
  2. Password: Generally password is not used, hence it is empty/blank. It can store encrypted password. This is useful to implement privileged groups.
  3. Group ID (GID): Each user must be assigned a group ID. You can see this number in your /etc/passwd file.
  4. Group List: It is a list of user names of users who are members of the group. The user names, must be separated by commas.


查看某用户所在的组:$groups username