PDA

View Full Version : Samba driving me crazy!!!


Helker
2007-12-21, 08:13 PM CST
I cannot stand it anymore...

I am trying to share two folders with some Windows XP machines.

I can see the shares, but I cannot access them. That is driving me crazy... When I try to access the share it asks for a "guest" password, but it does not allow me to access it no matter what...

It seems that the access to the shares is always denied... I tried everything...

All I need is to access those two folders, no login whatsoever... just open the folder and write to it...

scottro
2007-12-21, 08:21 PM CST
I'm going to put up a page on this soon, but the basic problems in order of occurrence seem to be firewall, selinux, not adding the Windows username and password to smbpasswd and not having nmb running.

You can test the first by doing /etc/init.d/iptables stop and seeing if you're able to connect.
Test the second by doing setenforce 0 and seeing if you can connect. (This is assuming that you have both iptables and selinux going.) As for selinux, the setenforce 0 can be tricky, you might want to edit /etc/sysconfig/selinux, set it to disable and reboot.

The third you should know if you did it or not. Tricky part is that if you have a user john on the Linux box with a password of 1234 and john on the Windows box with password 2345, john won't be able to connect from Windows. Actually, even if his password is 1234 on Windows, he might not be able to connect until you add him to the samba password database.

smbpasswd -a -u john
You're then asked to provide a password for john. Give him the one that he uses on the Windows box.

As for nmb you can check with pgrep nmb. If you get nothing back start it,
/etc/init.d/nmb.

If all of the above don't help, in /usr/share/doc/samba-version-number, there's a HOWTO.pdf. It has a section on troubleshooting which gives you several tests and suggested solutions.

Helker
2007-12-21, 08:29 PM CST
I'm going to put up a page on this soon, but the basic problems in order of occurrence seem to be firewall, selinux, not adding the Windows username and password to smbpasswd and not having nmb running.

You can test the first by doing /etc/init.d/iptables stop and seeing if you're able to connect.
Test the second by doing setenforce 0 and seeing if you can connect. (This is assuming that you have both iptables and selinux going.) As for selinux, the setenforce 0 can be tricky, you might want to edit /etc/sysconfig/selinux, set it to disable and reboot.

The third you should know if you did it or not. Tricky part is that if you have a user john on the Linux box with a password of 1234 and john on the Windows box with password 2345, john won't be able to connect from Windows. Actually, even if his password is 1234 on Windows, he might not be able to connect until you add him to the samba password database.

smbpasswd -a -u john
You're then asked to provide a password for john. Give him the one that he uses on the Windows box.

As for nmb you can check with pgrep nmb. If you get nothing back start it,
/etc/init.d/nmb.

If all of the above don't help, in /usr/share/doc/samba-version-number, there's a HOWTO.pdf. It has a section on troubleshooting which gives you several tests and suggested solutions.


Thank you for your reply...

I need someone to help me stay sane :p

Let's see...

IPTABLES:
[root@genefights ~]# service iptables status
Firewall is stopped.

SELINUX: I used the command you told me, so I assume it is disabled...

USERS: Window user, Linux user, and Samba user -> same name and same password

...

darn...

Ok, I had to actually ENABLE the samba user to make it work...

[root@genefights samba]# smbpasswd -e stefano
New SMB password:
Retype new SMB password:
Enabled user stefano.


cool...

Thank you a lot... I was going to throw the server out of the window :p