Help with preexec
Carey F. Cox
carey at tabasco.lamar.edu
Tue Apr 13 16:35:03 GMT 1999
I am trying to incorporate nonstandard home directories into my "homes"
share, meaning the I have users that have home directories under /home
and /staff. I found the macro (%H) that can be used to access these
directories, but am now trying to implement an automatic initial
creation of a .samba directory under each user's home directory if
there is none present.
I am basically following the procedure as set forth in Blair's book
on page 237 for using the "preexec" and "root preexec" commands. The
following usage of "root preexec" command,
[homes]
comment = Home Directories
path = %H/.samba
root preexec = if [ ! -e %H/.samba ]; \
then /bin/mkdir %H/.samba ; \
chown %u.%u %H/.samba ; fi
browseable = no
writable = yes
works fine, but the regular "preexec",
[homes]
comment = Home Directories
path = %H/.samba
preexec = if [ ! -e %H/.samba ]; \
then /bin/mkdir %H/.samba ; fi
browseable = no
writable = yes
does not work. I would much prefer this be done under the userid.
Is there something I'm missing?
Thanks,
Carey
======================================================================
<> Carey F. Cox, PhD | PHONE: (409) 880-8770 <>
<> Assistant Professor | FAX: (409) 880-8121 <>
<> Dept. of Mech. Eng. | EMAIL: carey at tabasco.lamar.edu <>
<> Lamar University | WEB: N/A <>
======================================================================
More information about the samba
mailing list