[Samba] Auto directory creation not working

Marcis Lielturks marcis.lielturks at gmail.com
Thu Jul 15 01:48:33 MDT 2010


Hi!

I think that "root preexec" is the smb.conf parameter you might be 
interested in.

MMM

On 07/15/10 10:44 AM, Rok Kosir wrote:
> Hello,
>
> I am experiencing problems with auto directory creation for user shares.
>
> I have samba instance that is authenticated against samba PDC, on PDC 
> i have 2 groups, group1 and group2.
>
> What i want to do now is to have separate folders for user shares for 
> each group.
> so /mnt/share/group1/user1 would be for user1 in group 1 and 
> /mnt/share/group2/user2 would be folder for user2 in group 2
>
> root directories are crated (/mnt/share/group1 and /mnt/share/group2) 
> with chmod 777  and owner is nobody:group1 and nobody:group2
> If i do not create user folder manually, the user can not login with 
> this error: "/mnt/share/group2/user2' does not exist or permission 
> denied when connecting to [user2] Error was No such file or directory"
>
> Now, is there any way to convince samba to create user folders(i have 
> too much users to create folders manually)
>
> The samba PDC is backended with LDAP(if this makes any difference).
>
> Samba version is: Samba 3.0.33-3.29.el5_5 (latest from repo)
> OS version: CentOs 5.3
>
> here is the smb.conf:
>
> [global]
>  workgroup = WORKGROUP
>  server string = Samba Server Version %v
>  password server = 10.5.10.10
>  encrypt passwords = yes
>  add user script = /usr/sbin/useradd %u
>  delete user script = /usr/sbin/userdel %u
>  security = domain
>  passdb backend = tdbsam
>  template homedir = /mnt/share/%g/%u
>  log level = 3
> [homes]
> comment = CSL backup server
> path = /mnt/share/%g/%u
> valid users = %S
> write list = %S
> read only = No
> writable = yes
> create mask = 0700
> directory mask = 0700
>
>
> any help and advice is very appreciated!
> Cheers,
> Rok
>


More information about the samba mailing list