LinuxQuestions.org
Support LQ: Use code LQ3 and save $3 on Domain Registration
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Server
User Name
Password
Linux - Server This forum is for the discussion of Linux Software used in a server related context.

Notices

Reply
 
Search this Thread
Old 01-29-2010, 04:57 PM   #1
shusko9
LQ Newbie
 
Registered: Jan 2005
Location: endless mts.of pa.
Distribution: 10.0 official
Posts: 10

Rep: Reputation: 0
Question 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.
 
Old 01-29-2010, 10:15 PM   #2
kforbus
Member
 
Registered: Sep 2009
Location: Maryland
Distribution: Slackware
Posts: 68

Rep: Reputation: 28
Quote:
Originally Posted by shusko9 View Post
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/.
 
Old 01-30-2010, 12:51 AM   #3
catkin
LQ 5k Club
 
Registered: Dec 2008
Location: Tamil Nadu, India
Distribution: Servers: Debian Squeeze and Wheezy. Desktop: Slackware64 14.0. Netbook: Slackware 13.37
Posts: 8,524
Blog Entries: 27

Rep: Reputation: 1175Reputation: 1175Reputation: 1175Reputation: 1175Reputation: 1175Reputation: 1175Reputation: 1175Reputation: 1175Reputation: 1175
Check the setting of "passdb backend" in the smb.conf file. It is explained in the smb.conf man page.
 
1 members found this post helpful.
Old 01-30-2010, 10:59 AM   #4
shusko9
LQ Newbie
 
Registered: Jan 2005
Location: endless mts.of pa.
Distribution: 10.0 official
Posts: 10

Original Poster
Rep: Reputation: 0
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
 
Old 01-30-2010, 04:48 PM   #5
catkin
LQ 5k Club
 
Registered: Dec 2008
Location: Tamil Nadu, India
Distribution: Servers: Debian Squeeze and Wheezy. Desktop: Slackware64 14.0. Netbook: Slackware 13.37
Posts: 8,524
Blog Entries: 27

Rep: Reputation: 1175Reputation: 1175Reputation: 1175Reputation: 1175Reputation: 1175Reputation: 1175Reputation: 1175Reputation: 1175Reputation: 1175
Quote:
Originally Posted by shusko9 View Post
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.
 
Old 01-31-2010, 10:57 AM   #6
shusko9
LQ Newbie
 
Registered: Jan 2005
Location: endless mts.of pa.
Distribution: 10.0 official
Posts: 10

Original Poster
Rep: Reputation: 0
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 !!!!
 
Old 10-14-2012, 12:02 PM   #7
Ateo
Member
 
Registered: Sep 2004
Location: http://longbeach.ca.u$
Distribution: Ubuntu,Gentoo, OSX
Posts: 136

Rep: Reputation: 15
Quote:
Originally Posted by catkin View Post
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
 
  


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
SAMBA - smbpasswd not working !! the_reen Linux - Networking 2 06-16-2012 03:51 PM
Samba smbpasswd file missing Amy84 Linux - Newbie 6 03-15-2011 08:36 AM
adding users using smbpasswd, or synchronise passwd/smbpasswd gyodai Linux - Networking 2 03-11-2009 02:47 PM
[Samba] Synching /etc/passwd with smbpasswd Dmulec Linux - Newbie 4 11-10-2008 08:59 AM
ctime of /etc/samba/smbpasswd different ddaas Linux - Security 0 07-04-2005 01:42 AM


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

Main Menu
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
identi.ca: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration