Friday 4 May 2018

List Samba users?


So yesterday evening I was pulling my hair out (figuratively -- I'm bald) for over an hour trying to figure out why smbpasswd kept rejecting my attempts to reset the password for one of my Samba users. Anyway, long story short, it was apparently because the user didn't exist yet (smbpasswd -a added her without complaint, and now everything's hunky-dory), even though I still swear up and down that I did indeed add her already.


Anyway, if I could have simply listed the users in the smbpasswd database, it would saved me a lot of grief. Is there a command or utility that can do that? (Samba's using that new-fangled .tdb database, otherwise I would have just cat /etc/smbpasswd.)



Answer



I believe the command your looking for is pdbedit.


From the man page "pdbedit - manage the SAM database (Database of Samba Users)"


sudo pdbedit -L -v

-L to list users. -v to be verbose.


No comments:

Post a Comment

Where does Skype save my contact's avatars in Linux?

I'm using Skype on Linux. Where can I find images cached by skype of my contact's avatars? Answer I wanted to get those Skype avat...