My First Linux Server (Part II)

Wednesday Jun 2nd 2004 by Drew Robb

Using Linux to build a file server isn't all that difficult — honest. We'll walk you through the steps

A file server is a specialized PC that holds large numbers of files that many people on a network can access. It "serves up" files to everyone instead of each person having files on his or her own PC. The good news is that you don't have to be a network guru to set up a basic file server. If you followed the Easy Linux Install steps in Part 1, you are ready to set up a Linux PC as a file server.

While there are many ways to set up a network and a server, this article concentrates on the simplest approaches with the highest chance of quick success.

Reminder: Network Card
Your Linux platform must connect to the network with a NIC, or Ethernet adapter.

Step 1: Open Windows
The Linux file server process starts on the Windows side. Work on only one Windows PC at first. Once you get one Windows PC talking to your Linux file server, you can add more PCs, but for now, let's keep things simple and start with one Windows PC.

Note that networking goes easier if the user ID and password on the Windows side are the same those used on the Linux side. Open the Windows Control Panel and click on User Accounts to set up a user account with ID and password identical to a Linux user. Unfortunately, we have to get a little technical here in order to find the Internet Protocol (IP) address for the Windows PC on the network and some other required information. Click on the Start button on the bottom left of the screen, then All Programs, Accessories and Command Prompt. Type in this command: C:\> ipconfig /all. This let's you see a list of network information. Write down the details it provides for:

  • IP Address
  • Subnet Mask
  • Host name
You don't need to know what all this means as long as you jot down this information. You will need it later in the process.

Step 2: Open Linux
To keep things simple, we refer only to SuSE Linux 9.0 because of its easy-to-use YaST (Yet another Setup Tool) Control Center graphical utilities. Red Hat Linux users can follow the same general process and go to the references listed at the end of this article.

Start by opening up the SuSE YaST Control Center (YaST = Yet another Setup Tool) graphic utility. Do the following:

  1. Turn off all the servers and clients and the firewall.Just open each of the server icons, and if the server program is running, disable it.
  2. Add the Windows PC to the Host Names utility list. Hosts are computers on the network.
  3. Open the Samba Server icon. Samba is the Linux program that makes your Windows network think your Linux PC is just another Windows PC, so you can share files over the network. The Samba Server Tool is a series of screens that help you set up the file server. Most of the choices are obvious. Make the following selections as you go through the screens.

  • Enable the Samba Server
  • Sharing Type: Select File and printer sharing.
  • Workgroup: Add the name of your Microsoft Windows Network workgroup
  • Authentication Details: Choose Authentication Back-End = smbpasswd.
  • Share Homes to allow sharing of home directories, but do not select Share Printers (yes, Samba is good for print servers too, but let's not worry about that at the moment for the sake of simplicity).
  • Shared Directories: Create the shared directories you want to see on the Windows network.

Test 1: Can You See Me Now?
After completing the Samba Server setup, you should be able to see the Linux PC on the Windows network. On your Windows PC desktop, open the Network Places icon and see if the Linux PC is listed anywhere in the workgroup. (Network Places is usually on the desktop. If not, open the Control Panel and go into Network and Internet Connections, and you'll find it somewhere on the left). The Linux PC should now be listed. Click on the Linux PC to open it.

At this point you should get a Login box asking for your Linux logon user ID and password. Inside the Linux PC, you should see the shared directory. If you don't see all this, you may need to dig a bit deeper to find out what is happening. Refer to the tips at the end of this article if things get complicated at this point. But let's assume that all went as planned.

Test 2: Can You Read Me?
On the Linux machine, write a small test file into the Linux shared directory. Then go back to the Windows PC and see if the new file is listed in the directory share.

Test 3: Can You Write Me?
Try to copy a small file from a Windows directory into the Linux directory share. Go to the Linux PC and see if the test file arrived.

Success is Sweet
If you can write and read files, your file-sharing server is alive and well and properly installed on the network. Congratulations and add another notch to your Linux belt. Next you need to add the rest of your Windows clients — one by one:

  • Create user accounts on Windows and Linux as needed. Remember that you need identical IDs and passwords on each side. Use the YaST Control Center utility called Edit and Create Users.
  • Create shared directories for each user.
  • Move the files you want to share onto the server.

Once you have mastered these steps, make sure you learn as much as you can about strengthening network security. Samba and SuSE Linux can provide higher-security methods that you should probably adopt, but that goes well beyond that scope of this article.

Troubleshooting Tips
If you have trouble accessing the Linux PC over the network, these tips may help:

  • Try manually setting the Read, Write and File Sharing permissions on your shared Linux directories.
  • The /usr/share/doc directory has huge stacks of documentation. Make a point of reading /usr/share/doc/packages/samba/examples/smb.conf.SuSE. This file helps explain the Samba Server.

Samba help is available at O'Reilly Books and at the official Samba organization. Red Hat 9.0 Linux users can refer to the following books: Red Hat Linux Networking and System Administration by T. Collings and K. Wall and Red Hat Linux 9 Unleashed by B. Ball and H. Duff — both available at

Do you have a comment or question about this article or other small business topics in general? Speak out in the Forums. Join the discussion today!
Mobile Site | Full Site
Copyright 2017 © QuinStreet Inc. All Rights Reserved