[Samba] Can't get 'root preexec' to run
Rowland Penny
rowlandpenny241155 at gmail.com
Thu Oct 22 10:09:51 UTC 2015
On 22/10/15 10:37, Ole Traupe wrote:
> Rowland, what are [homes] shares on a Unix machine?
It is described in the smb.conf manpage, but briefly if you try to
connect to a share called 'username' and samba knows nothing about a
share called 'username' it checks if there is a user called 'username'.
If this user exists, it obtains the users Unix homedir and uses this for
the share name and path. So if there is a user called 'username' and
there is a share called '[homes]' in smb.conf, then the users homedir is
obtained, on a DC this will be '/home/DOMAIN/username' unless 'template
homedir = ' is set to in smb.conf, on a domain member, winbind will use
the contents of the 'unixHomeDirectory' attribute, but this *must* be a
local path.
>
> 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).
Profiles have *nothing* to do with home directories.
>
> 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.
>
If you are trying to connect from windows using the profile share, you
will need to use [profiles] not [homes] or [home], not sure if this will
work, because the profile (as far as I am aware) is written at first
logoff and then updated at each subsequent logoff.
> (Maybe this is different with different versions of Samba, I don't know.)
Nope, all recent versions of Samba have worked in this way.
Rowland
>
> 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.
>
>
>
More information about the samba
mailing list