[Samba] Can't get 'root preexec' to run
Ole Traupe
ole.traupe at tu-berlin.de
Wed Oct 21 16:37:23 UTC 2015
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.
Ole
Am 21.10.2015 um 17:49 schrieb Ole Traupe:
> Oh, and of course the auto-creation works if you put the path
> \\server\home\user into the "Profiles" tab of the user properties in
> the ADUC console. This is explicitly, what the samba wiki suggests, as
> it is directed to using Windows clients. As soon as you press "Ok",
> the folder is created
>
>
> Am 21.10.2015 um 14:52 schrieb Rowland Penny:
>> On 21/10/15 13:32, Ole Traupe wrote:
>>> Rowland, thanks for your effort, I highly appreciate it!
>>>
>>> From what I had read before...
>>>
>>> [home] would be an arbitrarily named share and its preexec command
>>> would execute whenever a domain user connects to it
>>> [homes] is a special purpose section in the smb.conf that comes into
>>> play whenever a domain user connects to his or her home dir defined
>>> on the DC
>>>
>>> What MJ is telling seems to confirm this distinction.
>>>
>>>
>>>
>>>
>>
>> If you read this Samba wiki page:
>> https://wiki.samba.org/index.php/User_home_drives
>>
>> It says this:
>>
>> Do not name the share "[homes]", as this is a special share (see the
>> smb.conf manpage)!
>> <https://www.samba.org/samba/docs/man/manpages/smb.conf.5.html> The
>> "[homes]" share on an AD DC cannot handle the automatic folder
>> creation we will setup below and as such will not work!
>>
>> I am now beginning to believe the above is not true. Before a user
>> can connect to their homeshare it must exist, it is the link to this,
>> that Samba creates i.e. it changes '[homes]' to the username and
>> connects to that. This is working for me on a Debian 4.1.17 DC just
>> as it has always done on a member server, I just never tried it before.
>>
>> Rowland
>>
>
>
More information about the samba
mailing list