Preexec and multiple commands

Alastair Broom abroom at
Wed Oct 20 11:46:08 GMT 1999

On Wed, 20 Oct 1999, Robert Jonsson wrote:

> I am trying to create two directories using the preexec command but I must
> be missing something very simple. I just can´t figure out the syntax. How
> would I continue this so that I could create dir2?
> preexec = if [ ! -e /home/%U/dir1] then /bin/mkdir /home/%U/dir1; fi
If it actually is a syntax error you have, try:
  preexec = if [ ! -e /home/%U/dir1 ]; then /bin/mkdir /home/%U/dir1; fi
Hope this helps...                 ^ ^
Alastair Broom               Valley Technology, Edinburgh, Bonnie Scotland
abroom at

More information about the samba mailing list