Click here for "Safe Air Conditioner Repair and Proper Freon Recovery".(Japanese Version)

Set and Remove passwords for groups

Set passwords for groups

To set a password for a group, use the gpasswd command
You will be prompted to enter a password when adding a user to a group or when a user is not registered in a group.

By setting a password for the group, you can prevent people from registering members to the group without permission.

[root@Lion ~]# gpasswd newgr  ←Set a password for the newgr group
Changing the password for group newgr
New Password:             ←Enter the password for the newgr group
Re-enter new password:      ←Enter the password for the newgr group again

Remove group password

To remove the password set for a group, run the gpasswd command with the option "-r" or "-R".
The argument is the name of the group for which you want to remove the password.
This process can be performed by root or a user registered as a group administrator.

[root@Lion ~]# gpasswd -r newgr  ←Remove password for group newgr

または

[root@Lion ~]# gpasswd -R newgr  ←Remove password for group newgr

Copied title and URL