pdbedit, smbpassword: add page & improve comments (#7545)

feature/windows-fix-syntax-2
cyqsimon 2022-01-13 21:28:40 +08:00 committed by GitHub
parent 9e94d88d31
commit 34f822e792
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 29 additions and 7 deletions

21
pages/linux/pdbedit.md Normal file
View File

@ -0,0 +1,21 @@
# pdbedit
> Edit the Samba user database.
> For simple user add/remove/password, you can also use `smbpasswd`.
> More information: <https://manned.org/pdbedit>.
- List all Samba users (use verbose flag to show their settings):
`sudo pdbedit --list --verbose`
- Add an existing Unix user to Samba (will prompt for password):
`sudo pdbedit --user {{username}} --create`
- Remove a Samba user:
`sudo pdbedit --user {{username}} --delete`
- Reset a Samba user's failed password counter:
`sudo pdbedit --user {{username}} --bad-password-count-reset`

View File

@ -1,20 +1,21 @@
# smbpasswd
> Change a user's SMB password.
> Samba users must also have a local Unix account.
> 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>.
- Change the current user's SMB password:
`smbpasswd`
- Add a specified user to Samba and set password(user should already exist in system):
- Add a specified user to Samba and set password (user should already exist in system):
`smbpasswd -a {{username}}`
`sudo smbpasswd -a {{username}}`
- Modify an existing Samba user's password:
`smbpasswd {{username}}`
`sudo smbpasswd {{username}}`
- Delete a Samba user:
- Delete a Samba user (use `pdbedit` instead if the Unix account has been deleted):
`smbpasswd -x {{username}}`
`sudo smbpasswd -x {{username}}`