2018-10-30 03:39:36 -05:00
|
|
|
# gpasswd
|
|
|
|
|
2021-01-31 14:05:18 -03:00
|
|
|
> Administer `/etc/group` and `/etc/gshadow`.
|
2021-07-09 16:45:55 +02:00
|
|
|
> More information: <https://manned.org/gpasswd>.
|
2018-10-30 03:39:36 -05:00
|
|
|
|
|
|
|
- Define group administrators:
|
|
|
|
|
2025-03-12 21:05:58 +02:00
|
|
|
`sudo gpasswd {{[-A|--administrators]}} {{user1,user2}} {{group}}`
|
2018-10-30 03:39:36 -05:00
|
|
|
|
|
|
|
- Set the list of group members:
|
|
|
|
|
2025-03-12 21:05:58 +02:00
|
|
|
`sudo gpasswd {{[-M|--members]}} {{user1,user2}} {{group}}`
|
2018-10-30 03:39:36 -05:00
|
|
|
|
|
|
|
- Create a password for the named group:
|
|
|
|
|
|
|
|
`gpasswd {{group}}`
|
|
|
|
|
|
|
|
- Add a user to the named group:
|
|
|
|
|
2025-03-12 21:05:58 +02:00
|
|
|
`gpasswd {{[-a|--add]}} {{user}} {{group}}`
|
2018-10-30 03:39:36 -05:00
|
|
|
|
|
|
|
- Remove a user from the named group:
|
|
|
|
|
2025-03-12 21:05:58 +02:00
|
|
|
`gpasswd {{[-d|--delete]}} {{user}} {{group}}`
|