2018-10-30 08:39:36 +00:00
|
|
|
# gpasswd
|
|
|
|
|
2021-01-31 17:05:18 +00:00
|
|
|
> Administer `/etc/group` and `/etc/gshadow`.
|
2018-10-30 08:39:36 +00:00
|
|
|
|
|
|
|
- Define group administrators:
|
|
|
|
|
|
|
|
`sudo gpasswd -A {{user1,user2}} {{group}}`
|
|
|
|
|
|
|
|
- Set the list of group members:
|
|
|
|
|
|
|
|
`sudo gpasswd -M {{user1,user2}} {{group}}`
|
|
|
|
|
|
|
|
- Create a password for the named group:
|
|
|
|
|
|
|
|
`gpasswd {{group}}`
|
|
|
|
|
|
|
|
- Add a user to the named group:
|
|
|
|
|
|
|
|
`gpasswd -a {{user}} {{group}}`
|
|
|
|
|
|
|
|
- Remove a user from the named group:
|
|
|
|
|
|
|
|
`gpasswd -d {{user}} {{group}}`
|