|
Sams Teach Yourself Samba in 24 Hours |
|||||||||||||||||||||||
|
Hour 7: File Sharing |
|||||||||||||||||||||||
|
Now that you have looked at how to create file services, how to control access to them, and how to handle access permissions for services, it is time to look at some special services that Samba provides.
Clients like to access their home directories, and if Samba had to declare each user's home directory as a separate file share, life would very difficult for administrators. Imagine having to add a section to the smb.conf file for each new user you add to the system, and then having to restart Samba.
To make life easier for all overworked administrators, Samba provides two special share sections: a [homes] section and a [printers] section. I will discuss the [printers] section in the next hour and look at the [homes] section in detail here.
When a client requests a connection to a file share, the existing file shares are scanned. If a match is found, that share is used. However, if no match is found, the requested share is treated as a username and looked up in the password facility. If the name exists and validates, a share is created by cloning the [homes] share. This means that the new share takes most of its parameters from the [homes] share.
When the new share is created, its name is changed to the username, and the share's path is set to the user's home directory if none is set in the [homes] section.
The following shows an example of a [homes] share in the smb.conf file:
[homes]
comment = Home Directories
browsable = no
writable = yes
This is all you need to allow clients to access their home directories. Add the preceding to your smb.conf file, and restart Samba. You should then be able to bring up a DOS prompt under Windows, and issue the command
net use h: \\EAGLE\homes
after which you are able to access all the files in your home directory from your PC.
|
Sams Teach Yourself Samba in 24 Hours |
|||||||||||||||||||||||
|
Hour 7: File Sharing |
|||||||||||||||||||||||
|
© Copyright Macmillan USA. All rights reserved.