Files
tldr/pages.zh/openbsd/chpass.md

21 lines
527 B
Markdown
Raw Permalink 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.

# chpass
> 添加或更改用户数据库信息,包括登录 shell 和密码。
> 另见: `passwd`。
> 更多信息: <https://man.openbsd.org/chsh>。
- 以交互方式为当前用户设置特定的登录 shell
`doas chsh`
- 为当前用户设置特定的登录 [s]hell
`doas chsh -s {{path/to/shell}}`
- 为特定用户设置登录 [s]hell
`doas chsh -s {{path/to/shell}} {{username}}`
-`passwd` 文件格式中指定用户数据库条目:
`doas chsh -a {{username:encrypted_password:uid:gid:...}}`