Update cheatsheets

This commit is contained in:
ivuorinen
2024-02-21 11:19:49 +00:00
parent 4e88a1b42f
commit 3d653cc7e6
4803 changed files with 127002 additions and 0 deletions

38
linux/useradd Normal file
View File

@@ -0,0 +1,38 @@
---
syntax: markdown
tags: [tldr, linux]
source: https://github.com/tldr-pages/tldr.git
---
# useradd
> Create a new user.
> See also: `users`, `userdel`, `usermod`.
> More information: <https://manned.org/useradd>.
- Create a new user:
`sudo useradd {{username}}`
- Create a new user with the specified user id:
`sudo useradd --uid {{id}} {{username}}`
- Create a new user with the specified shell:
`sudo useradd --shell {{path/to/shell}} {{username}}`
- Create a new user belonging to additional groups (mind the lack of whitespace):
`sudo useradd --groups {{group1,group2,...}} {{username}}`
- Create a new user with the default home directory:
`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}}`