magic-script fine, but how

Geza Makay makayg at math.u-szeged.hu
Tue Jun 16 05:06:37 GMT 1998


>I want to start a linux-script on a samba-networkserver from a win95-client.
>I was kindly advised, to use the parameter magic script in smb.conf.
>The listing below shows a share-section of my smb.conf. I tried the same
>parameters in the global section as well.
>
>When I open the file:
>  magic script = /usr/local/samba/netzwerk/magic-linux/script
>and type:
> /usr/local/bin/transmail
>from a word editor under Win95, with no return followed, I can find the file
>under linux, I can execute it, which shows that there is no syntax problem, 
>but it doesn't work the way it should, means it doesn't start by itself. 
>
>[netzwerk]
>  comment = Netzwerk Hauptverzeichnis
>  path = /usr/local/samba/netzwerk
>  read only = no
>  locking = yes
>  public = yes
>  writeable = yes
>  magic script = /usr/local/samba/netzwerk/magic-linux/script
>  magic output = /usr/local/samba/netzwerk/magic-linux/out.txt

Do not specify full paths, only the file names in the "magic ..." options.
The magic script will run, if you create the file in any subdirectory of
the share (but according to my experience) not in the main directory. So
your share should look like:

[netzwerk]
  comment = Netzwerk Hauptverzeichnis
  path = /usr/local/samba/netzwerk
  read only = no
  locking = yes
  public = yes
  writeable = yes
  magic script = script
  magic output = out.txt

Note that the output is created in the main directory of the share.

I hope this helps,

Geza


*************************************************************************
*           Name: Geza Makay                                            *
*      Institute: Jozsef Attila University of Szeged                    *
*           Mail: Bolyai Institute, Aradi vertanuk tere 1.              *
*                 H-6720, Szeged, Hungary                               *
*            Tel: (62) 454-091 (Hungary's code: 36)                     *
*    Fax/Message: (62) 326-246 (Hungary's code: 36)                     *
*         E-mail: makayg at math.u-szeged.hu                               *
* World Wide Web: http://www.math.u-szeged.hu/                          *
*************************************************************************
* "To err is human, but to really mess things up you need a computer."  *
*************************************************************************



More information about the samba mailing list