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

Ole Traupe ole.traupe at tu-berlin.de
Thu Oct 22 09:37:11 UTC 2015


Rowland, what are [homes] shares on a Unix machine?

What you describe seems to be mostly correct. However, in my eyes there 
is no such thing as a collection of [homes] shares. This section gets 
invoked whenever a non-existing share is requested. Thats what the man 
pages say (with many complicated words) and what I just confirmed here. 
It even works, if you put \\servername\%username% as home path in the 
"Profiles" tab of the ADUC (applies right when you click ok).

Especially, if you are connecting from Windows to 
\\servername\home\%username%, this path *is* honoured and Unix 
Attributes don't come into play. Further, making this Windows way a bit 
paradox or unsuited: if \\servername\home exists, the [homes] section 
won't ever be used. So in my case, I can't create a zfs data set on an 
existing share via 'root preexec', what really annoys me (maybe I put it 
into the netlogon section). It would only apply, if the Samba server 
'servername' is reachable and working correctly, but a [home] (without 
s) share is nonexistent.

(Maybe this is different with different versions of Samba, I don't know.)

But, of course, you are right that on linux the file system has to be 
mounted locally in order to access it. I sometimes forget to mention 
Windows and Linux cases separately.



Am 21.10.2015 um 20:01 schrieb Rowland Penny:
> On 21/10/15 18:19, Ole Traupe wrote:
>> Well, I do. That is not the problem.
>>
>> The problem was that I wasn't used to have user homes to be shares 
>> themselves. And when I share \\server\home and want to have the 
>> folder \\server\home\newuser to be auto-created, but I actually 
>> connect to the share [home] (\\server\home), this section in the 
>> smb.conf is always found and so the special [homes] section is never 
>> executed (cloned).
>>
>> I'll report tomorrow.
>>
>> Ole
>>
>>
>
> When you connect from windows to a '[homes]' share on a Unix machine, 
> you might think you are connecting to \\server\home\newuser, but what 
> happens is that Samba changes 'homes' to the users name and uses the 
> contents of 'unixHomeDirectory' as the path to the share. Using 
> '[home]' is similar but like an ordinary share, you must give a path 
> in the share. The path in '[home]' or 'unixHomeDirectory' must be 
> entered in Unix format and does not state the servername as it will 
> only work on the machine that Samba is running on, this means that the 
> path must be something like '/home/newuser'.
>
> So when you connect from windows using '\\server\home\newuser' to a 
> '[homes]' share and the user has a 'unixHomeDirectory' attribute 
> containing '/home/newuser', you are really connecting to the directory 
> /home/newuser on the Samba server that holds the '[homes]' share.
>
>  Rowland
>
>




More information about the samba mailing list