Accessing a Linux share from within Windows

If like me, you had trouble accessing linux shares from within Windows, then read on.

Assumption: It is assumed that Samba has been installed on your system, and that smb.conf reflects a shared folder in Linux (see this HOWTO for instructions on this)

Diagnosis: Windows is able to detect the Linux machine name and display it in
My Network Places -> Entire Network -> Microsoft Windows Network -> WkgpName -> Linux_box_name
but is unable to browse your shared files. It gives the error ‘The network name was not found’ when attempting to browse.

Fix: First verify that Samba has been installed on your system. Open a console and type rpm -qa | grep samba. It should appear something like this…

[rohan@crimson ~]$ rpm -qa | grep samba system-config-samba-1.2.31-1 samba-common-3.0.14a-2 samba-3.0.14a-2 samba-client-3.0.14a-2

If this is all in order, then we can proceed to the next step.
In order to rectify this situation, modifications need to be made to the Linux firewall to allow Netbios and RPC calls through to the Linux samba server. To do this we need to open a few ports. If you have Fedora Core, then the easiest way to accomplish this is to go to System Settings -> Security Level. In other ports, add “137:udp, 138:udp, 139:tcp, 445:tcp” (sans quotes). This will open these ports to allow samba to pass data between machines on these ports. You should be in business now!

There are other ways, such as editing iptables directly or through /sbin/iptables.

To do this via command line, use a command such as

IPTABLES -A INPUT -p tcp -s 190.200.5.51 --dport 137:139 -j ACCEPT

Leave a Reply

Your email address will not be published. Required fields are marked *