Results 1 to 1 of 1
Hey everyone! I'm semi-new to Linux. I just felt compelled to post on here how I got Samba to work properly with XP, because it took me like 5 hours ...
- 04-07-2009 #1Just Joined!
- Join Date
- Apr 2009
- Posts
- 1
Getting Samba to work with XP (Red Hat Fedora Core 2)
Hey everyone! I'm semi-new to Linux. I just felt compelled to post on here how I got Samba to work properly with XP, because it took me like 5 hours to figure this out a few nights ago. Hopefully this post will spare at least one person the frustration.

After hours and hours of re-editing smb.conf with different settings I found a post somewhere that mentioned the built-in firewall in Fedora Core 2 (which I assume is found in many other distros). By default the firewall is locked up pretty tight. I had to open up UDP ports 137 & 138 and TCP ports 139 & 445. Here are the lines you need to add to the file /etc/sysconfig/iptables
-A RH-Firewall-1-INPUT -p udp -m udp --dport 137 -j ACCEPT
-A RH-Firewall-1-INPUT -p udp -m 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 here is a copy of my functioning smb.conf
[global]
workgroup = mshome
netbios name = samba
socket options = TCP_NODELAY
encrypt passwords = yes
[share] /br
path = /share
writeable = yes
guest ok = yes
browseable = yes
Anyone who is stumped that runs across this probably already knows but don't forget. You must also have a user/pwd setup in Linux that matches your Windows user/pwd exactly. Then you need to use the smbpasswd command to add that user to Samba (command and example output):
[root@name root]# smbpasswd -a <username>
New SMB password: *******
Retype new SMB password: *******
Added user <username>
Cheers!
~crookward~
P.S. If anyone is bored, could you please explain to me all those switches and commands in the iptables config file?
-A RH-Firewall-1-INPUT -m state --state NEW -m tcp -p tcp --dport 139 -j ACCEPT


Reply With Quote