/etc/group 与 /etc/gshadow (二)

NAME
       gshadow - shadowed group file

DESCRIPTION
       /etc/gshadow contains the shadowed information for group accounts.

       This file must not be readable by regular users if password security is to be maintained.

       Each line of this file contains the following colon-separated fields:

       group name
           It must be a valid group name, which exist on the system.

       encrypted(加密的) password
           Refer to crypt(3) for details on how this string is interpreted.

           If the password field contains some string that is not a valid result of crypt(3), for instance ! or *, users will not be able to use a unix
           password to access the group (but group members do not need the password).

           The password is used when an user who is not a member of the group wants to gain the permissions of this group (see newgrp(1)).

           This field may be empty, in which case only the group members can gain the group permissions.

           A password field which starts with a exclamation(感叹) mark means that the password is locked. The remaining characters on the line represent the password field before the password was locked.

           This password supersedes(取代) any password specified in /etc/group.

       administrators
           It must be a comma-separated list of user names.

           Administrators can change the password or the members of the group.

           Administrators also have the same permissions as the members (see below).

       members
           It must be a comma-separated list of user names.

           Members can access the group without being prompted for a password.

           You should use the same list of users as in /etc/group.

FILES
       /etc/group
           Group account information.

       /etc/gshadow
           Secure group account information.

  • /etc/gshadow 的构造:
  •  
    root:::root
    bin:::root,bin,daemon
    daemon:::root,bin,daemon
    sys:::root,bin,adm
    adm:::root,adm,daemon

    一般来说,group password 是用来让那些不在 group 中的成员,临时加入 group 用的,有兴趣的话可以使用 man newgrp 了解一下他的用法!不过,因为牵涉到 "密码",不好管理,因此很少用。真想让对方加入,不如将对方加入该群组,用密码反而不方便。

评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值