PDA

Bekijk de volledige versie : Samba replacement



Kruma
15-01-2007, 21:40
Is it even possible to replace default samba with opt ipkg somehow? I've tried that, but without success. Log reports problem with guest account:

[2007/01/15 18:03:43, 0] source/passdb/pdb_interface.c:guest_user_info(295)
guest_user_info: Unable to locate guest account [nobody]!

I wonder where the problem is. Any ideas?

back2basic
16-01-2007, 11:51
maybe you can try

ipkg install adduser

adduser nobody

Don't now for sure if its gonne work but i saw a packet called adduser

Grtz

Kruma
16-01-2007, 12:43
Yeah, absence of the guest account in /etc/passwd was the problem. I didn't expect this to be solved in such an easy way. Samba is running now (but still not set up properly, but it is just matter of time). I'm gonna to try to set it up in the evening and report any further problem. My aim is to fix the problems connected with workgroups in the original firmware (WL700 is not able to join any workgroup while being in USBA mode and it results in situation when PCs of the same workgroup as WL700 cannot see each other). Thanks for help.

costinel
16-01-2007, 18:32
Yeah, absence of the guest account in /etc/passwd was the problem. I didn't expect this to be solved in such an easy way. Samba is running now (but still not set up properly, but it is just matter of time). I'm gonna to try to set it up in the evening and report any further problem. My aim is to fix the problems connected with workgroups in the original firmware (WL700 is not able to join any workgroup while being in USBA mode and it results in situation when PCs of the same workgroup as WL700 cannot see each other). Thanks for help.

make a copy of smb.conf, as the original gets rewritten when you change settings via the web interface
change the following (in the copy):

map to guest = bad password
to
map to guest = bad user

also make sure you have

domain master = yes
preferred master = yes
local master = yes

(but only if there are no other windows DOMAIN CONTROLLERS on the network! - if you don't know what a dc is and use it on a home network then probably you don't have a dc on the network)

put something like cp /my/modified/smb.conf /tmp/samba/smb.conf in rc.local - note: i don't remember the exact smb.conf location because the damn box is pretty fucked right now...

Kruma
16-01-2007, 19:16
That's it! Now samba works perfectly and joins the workgroup (and remains there, what is crucial). Many thanks for helping me! Only thing remaining I'd like to change. I need to set all the users up using command like this:


smbpasswd -a User

- and then set the password manually which is not much ellegant.

Is there any way to get user accounts from /etc/passwd automatically and and make samba use it?

costinel
16-01-2007, 21:05
That's it! Now samba works perfectly and joins the workgroup (and remains there, what is crucial). Many thanks for helping me! Only thing remaining I'd like to change. I need to set all the users up using command like this:


smbpasswd -a User

- and then set the password manually which is not much ellegant.

Is there any way to get user accounts from /etc/passwd automatically and and make samba use it?

i don't remember if the smbpasswd command is available... but i believe that the web interface should call smbpasswd to change passwords directly to some file. check on smb.conf for the 'passdb backend' directive. if it's missing, try to use strings on the smbd binary and grep for 'passdb'
from the smb.conf man page:
Available backends can include:

· smbpasswd - The default smbpasswd backend. Takes a path to the smbpasswd file as an optional argument.

· tdbsam - The TDB based password storage backend. Takes a path to the TDB as an optional argument (defaults to passdb.tdb in the private directory.
[...]
Default: passdb backend = smbpasswd

Kruma
18-01-2007, 15:23
Precisely. I have found out that it's best to keep backend settings on default. Smbpasswd is default and thus also available.

hal2k1
19-01-2007, 14:01
Yeah, absence of the guest account in /etc/passwd was the problem. I didn't expect this to be solved in such an easy way. Samba is running now (but still not set up properly, but it is just matter of time). I'm gonna to try to set it up in the evening and report any further problem. My aim is to fix the problems connected with workgroups in the original firmware (WL700 is not able to join any workgroup while being in USBA mode and it results in situation when PCs of the same workgroup as WL700 cannot see each other). Thanks for help.

I installed optware samba and adduser but I got some warnings. I added an account "nobody", and that seemed to work.

However, when I tried to start the optware smbd daemon, I got a segfault.

Do I need to add an account "guest" as well?

Kruma
20-01-2007, 09:31
It depends on [global] settings in /opt/etc/samba/smbd.conf. Samba supports two access modes:

security = user or share.

My experience is that when security is se to "share" samba requires guest account written in /etc/passwd. There is another setting connected with this issue:

guest account = guest

You cas specify here the name of guest account. I expect you use share mode, so try setting "nobody" as guest account.

hal2k1
21-01-2007, 09:55
It depends on [global] settings in /opt/etc/samba/smbd.conf. Samba supports two access modes:

security = user or share.

My experience is that when security is se to "share" samba requires guest account written in /etc/passwd. There is another setting connected with this issue:

guest account = guest

You cas specify here the name of guest account. I expect you use share mode, so try setting "nobody" as guest account.

Thankyou, but this did not help. I created both "guest" and "nobody" accounts, and I chnaged security to "share" as I originally had "user".

No combination of these experiments worked. Segfault every time.

I have given up on optware samba.

In any event, the problem I was having had to do with samba "mount.cifs" on my Linux client machines ... and I doubt that the optware samba would have changed that anyway. Windows client machines were fine. I have since switched the Linux clients to use NFS, and all is fine with the Asus samba implementation.