samba followup (troubleshooting)
Sunday 29th April 2007 07:35 PM
Just a follow up from my previous samba article... have uncovered some interesting / weird errors.
I could get my samba shares to display just fine, but they would not open under windows xp (continually showed me a login box, or told me they were not available). Turns out SElinux was causing this to happen. I monitored the samba error log (tail -f /var/logs/samba/smbd.log) and was getting "/mnt/webdev does not exist or permission denied when connecting to [webdev] error was permission denied". To fix, simply type setenforce 0 and with any luck things will start working!
Another few things to look out for... make sure ports 137, 138, 139 and 445 are open, if not...
# nano /etc/sysconfig/iptables
Add these lines...
-A RH-Firewall-1-INPUT -m state --state NEW -m udp -p udp --dport 137 -j ACCEPT
-A RH-Firewall-1-INPUT -m state --state NEW -m udp -p udp --dport 138 -j ACCEPT
-A RH-Firewall-1-INPUT -m state --state NEW -m tcp -p tcp --dport 139 -j ACCEPT
-A RH-Firewall-1-INPUT -m state --state NEW -m tcp -p tcp --dport 445 -j ACCEPT
and restart iptables
# /etc/init.d/iptables restart
Another thing you can try is adding this line to your smb.conf file (under the global heading):
smb ports = 139
I was finding that I was getting a million error messages in the samba error log before I added that.
Ensure that you can ping your windows box from your linux machine my hostname, ie:
# ping desktop2 -c 3
Should be successful, if not there is a name resolution issue - you can try manually adding your machine to the hosts file...
# nano /etc/hosts
add (where xxx.... is your desktop machines ip address):
xxx.xxx.xxx.xxx desktop2
Comments on this article:
Add Comment: