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. > > >
Am 22.10.2015 um 12:09 schrieb Rowland Penny:> 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'.Rowland, you are stating *exactly* what I was repeating several times now!!> 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.Yes, I know.> >> >> 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.In know that! But in ADUC, the darn tab is just *named* that way! Go lok it up!> >> >> 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. >> >> >> > >
On 22/10/15 11:28, Ole Traupe wrote:> > > Am 22.10.2015 um 12:09 schrieb Rowland Penny: >> 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'. > > Rowland, you are stating *exactly* what I was repeating several times > now!! > > >> 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. > > Yes, I know. > >> >>> >>> 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. > > In know that! But in ADUC, the darn tab is just *named* that way! Go > lok it up! >That is not where you set the Unix home directory, yes there is a heading called 'home folder' on the 'Profiles' tab, but you should be using the 'Home directory' box on the 'UNIX Attributes' tab. Rowland