Gentoo Forums
Gentoo Forums
Gentoo Forums
Quick Search: in
[solved] samba troubles with adding users
View unanswered posts
View posts from last 24 hours

 
Reply to topic    Gentoo Forums Forum Index Networking & Security
View previous topic :: View next topic  
Author Message
going_mad
n00b
n00b


Joined: 20 Sep 2003
Posts: 42

PostPosted: Wed Mar 16, 2005 11:27 am    Post subject: [solved] samba troubles with adding users Reply with quote

Hello!

something strange and never happened with other gentoo/samba installations:

emerged samba (the current ebuild in portage) as always, I can start it, testparm finds everything's ok. I can see the samba machine running from the client in the same domain network (MYDOMAIN).

when I try to add users or convert them from the unix list it fails. Obviously I cannot access the MYDOMAIN folders at all!

take a look:

Failed to convert user : /usr/bin/pdbedit failed :

Failed to open /var/lib/samba/private/secrets.tdb
Failed to open /var/lib/samba/private/secrets.tdb
pdb_generate_sam_sid: Failed to store generated machine SID.
PANIC: Could not generate a machine SID

BACKTRACE: 1 stack frames:
#0 /usr/bin/pdbedit(smb_panic2+0xff) [0x80a0d2f]

I also tried to use a smb.conf running in another machine, nothing changes.

I simply cannot add users, no way. If I try to delete secrets.tdb the system complains with a permission denied (I'm logged as root)

This is the working (in another machine) smb.conf:

[global]
workgroup = MYDOMAIN
interfaces = eth1
# bind interfaces only = Yes
# map to guest = Bad User
guest account = all
# default service = homes
# comment = Media files
valid users = user1, user2
# printer admin = @ntadmin, root, administrator

[homes]
# comment = Home Directories
# valid users = %S
# read only = No
# browseable = No

[user1]
guest ok = yes
writeable = yes
public = yes
path = /mnt/drive2/Media/movies/user1

[user2]
guest ok = yes
writeable = yes
public = yes
path = /mnt/drive2/Media/movies

Any hints to solve this?


Thanks for any help


G_M


Last edited by going_mad on Wed Apr 20, 2005 10:42 am; edited 1 time in total
Back to top
View user's profile Send private message
diastelo
Guru
Guru


Joined: 23 Feb 2004
Posts: 521

PostPosted: Wed Mar 16, 2005 7:36 pm    Post subject: Reply with quote

What use flags did you compile Samba with and what version do you have installed? Also, what version of GCC did you use and what architecture are you running?
_________________
"No question is so difficult to answer as that to which the answer is obvious" -- George Bernard Shaw
Back to top
View user's profile Send private message
going_mad
n00b
n00b


Joined: 20 Sep 2003
Posts: 42

PostPosted: Wed Mar 16, 2005 9:05 pm    Post subject: Reply with quote

These are the info you asked for:

samba ver.: 3.0.10
gcc ver. : 3.3.5-r1
USE flags; "-gtk -gnome qt kde dvd alsa cdr avi xmms samba java jpeg mozilla mysql x86"

cpu is an athlon xp
fs is reiserfs

everything else is working quite well, dunno what the hell is gojng on...

G_M
Back to top
View user's profile Send private message
diastelo
Guru
Guru


Joined: 23 Feb 2004
Posts: 521

PostPosted: Thu Mar 17, 2005 7:44 pm    Post subject: Reply with quote

Can you add the users manually with pdbedit itself? You should be able to find all the options to the tool in its man page. Try something like the following:

Code:
pdbedit -a -u username


If you really want to try deleting secrets.tdb, I'd try stopping smbd. It's possible that the file is in use or locked.

I don't have a secrets.tdb file over here to look at, but look for the program tdbdump and run it on the secrets.tdb file. You should check it against the secrets.tdb file on another machine that is working. Most of it should be readable.

I assume you are trying to authenticate against an LDAP server? I didn't see it included as a USE flag, but perhaps it should be.
_________________
"No question is so difficult to answer as that to which the answer is obvious" -- George Bernard Shaw
Back to top
View user's profile Send private message
going_mad
n00b
n00b


Joined: 20 Sep 2003
Posts: 42

PostPosted: Fri Mar 18, 2005 12:08 am    Post subject: Reply with quote

First of all thanks for your reply!

well, in the meanwhile I tried to unmerge samba, rename the /etc/samba directory to /etc/samba_old, then emerged samba with the USE flags found in http://www.gentoo.org/doc/en/quick-samba-howto.xml (and, yes, I also emerged clamav before samba)

USE="oav readline cups pam -python -ldap -kerberos -xml -acl -mysql libclamav" emerge net-fs/samba

everything seems ok, also testparm says so. but everything is all the same when trying to add users to samba. Same error.

pdbedit shows the same error as always and I cannot open secrets.tdb with tdbdump ("failed to open secrets.tdb")

Don't know if this is of interest but it takes a lot of time to access the /var/lib/samba and /var/lib/samba/private directories

G_M
Back to top
View user's profile Send private message
diastelo
Guru
Guru


Joined: 23 Feb 2004
Posts: 521

PostPosted: Fri Mar 18, 2005 5:29 pm    Post subject: Reply with quote

I'm afraid I might be at the end of any helpful information I can impart. Something is obviously broken, but I can't see where it might have happened. I'd recommend unmerging everything, deleting what you can, and starting over. After that, you might try backporting. I'll let you know if I come up with any ideas on my end. I wish you luck.
_________________
"No question is so difficult to answer as that to which the answer is obvious" -- George Bernard Shaw
Back to top
View user's profile Send private message
going_mad
n00b
n00b


Joined: 20 Sep 2003
Posts: 42

PostPosted: Wed Apr 20, 2005 10:44 am    Post subject: Reply with quote

Finally I found that the hard disk was corrupted! 8O

Other problems appeared and finally I had to change it with a new one.

G_M
Back to top
View user's profile Send private message
Display posts from previous:   
Reply to topic    Gentoo Forums Forum Index Networking & Security All times are GMT
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum