2019-10-17 09:46:27 +01:00
|
|
|
# smbpasswd
|
|
|
|
|
2022-01-13 13:28:40 +00:00
|
|
|
> 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 09:46:27 +01:00
|
|
|
|
|
|
|
- Change the current user's SMB password:
|
|
|
|
|
|
|
|
`smbpasswd`
|
|
|
|
|
2022-01-13 13:28:40 +00:00
|
|
|
- Add a specified user to Samba and set password (user should already exist in system):
|
2019-10-17 09:46:27 +01:00
|
|
|
|
2022-01-13 13:28:40 +00:00
|
|
|
`sudo smbpasswd -a {{username}}`
|
2019-10-17 09:46:27 +01:00
|
|
|
|
|
|
|
- Modify an existing Samba user's password:
|
|
|
|
|
2022-01-13 13:28:40 +00:00
|
|
|
`sudo smbpasswd {{username}}`
|
2019-10-17 09:46:27 +01:00
|
|
|
|
2022-01-13 13:28:40 +00:00
|
|
|
- Delete a Samba user (use `pdbedit` instead if the Unix account has been deleted):
|
2019-10-17 09:46:27 +01:00
|
|
|
|
2022-01-13 13:28:40 +00:00
|
|
|
`sudo smbpasswd -x {{username}}`
|