Files
tldr/pages.zh/linux/adduser.md

25 lines
619 B
Markdown
Raw Blame History

This file contains ambiguous Unicode characters

This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

# adduser
> 添加用户的工具。
> 更多信息:<https://manned.org/adduser>.
- 创建一个新用户,在默认路径创建 home 目录,并提示用户设置密码:
`adduser {{用户名}}`
- 创建一个新用户,不生成 home 目录:
`adduser --no-create-home {{用户名}}`
- 创建一个新用户,并在指定路径下创建 home 目录:
`adduser --home {{home 路径}} {{用户名}}`
- 创建一个新用户,并指定登录 shell
`adduser --shell {{shell 路径}} {{用户名}}`
- 创建一个新用户,并指定其用户组:
`adduser --ingroup {{用户组}} {{用户名}}`