|
Sams Teach Yourself Samba in 24 Hours |
|||||||||||||||||||||||
|
Hour 7: File Sharing |
|||||||||||||||||||||||
|
by Richard Sharpe
In Hours 5, "The smb.conf File: Telling Samba What to Do," and 6, "Security Levels and Passwords," you looked at the basic format of the smb.conf file, security levels, and password handling parameters. Samba is designed to enable you to share files between machines and that is what you will explore now.
File sharing enables you to share files between machines, shown in Figure 7.1. Usually, a file server contains more disk space than any of the client workstations (Windows for Workgroups, Windows 95/98, Windows NT, and so on) that can use the server. The server can also have most of the printers connected to it, but I will leave a more complete discussion of printing until the next hour.
Figure
7.1
A file server sharing files and printers.
In this hour you'll go through all the steps necessary to set up file services on a Samba server. You will also explore most of the global and service parameters that affect the way in which files can be shared and accessed.
If you are following along in a step-by-step fashion, you should ensure that your clients are not using encrypted passwords, for they complicate matters unnecessarily. Please refer to Hours 6 and 14, "Windows 9x and Windows NT," for details on how to set up your clients to switch off the use of encrypted passwords. You should also log in to your client machine using the account boss. If your Samba server is your first SMB server on your network, you might get a message during logon that indicates that you could not be validated against a logon server. Ignore the message for now.
Before you can share files, you must have a working smb.conf file for Samba to use. In Hour 4, "Installing and Testing the Configuration," you looked at the smb.conf file; here you build one from scratch.
As I discussed, the smb.conf file has a global section and a shares section. In what follows, you use the following global section and add file share sections as you explore various ways of controlling and managing file shares:
[global] workgroup = FOWLPLAY netbios name =EAGLE server string = My first server guest account = pcguest security = user password level = 8
The first thing to notice about this smb.conf file is that it does not define any shares, but it still works. This smb.conf file sets the workgroup that Samba is in to FOWLPLAY, which you saw earlier in Hour 5, and your NetBIOS name is EAGLE.
If you install this smb.conf on your server and restart Samba (you need to log in to your Samba server as root to do this), you should be able to see the new server under Network Neighborhood in Windows 9x or Windows NT 4.0 (for Windows for Workgroups 3.11, use File Manager and select Drives, Connect Network Drive).
|
Caution - If you are already using Samba, do not replace your existing smb.conf file with the preceding. Make a backup copy first. |
After you have restarted Samba (see Hour 4 for details of starting Samba on different platforms), you should see the Network Neighborhood on Windows 9x or Windows NT, shown in Figure 7.2.
Figure
7.2
Network Neighborhood for the FOWLPLAY workgroup.
Here, you see that your server shows up as EAGLE (which is what you called it in your smb.conf file) and that it is a Samba 2.0.0Beta4 Server. If you remove the netbios name parameter from the preceding smb.conf file, your server shows up with a name consisting of the first component of its DNS name. This might be what you want but will not match the examples in this hour.
If you now double-click the preceding server, you see the window in Figure 7.3.
Figure
7.3
Listing of shares on the Eagle file server.
This simply confirms that your Samba server has no shares, or at least none that are browsable (which I will discuss later).
Your next step is to set up a share and see what changes.
|
Sams Teach Yourself Samba in 24 Hours |
|||||||||||||||||||||||
|
Hour 7: File Sharing |
|||||||||||||||||||||||
|
© Copyright Macmillan USA. All rights reserved.