1
0
Fork 0
mirror of https://github.com/tldr-pages/tldr.git synced 2025-04-29 23:24:55 +02:00
tldr/pages/linux/smbpasswd.md

22 lines
547 B
Markdown
Raw Normal View History

2019-10-17 16:46:27 +08:00
# smbpasswd
> Add/remove a Samba user or change its password.
> Samba users must have an existing local Unix account.
> More information: <https://manned.org/smbpasswd.8>.
2019-10-17 16:46:27 +08:00
- Change the current user's SMB password:
`smbpasswd`
- Add a specified user to Samba and set password (user should already exist in system):
2019-10-17 16:46:27 +08:00
`sudo smbpasswd -a {{username}}`
2019-10-17 16:46:27 +08:00
- Modify an existing Samba user's password:
`sudo smbpasswd {{username}}`
2019-10-17 16:46:27 +08:00
- Delete a Samba user (use `pdbedit` instead if the Unix account has been deleted):
2019-10-17 16:46:27 +08:00
`sudo smbpasswd -x {{username}}`