12

I'm trying to make a program that will store the passwords with users input (a web app), rather than having to do it from the command line. The problem is that I don't know where the passwords are being stored as to change then.

user3368897
  • 145
  • 1
  • 1
  • 6

1 Answers1

15

The default Samba configuration on my system puts the password database in /var/lib/samba/passdb.tdb. Note that this is a binary database, not a flat text file.

You can tell Samba to use a text file by setting the "passdb backend" parameter in /etc/samba/smb.conf. But Samba uses a different password hashing algorithm from the one in /etc/shadow.

source

  • 2
    In addition: You can check it with sudo su and tdbtool. Maybe you will open open passdb.tdb. However, you will receive the hex password. So you can only check if a new entry has been added and not what the password is. – Micha93 Mar 22 '21 at 07:59
  • 2
    in my case, it's /var/lib/samba/private/passdb.tdb – Akhil Apr 07 '22 at 05:57