Samba smbpasswd file missing
Hey all,
For backing up a server I wanted to set up my Samba. Having done this before I started with changing my smb.conf After doing so I didn't look any further and stated this command right away: smbpasswd -a user This gave me a bunch of errors (which unfortunately I'm not able to reproduce), but at the end it stated my user was added. Of course I didn't thick so and wanted to checkout my smbpasswd file. I was very surprised to find out there was no smbpasswd file there! (/etc/samba/smbpasswd) So I search google. There was someone saying you can just make your own with the following command: touch smbpasswd I have absolutely no idea what that does, but it tried it anyway. It did create smbpasswd. I tried to add my user again. It came up like this: [root@dowiki01 samba]# smbpasswd -a twadmin New SMB password: Retype new SMB password: Which looks like there is something already there. Looking in my newly created file it was empty. Now I ended up having two questions: 1.) What did I actually create using touch? 2.) How can solve my smbpasswd issue? (I using CentOS 5.3 btw) Thanks in advance. |
Check your smb.conf file for what your password backend is. (passdb backend =). If it isn't listed, the smbpasswd file is the default.
The touch command will update the timestamp on an existing file, and create a new file if it doesn't exist. You might try restarting samba. Also make sure that the user you are trying to add exists in /etc/passwd. Otherwise smbpasswd will fail and not add the new user. |
Thanks for replying.
In my conf: passdb backend = tdbsam I checked my user in /etc/passwd and it does existed. Then I restarted my smb. Didn't work though. |
Quote:
Code:
/etc/samba/passdb.tdb Code:
file passdb.tdb taken from Code:
/usr/share/doc/samba-3.0.28/htmldocs/Samba3-HOWTO/passdb.html In a strict sense, there are three supported account storage and access systems. One of these is considered obsolete (smbpasswd). It is recommended to use the <code class="literal">tdbsam</code> method for all simple systems. Use <code class="literal">ldapsam</code> for larger and more complex networks. check content of this passdb file Code:
strings passdb.tdb |
tdbsam is a different password backend than the smbpasswd file.
Run "sudo /usr/bin/pdbedit -L" and see if the user is in it. If you didn't add the user as a Linux user first, you may need to rerun smbpasswd again. You can use either smbpasswd or pdbedit program to manage the tdbsam account database. |
Try
tdbdump if you have /etc/samba/passdb.tdb |
I know that this thread has not been replied for a long time, but as it helped me, I decided to leave here what I found.
Code:
man smb.conf In my case (Ubuntu 10.04), with tdbsam, the file is at /var/lib/samba/passdb.tdb With smbpasswd, you have the /etc/samba/smbpasswd, that is created when you add users with the "smbpasswd -a <user>" command. |
All times are GMT -5. The time now is 12:10 PM. |