Networking Linux
You can do a lot with a single computer, but computers don't get really useful until you start
connecting them together into networks. Networked computers can share resources like files and
printers. This makes it easier for groups of people to work together and makes their networked
computers far more productive than stand-alone computers could be. If, like me, you are coming to
Linux from a Windows environment, you are probably already familiar with the way computers running
Windows can be networked together to share files and printers. Well Linux can do it too. In fact,
Linux can fit right into your existing Windows-based network. This really helps ease the transition
to Linux since you can still access all your existing work and resources on your Linux machines, and
your Windows machines will be able to access all the new resources of your Linux machines.
An in-depth discussion of networking is beyond the scope of this web site. There are literally
hundreds of good books and online resources to help you. Here I am simply going to describe how to
connect your Linux computer to a simple network with several Windows based machines and share
resources among them. I am going to use my own home network as an example.
I have three computers in my home office. They are all named after characters in the Bloom County
comic strip. They are: Steve_Dallas, Bill and Opus. They are all part of the Windows workgroup
called of course
BLOOMCTY. Before I began experimenting with Linux, these computers all ran various flavors of
Windows and were networked so they could share files and my one printer. Steve_Dallas and Bill both
ran Windows 98se. Opus ran Windows 2000. They all share a high speed internet connection and talk
to each other through a
Linksys four port router. The printer is Connected to Steve_Dallas. A diagram of my network
setup is below.

My home office network
When I decided to start experimenting with Linux, I first installed it on Opus and configured it to
dual boot with the existing Windows 2000 operating system, (see Installing
Linux for information on how to do this), so that I could continue using the computer like
normal while learning Linux. It wasn't long after I began using Linux that I wished
for the file and print sharing capabilities of Windows. So I decided to figure out how to add Opus
back into my home network without having to boot into Windows.
Samba to the rescue
There is a utility called Samba which allows Linux machines to join SMB networks (SMB is the network
protocol used by Windows). Samba is fairly complex and a reference book like one of the two on the
left could be of great help to a novice.
Samba should have been installed when you installed Linux if you followed my installation
instructions. If not then you can install it now using the Packages tool. Just check the Windows
File Server box and then click the Update button.
Once Samba is installed, you need to configure it. This means editing the samba.conf file. This
file tells samba how to connect to your SMB network and what files, directories, printers, etc., are
to be shared with other users on the network. Getting samba.conf just right can be tough. Whole
books have been written on how to do it. Editing it by hand can be amazingly frustrating. However,
There is a tool that can help you. You can configure the samba.conf file using the Samba Web
Administration Tool, or SWAT for short. SWAT is basically a graphical, web-based tool to help you
edit the configuration file for Samba. It simplifies the process and guarantees the end product will
have correct syntax. Swat is included in the Redhat 8.0 distribution, but it isn't
installed with samba for some strange reason. Also, I had trouble installing the SWAT rpm that came
with the distribution. So I went to rpmfind.net
and downloaded the latest version of SWAT. It then installed with no problem.
To use SWAT, open a web browser and type localhost:901 into the location bar.
You will be asked for a user name and password. Enter "root" for the user name and enter your
root password. Then the SWAT configuration screen will come up. (If you get an error message
instead of the login screen, then SWAT probably isn't running for some reason. Try starting it up
from the Services tool.)

The SWAT main screen
Once you have SWAT up and running, you can begin to define what resources on your computer are to be
shared across the network. To do this we need to define:
#1. Some Global rules on how things are shared.
#2. Which specific items are Shared and any rules specific to that share.
Not surprisingly, SWAT has screens labeled Globals and Shares
for just this reason. Click on the Globals tab at the top to bring up the
Globals screen.

Screenshot of SWAT's Globals screen.
Now my goal here is to get my computer back on my home network and share files and printers just
like it does under Windows. So my first step is to make the computer show up as a member of my
workgroup. As you can see I have filled in the workgroup name and the name I want the computer
to show up as in the workgroup (enter your own values here). A couple of other things need to be
set here too. Set security to SHARE and encrypt passwords
to yes. The computer will now show up as a member of the BLOOMCTY workgroup under
the name OPUS. Click the Commit Changes button at the top of the screen before
moving on.
Now if we click on the Status tab and stop then restart both smbd and nmbd, the computer will show up
in the BLOOMCTY work group as OPUS (no need to reboot like in Windows).

This is the Samba status screen in SWAT. The smbd and nmbd daemons need to be stopped and restarted
after making changes to your samba.conf file before those changes will take effect.

Opus now shows up in the Network Neighborhood on the Windows machines in the network.
So now the computer shows up in the workgroup when we look in the Network Neighborhood on one of
the Windows machines, but it isn't yet sharing any of its resources. Suppose I want to be able to
access all the files and folders in my home directory on the Linux machine from any of the Windows
machines. That's accomplished easily enough. I just need to share the home directories of the users
over the network. I'll just click on the Shares tab. In the
Share Name window I'll type homes, then click he Create Share
button. In the form that comes up I'll make the following entries:
comment = Home Directories
read only = No
create mask = 0750

The SWAT Share Parameters screen.
Remember to click the Commit Changes button at the top of the screen when done.
Now I need to go back to the Status screen and stop and restart smbd and nmbd
again. Now when I
logon to one of the Windows machines using the user name and password of my account on the Linux
machine, I'll be able to see my home directory in the Network Neighborhood. I can now drag and drop
files or even map it as a network drive on the Windows machine if I so desire. Simple, yes?
As another example of how to use SWAT, there is a directory on Opus that has several hundred MP3 files
on it. I want to be able to access them from the other computers on the network. I already have
this set up under Windows. But when I boot Opus into Linux, (It is dual boot remember), the
directory disappears from the network. Sharing that directory is also quite simple. First I go
back to the Shares screen and create a share called mp3 and fill in the following values:
comment = MP3 files
path = /mp3
guest ok = Yes
Remember to commit the changes and then stop and restart the smbd and nmbd daemons.
And now I can access my MP3 collection from any machine on the network again. The music makes work
go a lot easier.
These couple of simple examples hardly scratch the surface of what samba is capable of. It is a very
powerful tool.
Now, how about accessing the resources on your windows machines from your Linux box? Well, you can
access those resources by typing cryptic commands into the console screen (I'll leave figuring that
out as an exercise for the reader). But we spoiled Windows people are just too used to accessing
network resources with point and click ease. Fortunately, there is a tool called LinNeighborhood
that you can download and install (for free of course) that gives Linux the equivalent of the
Windows "Network Neighborhood" window. You can download LinNeighborhood at:
http://www.bnro.de/~schmidjo/
Below is a screenshot of LinNeighborhood in action showing the all the computers on my home
network. You can click on a computer and see which resources it is offering to share. You can
then mount them on your Linux system with a click of a button.

Screenshot of LinNeighborhood in action.
This is just the briefest introduction to networking in Linux. Just enough to get you started and
whet your appetite to learn more.