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

21 lines
537 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.

# smbpasswd
> 添加/删除 Samba 用户或更改其密码。
> Samba 用户必须具有现有的本地 Unix 账户。
> 更多信息:<https://manned.org/smbpasswd.8>。
- 更改当前用户的 SMB 密码:
`smbpasswd`
- 将指定用户添加到 Samba 并设置密码(用户应已存在于系统中):
`sudo smbpasswd -a {{username}}`
- 修改现有 Samba 用户的密码:
`sudo smbpasswd {{username}}`
- 删除 Samba 用户(如果 Unix 账户已被删除,请使用 `pdbedit`
`sudo smbpasswd -x {{username}}`