Preexec and smb.conf

Naccarato, Robert naccarar at
Wed Oct 20 18:41:08 GMT 1999

> Eg. How would I continue after the last "fi" in the script to
> check for the second directory and create it if it does not exist? 

Why don't you just replace this whole line:

preexec = if [ ! -e /home/%U/dir1] then /bin/mkdir /home/%U/dir1; fi 

... with a shell script and pass the vars to it:

preexec = /some/path/mkdirs %U

In that script, do whatever you want.

I did that a *long* time ago and actually used a Perl script instead
of /bin/sh.  It gives you unbelievable flexability.

More information about the samba mailing list