mirror of
https://github.com/ivuorinen/cheatsheet-tldr.git
synced 2026-03-03 07:55:02 +00:00
Update cheatsheets
This commit is contained in:
29
linux/gpasswd
Normal file
29
linux/gpasswd
Normal file
@@ -0,0 +1,29 @@
|
||||
---
|
||||
syntax: markdown
|
||||
tags: [tldr, linux]
|
||||
source: https://github.com/tldr-pages/tldr.git
|
||||
---
|
||||
# gpasswd
|
||||
|
||||
> Administer `/etc/group` and `/etc/gshadow`.
|
||||
> More information: <https://manned.org/gpasswd>.
|
||||
|
||||
- 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}}`
|
||||
Reference in New Issue
Block a user