On a network of just Windows machines, connecting to file shares is a fairly easy process: just click on the “My Network” or “Network Neighborhood” icon, click on a nearby server or workstation with a file share, and away you go.
However, on a network of Linux and Windows machines, connecting a Linux box to a Windows server can still require some manual configuration to get file sharing between the two operating systems working just the way you want it to.
KDE 3.x has some nice, built-in, multi-protocol network browsing features, but, unfortunately, chances are that your Linux distribution doesn’t enable or configure those features automatically. So, this month, let’s dive into KDE and get connected.
For the purposes of this article I’m going to assume you have a distribution with KDE 3.2 (such as Fedora Core 2 or SuSE 9.1), but if you’re using a really new distribution (like Fedora Core 3 or SuSE 9.2) that ships with KDE 3.3, the instructions presented here should suffice, albeit with very minor changes.
The first thing you want to do is make sure the SAMBA (Windows networking services) and LISa (network browsing service) packages are installed on your computer. To verify this, pull up Konqueror as root and change to the /etc/init.d/ directory. If you see files named smb and lisa, you’re good to go.
If not, use your distribution’s package management tool to install the latest SAMBA and LISa to your computer. On Fedora Core 2, if you install KDE, LISa is installed by default and SAMBA is installed if you pick “Windows Networking” during the install process. However, if you forgot to choose the latter option, just type…
# yum install samba
… from the shell prompt while logged in as root to install SAMBA.
If you distribution uses APT, you may need to run…
# apt-get install samba
# apt-get install lisa
… to get those packages working.
Once you’ve verified that SAMBA and LISa are on your machine, turn those services on. In Fedora Core 2’s KDE, pick “System Settings, Server Settings, Services” to open the “Service Configuration” dialog. On the left side of the application window is a long list of services that automatically start whenever the system boots up. Enable lisa and smb to turn on LISa and SAMBA, respectively. Click on “File” and then “Save Changes,” and you’re done.
The next thing to do is open the KDE Control Center. In Fedora Core 2, that’s under “Preferences, Control Center.” Once Control Center is up, select “Internet& Network, Local Network Browsing.”
The first tab in the “Local Network Browsing” dialog is “Windows Shares.” This is where you set the default user name and password used to log into remote Windows shares, and where you set the default Windows workgroup. You must know the correct values for all three fields, otherwise you won’t have the proper credentials to browse shares on remote Windows machines. (On most home networks, the default Windows workgroup is called simply WORKGROUP.)
For the “MS Windows Encoding” settings, I tend to just pick ISO 8859-1, “Western European.” In fact, this setting is only pertinent to Unicode machines running foreign language versions of Windows anyway, so for the most part, the setting is ignored by “English-speaking” Windows.
The second tab, “LISa Daemon,” also needs to be configured. First, enable both the Send NetBIOS Broadcasts using nmblookup and Send pings(ICMP echo packets). For the “Send pings” entry box, type in the IP address range of your local network. If you’re at home using a residential gateway router of some type, such as a Linksys or Netgear unit, chances are that the range is either 192.168.0.0 or 192.168.1.0. If you’re using a network at work, verify the subnet IP range that LISa should scan with your network administrator.
Pulling up a terminal shell as root and typing ifconfig eth0 should tell you what your current IP address is. Here’s an example:
eth0 Link encap:Ethernet HWaddr 00:0A:E4:24:0E:27
inet addr:192.168.0.100 Bcast:192.168.0.255 Mask:255.255.255.0
inet6 addr: fe80::20a:e4ff:fe24:e27/64 Scope:Link
UP BROADCAST RUNNING MULTICAST MTU:1500 Metric:1
RX packets:62655 errors:0 dropped:0 overruns:0 frame:0
TX packets:75179 errors:0 dropped:0 overruns:0 carrier:0
RX bytes:52661200 (50.2 Mb) TX bytes:9590599 (9.1 Mb)
The line that says inet addr:192.168.0.100 Bcast:192.168.0.255 Mask:255.255.255.0 is the IP address, broadcast address, and subnet mask, in that order. If your machine had those addresses, you’d plug in 192.168.0.0/255.255.255.0 for the “Send pings” entry box and 192.168.0.255/255.255.255.0 for the broadcast network address. (On Class C networks, the broadcast address is always .255. For the “Trusted IP addresses” entry box, you can enter 192.168.0.0/255.255.255.0, which is the same range I entered in the “Send pings” dialog.
In the next tab, “ResLISa Daemon,” enable Send NetBIOS broadcasts during nmblookup and verify that “Trusted network addresses” is set the same as it is for the previous tab. And in the final tab, “lan://& rlan://,” set all of the service links shown in “Check Avaliability.”
After making any change in each tab, hit the “Apply” button so the changes take effect.
Ready, Set, Start, Ready, Set, Go
Ready to start browsing your network? Not so fast. Although all of the services have been to configured to start after reboot, they might not actually be running yet. So, become root and type in the following:
# B<./smb restart>
You should get output like the following:
Shutting down SMB services: [ OK ]
Shutting down NMB services: [ OK ]
Starting SMB services: [ OK ]
Starting NMB services: [ OK ]
As long as you get OK for the latter two lines, you’re good to go.
Next, issue the command to restart the LISa daemon:
# B<./lisa restart>
You should get the following output:
Stopping LISa: [ OK ]
Starting LISa: [ OK ]
Your machine should now be configured to do network browsing. Pull up an instance of Konqueror, select “LAN Browser” on the left, and it should display the list of hosts that LISa has found on the network with browsable shares and services. Drill down into one of the hosts, click “SMB” and you should see all of the Windows file shares on that machine. Choose one or more of those to manipulate files and directories.
See, that wasn’t too bad, was it? Give yourself a nice pat on the back for a job well done.
Jason Perlow is a geek and gastronomer and founder of eGullet.com. You can reach Jason at