|
Sams Teach Yourself Samba in 24 Hours |
||||||||||||||||||||||||||
|
Hour 4: Installing and Testing the Configuration |
||||||||||||||||||||||||||
|
During this hour, I'll walk through the preparation, configuration, and installation of a sample Samba server.
Imagine that my boss gives me the following orders:
Problem:
"I need three things from you by lunchtime. First, I need some way to be able to share documents and project spreadsheets with Joe Underling down the hall. Second, my PC crashes all the time. This tape thingy-ma-watchit takes too long to reload all my important documents. I need a better way to protect my files. And finally, I need to be able to print to my secretary's printer located outside my office."
Scenario 1:
"Hmmm...," I think. "Both machines are networked. I could set up an FTP server to solve the document-sharing problem. Because I'm thinking about using FTP, I could also show my boss how to upload all her files to a disk on the server. That would be faster than a tape drive. To connect her PC to the printer, I guess I could get an automatic switcher box and run a long parallel cable up and over the wall to the secretary's desk. Oops. Too long for parallel. I guess I could use a serial cable. Nope. That would be too slow." Suddenly I walk away thinking I should start updating my résumé.
Scenario 2:
The first thing I do is make a note that all three PCs in question--the boss's, Joe's, and the secretary's--are connected to the local network. Next I go to my office and dig around for an external network interface box for the printer. Found it! Now I connect the printer to the network. The next thing to do is log in to my Linux box that I set up yesterday using my copy of Sams Teach Yourself Linux in 24 Hours. I've already downloaded and compiled the latest Samba source code over my morning cup of coffee (black, no sugar or cream).
Now I create a simple configuration file for Samba. First, I create a home directory on the server for the boss to store her precious files. Then I create a share that's accessible by Joe Underling and my boss so they can share documents. Finally, I create a share for the secretary's printer and head off to show the boss how to use it all.
After I mount the two shares on the boss's computer and show her how to access files on it, I print a sample test page to double-check the printer. The boss is so happy she doesn't have to learn anything new (other than to remember that there's an H: and a G: drive, for Home and Group respectively) that I get the rest of the week off and a raise!
Perhaps my account of my plight and victory is a little exaggerated, but you never know. It could happen!
What I'll do for the remaining sections in this hour is to walk you through the steps for configuring Samba to implement the solution described in scenario 2. The remarks regarding Linux were made only as an example. The solution will work as long as Samba will compile under the server's OS.
Figure 4.1 illustrates the access that each user will require. The dotted lines depict access by the secretary, the dashed lines represent my boss, and the solid lines are associated with Joe Underling. Thus the secretary should have access only to the shared printer, Joe should have access to the printer and the group network drive, and my boss should have access to both of the previous resources in addition to her home directory.
Figure
4.1
Samba solution to implement (a) a group share, (b) home directories, and (c) network printing.
If you remember from Hour 3, "Obtaining the Latest Source," I said that a Samba server comprises two main binaries. The first is smbd, normally located in /usr/local/samba/bin. smbd handles the file and print service requests. The second binary, nmbd, is normally located in the same directory as smbd. nmbd handles NetBIOS name service requests and network browsing functions.
|
Sams Teach Yourself Samba in 24 Hours |
||||||||||||||||||||||||||
|
Hour 4: Installing and Testing the Configuration |
||||||||||||||||||||||||||
|
© Copyright Macmillan USA. All rights reserved.