|
Sams Teach Yourself Samba in 24 Hours |
|||||||||||||||||
|
Hour 10: Server-Side Automation |
|||||||||||||||||
|
Automation
can be defined as the process of designing a solution that
can be carried out without human intervention. Automation is closely related
to scalability. Your goal for this hour is to develop methods that automate
Samba's capability to handle connections from various client machines. Even
if you don't manage large numbers of users, computers, or servers, you can still
benefit from thinking about automation.
Server-side automation describes events that the systems administrator has configured to occur on the server as a result of a client connecting to a service, either a file or printer. Perhaps that was a little wordy, but I think the definition will become clearer as look at some examples.
If you think back to previous hours, you have already seen two examples of server-side automation. Do you remember the [homes] service? When a user attempts to connect to his home directory (for example, \\bilbo\joe)--assuming that the [homes] service has been defined--Samba attempts to locate the share name, first in smb.conf and then in the local passwd file. If the name is found in /etc/passwd, Samba automatically creates a copy of the [homes] share and renames it to the name of the connecting user. This occurs transparently to the user and without any human intervention. If you create an account for a new user on the UNIX box, you don't need to change anything in the smb.conf file to enable that user to access his home directory. That's what I mean by server-side automation. The solution is scalable and self-maintaining.
The [printers] service from Hour 8, "Printers," is another example of Samba's built-in automation. You don't need to explicitly define every printer available on the system (although you certainly could if you wanted) in order for the printer to be available. Samba will obtain its list of valid printer names from the defined printcap file. If you create another printer, Samba will be aware of it automatically.
|
Note - As a final note before you begin looking at some of the more customizable means of automating client support, remember that these examples are only suggestions and certainly not the only way that the parameters or mechanisms can be used. You should experiment with different combinations. Hopefully, you will be comfortable with the examples and will have ideas of your own to try by the end of the hour. Most of all, make Samba work for you. These examples are here to provide you a basis to work from. |
You first examined the variables available in smb.conf in Hour 5, "The smb.conf File: Telling Samba What to Do." Table 5.2 describes the complete list if you need to refer back. Variables provide the foundation for individualizing connections. Some of the more common ones that I'll be using for the rest of this hour are %u, %U, %g, %G, %m, %L, and %d.
|
Sams Teach Yourself Samba in 24 Hours |
|||||||||||||||||
|
Hour 10: Server-Side Automation |
|||||||||||||||||
|
© Copyright Macmillan USA. All rights reserved.