Super User is a question and answer site for computer enthusiasts and power users. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

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.)

share|improve this question
up vote 110 down vote accepted

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.

share|improve this answer
That looks like exactly what I was after, thanks! – Kromey Apr 15 '11 at 0:07
Nope, doesn't work. I get tdbsam_open: Failed to open/create TDB passwd [/var/lib/samba/private/passdb.tdb] – starbeamrainbowlabs Apr 17 at 16:20

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .