LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Server (http://www.linuxquestions.org/questions/linux-server-73/)
-   -   samba smbpasswd file problem (http://www.linuxquestions.org/questions/linux-server-73/samba-smbpasswd-file-problem-785700/)

shusko9 01-29-2010 05:57 PM

samba smbpasswd file problem
 
I can't create the user/encrypted passwords in /etc/samba/smbpasswd . I'm using samba server/client 3.4.2 in mandriva64 2010. I've done this many times in mandriva 2008. I go to the /etc/samba/ folder and open konsole in /etc/samba/ do a su/password, then # smbpasswd -a <username> . I use null or real passwords and hit [enter]. No error, but when I open the file /etc/samba/smbpasswd, using "vi", there is nothing written into that file.. Where is it going? Just seems like the smbpasswd command is broke. I've removed all samba rpm packages, and re-installed them to no avail. Due to not being able to create these encrypted passwords, I can't share this samba server with any other computers on my small lan. The other computers see the server, but cannot access it.

kforbus 01-29-2010 11:15 PM

Quote:

Originally Posted by shusko9 (Post 3845447)
I can't create the user/encrypted passwords in /etc/samba/smbpasswd . I'm using samba server/client 3.4.2 in mandriva64 2010. I've done this many times in mandriva 2008. I go to the /etc/samba/ folder and open konsole in /etc/samba/ do a su/password, then # smbpasswd -a <username> . I use null or real passwords and hit [enter]. No error, but when I open the file /etc/samba/smbpasswd, using "vi", there is nothing written into that file.. Where is it going? Just seems like the smbpasswd command is broke. I've removed all samba rpm packages, and re-installed them to no avail. Due to not being able to create these encrypted passwords, I can't share this samba server with any other computers on my small lan. The other computers see the server, but cannot access it.


Have you confirmed that the smbpasswd file exists in the directory you're looking for it in? Try looking for the smbpasswd file in /etc/samba/private/.

catkin 01-30-2010 01:51 AM

Check the setting of "passdb backend" in the smb.conf file. It is explained in the smb.conf man page.

shusko9 01-30-2010 11:59 AM

hi kforbus.... Yes I am sure I am in the right place. There are no more folders in ?etc/samba/, only files, and smbpasswd is located there. Something must have changed in samba since I last used it in 2008.

Hi catkin.... I'm not sure I know the necessity of needing the 'passdb backend' in the smb.conf file.. In old days my passwds were in /etc/samba/smbpasswd, which by the way is empty in my mandriva 2010 ( can't seem to be able to add them there), and full of sys users in 2008.
In my lan I try to keep it simple. I am the only user of all boxes, but just want to be able to copy files back and forth between boxes for backups, updates, etc.
When I re-installed the samba apps, I was wondering if the /etc/samba folder was also rebuilt??
There are obviously changes in the latest samba version, compared to 2008 ver.
I'm just not that smart to understand the full workings of samba explicity. All nuances. What I really need is a cookbook setup of samba 3.4.2 (smb.conf) to do simple server sharing with my own lan hosts, which are a mix of windoze and linux.. Thanks

catkin 01-30-2010 05:48 PM

Quote:

Originally Posted by shusko9 (Post 3846196)
hHi catkin.... I'm not sure I know the necessity of needing the 'passdb backend' in the smb.conf file.. In old days my passwds were in /etc/samba/smbpasswd, which by the way is empty in my mandriva 2010 ( can't seem to be able to add them there), and full of sys users in 2008.

It is possible that the smb.conf has a 'passdb backend' setting which means /etc/samba/smbpasswd is not where the password information is kept.

shusko9 01-31-2010 11:57 AM

hi again catkin...thanks for info, of which all is helpful... I looked in smb.conf, and there is a line for'passdb backend'. Icommented it out and added 'passdb backend = /etc/samba/smbpasswd' That didn't seem to make any difference. I did get a hint from craiglist/linux forums about permissions. So I checked all file permissions in the samba folders files, and lo and behold, the all were correct except the smb.conf file, which somehow got set to root/mshome, instead of root/root...I corrected that. Now I can create smbpasswd entries using "smbpasswd -a sugar' , however it does insert text into the smbpasswd file now, but incorrectly. I now get 'getsmbfilepwent: malformed password entry (no:), added user sugar, #.... looling at smbpasswd, I see that the first of the two 32 bit hex strings that are supposed to be there is xxx'd out.... Thoughy for a non-programmer, hehheh I'll keep looking around.. Thanks for the suggestions !!!!

Ateo 10-14-2012 01:02 PM

Quote:

Originally Posted by catkin (Post 3845705)
Check the setting of "passdb backend" in the smb.conf file. It is explained in the smb.conf man page.

Thanks. This fixed the issue....

This is what I added to smb.conf:

Code:

passdb backend = smbpasswd:/etc/samba/smbpasswd.db


All times are GMT -5. The time now is 07:07 AM.