今晚折腾在centos搭建nginx。在看group的时候发现文档的格式看不懂,于是get到新知识了。
///////////////////////////////////////////////////////////////////////////
1--Understanding /etc/group File首先group是用来存储描述组信息的文件。
2--/etc/group格式说明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.组则是将一些有相同需求的用户联系在一起。
group有四部分,每部分用分号:分割。
四个部分分别是:
- group_name: It is the name of group. If you run ls -l command, you will see this name printed in the group field.
- Password: Generally password is not used, hence it is empty/blank. It can store encrypted password. This is useful to implement privileged groups.
- Group ID (GID): Each user must be assigned a group ID. You can see this number in your /etc/passwd file.
- 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
没有评论:
发表评论
谢谢您的留言^_^