1
0
Fork 0
mirror of https://github.com/tldr-pages/tldr.git synced 2025-03-28 21:16:20 +01:00

usermod: add user lock examples and combine options (#16011)

This commit is contained in:
Managor 2025-03-26 00:19:12 +02:00 committed by GitHub
parent ca11ff6026
commit 0511c2eedb
No known key found for this signature in database
GPG key ID: B5690EEEBB952194

View file

@ -18,8 +18,16 @@
- Add a user to supplementary groups (mind the lack of whitespace):
`sudo usermod {{[-a|--append]}} {{[-G|--groups]}} {{group1,group2,...}} {{username}}`
`sudo usermod {{[-aG|--append --groups]}} {{group1,group2,...}} {{username}}`
- Change a user home directory:
`sudo usermod {{[-m|--move-home]}} {{[-d|--home]}} {{path/to/new_home}} {{username}}`
- Lock an account:
`sudo usermod {{[-L|--lock]}} {{username}}`
- Unlock an account:
`sudo usermod {{[-U|--unlock]}} {{username}}`