This is a discussion on RE: [Samba] preexec script problem within the Samba forums, part of the Networking and Network Related category; > i'm running into a little problem when using preexec scripts for the > creation > of dir's ...
|
|||||||
| FAQ | Members List | Calendar | Search | Today's Posts | Mark Forums Read |
|
|||
|
> i'm running into a little problem when using preexec scripts for the
> creation > of dir's on my samba server.... > > script > --- > #! /bin/sh > name=`getent passwd | grep %U | awk -F: '{print $5}'` > mkdir /samba/test/"$name" > --- > > snip of smb.conf > --- > [test] > path = /samba/test > preexec = /root/script > browseable = Yes > writeable = Yes > valid users = @mygroup > force group = @mygroup > create mask = 0770 > force create mode = 770 > --- > > anyone have any idea why the dir is not created under "/samba/test" ? > > -ipuy %U will be substituted within smb.conf, not your script. You could do something like preexec = /root/script %U in smb.conf, and then name=`getent passwd | grep $1 ... Will your users be able to create directories in /samba/test/ (this dir is group writable and owned by group mygroup?). Is it your intention that one user will be able to read/write/delete another user's files? ~ Daniel ----------------------------------------------------------------------- This message is the property of Time Inc. or its affiliates. It may be legally privileged and/or confidential and is intended only for the use of the addressee(s). No addressee should forward, print, copy, or otherwise reproduce this message in any manner that would allow it to be viewed by any individual not originally listed as a recipient. If the reader of this message is not the intended recipient, you are hereby notified that any unauthorized disclosure, dissemination, distribution, copying or the taking of any action in reliance on the information herein is strictly prohibited. If you have received this communication in error, please immediately notify the sender and delete this message. Thank you. -- To unsubscribe from this list go to the following URL and read the instructions: http://lists.samba.org/mailman/listinfo/samba |