useradd, userdel, usedmod, users: refresh page (#7661)

This commit is contained in:
Emily Grace Seville
2022-01-27 13:08:33 -08:00
committed by GitHub
parent 3a104d8676
commit 684f7bbc65
4 changed files with 44 additions and 29 deletions

View File

@@ -1,24 +1,33 @@
# useradd
> Create a new user.
> See also: `users`, `userdel`, `usermod`.
> More information: <https://manned.org/useradd>.
- Create new user:
- Create a new user:
`useradd {{name}}`
`sudo useradd {{username}}`
- Create new user with a default home directory:
- Create a new user with the specified user id:
`useradd --create-home {{name}}`
`sudo useradd --uid {{id}} {{username}}`
- Create new user with specified shell:
- Create a new user with the specified shell:
`useradd --shell {{path/to/shell}} {{name}}`
`sudo useradd --shell {{path/to/shell}} {{username}}`
- Create new user belonging to additional groups (mind the lack of whitespace):
- Create a new user belonging to additional groups (mind the lack of whitespace):
`useradd --groups {{group1,group2}} {{name}}`
`sudo useradd --groups {{group1,group2,...}} {{username}}`
- Create new system user without a home directory:
- Create a new user with the default home directory:
`useradd --no-create-home --system {{name}}`
`sudo useradd --create-home {{username}}`
- Create a new user with the home directory filled by template directory files:
`sudo useradd --skel {{path/to/template_directory}} --create-home {{username}}`
- Create a new system user without the home directory:
`sudo useradd --system {{username}}`