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
+9 -1
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}}`