From 693fba1eb2f30db906c5fa089e6d1626dac8a15c Mon Sep 17 00:00:00 2001 From: John Terpstra Date: Sun, 30 Jul 2000 07:38:43 +0000 Subject: Adding Using_Samba book back to Samba-pre3. (This used to be commit 9f5f8ad21d9c7f5efb69abbe08ee2e34b787e68b) --- docs/htmldocs/using_samba/ch08_02.html | 156 +++++++++++++++++++++++++++++++++ 1 file changed, 156 insertions(+) create mode 100644 docs/htmldocs/using_samba/ch08_02.html (limited to 'docs/htmldocs/using_samba/ch08_02.html') diff --git a/docs/htmldocs/using_samba/ch08_02.html b/docs/htmldocs/using_samba/ch08_02.html new file mode 100644 index 0000000000..54b2480071 --- /dev/null +++ b/docs/htmldocs/using_samba/ch08_02.html @@ -0,0 +1,156 @@ + + + +[Chapter 8] 8.2 Magic Scripts + + + + + + +
+ + +
+

Using Samba

+ +Robert Eckstein, David Collier-Brown, Peter Kelly +
1st Edition November 1999 +
1-56592-449-5, Order Number: 4495 +
416 pages, $34.95 +
+

Buy the hardcopy +

Table of Contents +

+
+ + +
+
+ +
+
+

+ +8.2 Magic Scripts

The following options deal with +magic scripts on the Samba server. Magic scripts are a method of running programs on Unix and redirecting the output back to the SMB client. These are essentially an experimental hack. However, some users and their programs still rely on these two options for their programs to function correctly. Magic scripts are not widely trusted and their use is highly discouraged by the Samba team. See +Table 8.2 for more information.


+ + + + + + +
+ +Table 8.2: Networking Configuration Options
+

+Option

+

+Parameters

+

+Function

+

+Default

+

+Scope

+

+ +magic script

+

string (fully-qualified filename)

+

+Sets the name of a file to be executed by Samba, as the logged-on user, when closed.

+

+None

+

+Share

+

+ +magic output

+

+string (fully-qualified filename)

+

+Sets a file to log output from the magic file.

+

+ +scriptname.out

+

+Share

+

+ +8.2.1 magic script

+If the +magic +script option is set to a filename and the client creates a file by that name in that share, Samba will run the file as soon as the user has opened and closed it. For example, let's assume that the following option was created in the share +[accounting]:

+[accounting]
+	magic script = tally.sh

+Samba continually monitors the files in that share. If one by the name of +tally.sh is closed (after being opened) by a user, Samba will execute the contents of that file locally. The file will be passed to the shell to execute; it must therefore be a legal Unix shell script. This means that it must have newline characters as line endings instead of Windows CR/LFs. In addition, it helps if you use the +#! directive at the beginning of the file to indicate under which shell the script should run.

+

+ +8.2.2 magic output

+This option specifies an output file that the script specified by the +magic +script option will send output to. You must specify a filename in a writable directory:

+[accounting]
+	magic script = tally.sh
+	magic output = /var/log/magicoutput

+If this option is omitted, the default output file is the name of the script (as stated in the +magic +script option) with the extension +.out appended onto it.

+
+
+
+ + +
+ +Previous: 8.1 Supporting Programmers + + + +Next: 8.3 Internationalization
+8.1 Supporting Programmers + +Book Index +8.3 Internationalization

+
+ + +
+ + +O'Reilly Home | + +O'Reilly Bookstores | + +How to Order | + +O'Reilly Contacts
+ +International | + +About O'Reilly | + +Affiliated Companies

+© 1999, O'Reilly & Associates, Inc. + +

+ + -- cgit