RE: [Samba] preexec script problem

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 ...


Go Back   Usenet Forums > Networking and Network Related > Samba

FAQ Members List Calendar Search Today's Posts Mark Forums Read
  #1 (permalink)  
Old 05-12-2004
daniel.jarboe@custserv.com
 
Posts: n/a
Default RE: [Samba] preexec script problem

> 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
Reply With Quote
Reply
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are Off
[IMG] code is Off
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On



All times are GMT +1. The time now is 09:09 AM.


Powered by vBulletin® Version 3.7.3
Copyright ©2000 - 2008, Jelsoft Enterprises Ltd.
Content Relevant URLs by vBSEO 3.0.0