[Samba] Can't get 'root preexec' to run

Rowland Penny rowlandpenny241155 at gmail.com
Tue Oct 20 15:15:01 UTC 2015


On 15/10/15 11:05, Ole Traupe wrote:
> Hi,
>
> I am trying to automatically create nested zfs data sets as home 
> directories. I have a script that works fine if I execute it manually 
> as root (auth via public key). It also creates a short log file in the 
> same dir.
>
> However, this section in my smb.conf (on the DC) doesn't seem to 
> execute (no data set created, no log file) on user logon (on a member 
> server):
>
> [homes]
>        comment = User Home Directories
>        browseable = no
>        writable = yes
>        root preexec = /usr/local/samba/scripts/createzfshome.sh %U
>
> What might be the reason? Is this conflicting with rfc2307 use?
>
> My DC's Samba version is 4.2.2 (on CentOS 6.7), my Samba member server 
> (where the logon happens; either via ssh or with FreeNX terminal 
> software) is Version 3.6.23.
>
> Is Samba 3 a problem here?
>
> Best,
> Ole
>

Hmm, struggling to understand just what you are trying to, I think you 
are trying to do this:

You have the users home directories stored on the DC
The users log onto a samba member server (running 3.6.23)
You then expect the users home directory to be created on the DC

Is the above correct, if it isn't, can you state just what you expect to 
happen, line by line as above.

Rowland




More information about the samba mailing list