1. Introduction command
gpasswd is under Linux workgroup file / etc / group and / etc / gshadow management tools.
System administrators can use the -a option to define group administrator, use the -m option to define members, the group administrator with group name gpasswd invoked only prompted new password group.
2. Command Format
gpasswd [OPTIONS] GROUP
3. Option Description
-a, --add USER
向组 GROUP 中添加用户 USER
-d, --delete USER
从组 GROUP 中添加或删除用户
-h, --help
显示此帮助信息并退出
-r, --delete-password
删除组密码
-R, --restric t
向其成员限制访问组 GROUP
-M, --members USER,...
设置组 GROUP 的成员列表
-A, --administrators ADMIN,...
设置组的管理员列表
4. Common examples
(1) adding to the user itcast in test group.
gpasswd -a itcast test
(2) remove a user from a group of test.
gpasswd -d itcast test
(3) remove the password set.
gpasswd -r test
(4) a list of the administrator for the group.
gpasswd -A deng test
(5) Create a password to the user group.
gpasswd test
references
[1] gpasswd (1) Manual
[2] . CSDN [Linux] step by step learning Linux - gpasswd command (90)