Samba (File Server) - List Samba users using the pdbedit command

by
Jeremy Canfield |
Updated: October 25 2021
| Samba (File Server) articles
The pdbedit --list command can be used to verify the user was added to the SMB database. The output should be identical to the smb.passwd file.
~]# pdbedit --list
john.doe:1000
The --smbpasswd-style flag can be included to format the output to be identical to the smb.passwd file.
~]# pdbedit --list --smbpasswd-style
john.doe:1000:XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX:43A29EF878C2498C6960672E21CA9B9D:[U ]:LCT-616C00EF:
The smbclient command can be used to see if you are able to connect to a share with a certain user and their password (john.doe in this example).
smbclient --list //$(hostname -s)/share --user john.doe
Did you find this article helpful?
If so, consider buying me a coffee over at