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

Ole Traupe ole.traupe at tu-berlin.de
Wed Oct 21 17:19:53 UTC 2015


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


Am 21.10.2015 um 19:00 schrieb Rowland Penny:
> On 21/10/15 17:37, Ole Traupe wrote:
>> I think I finally managed to understand the [homes] part of the man 
>> pages, and what my problem is:
>> https://www.samba.org/samba/docs/man/manpages/smb.conf.5.html
>>
>> The misunderstanding comes from my practice I learned on Windows to 
>> just share the "\\server\home" directory and to create per-user 
>> sub-folders (\\server\home\newuser) that *themselves are not shared*.
>>
>> If you - as you obviously should (at least referring to Samba) - put 
>> "\\server\newuser" as home dir path into your user config on the DC, 
>> the manpages start beginning to make sense: The Samba file server 
>> receiving the request to connect to \\server\newuser finds no 
>> appropriate share entry in the smb.conf and, thus, clones the content 
>> of the [homes] section (given the username exists and the password is 
>> correct) for creating a new share (actually shared, no simple 
>> subfolder of a share).
>>
>> So the user home must actually be a share and the [homes] section 
>> with the 'root preexec' parameter has to be defined on the Samba 
>> server hosting those home shares.
>>
>> Will try this tomorrow.
>>
>
> Ah, light dawns, you are confusing the 'homeDirectory' and the 
> 'unixHomeDirectory' attributes, windows uses the first one and should 
> as you say contain something like ' \\server\newuser', whereas Unix 
> uses the last one and should contain the full Unix path to the users 
> homedir i.e. '/home/newuser'.
>
> So what you are proposing to try tomorrow should work if you bear the 
> above in mind.
>
> Rowland
>
> Rowland
>
>




More information about the samba mailing list