Hi Ole, On 10/21/2015 02:38 PM, Ole Traupe wrote:> MJ, thanks a lot! Just to make sure I get you right: > > This section is in the smb.conf. > a) on the DC acting as file sever as well, or > b) on a separate file server running Samba 4.1.17?on a separate fileserver. DC's are 4.2.4, fileserver 4.1.17.> The user log-on happens on a third machine, that is neither DC nor that > file server, right?Doesn't matter: we have never had any issues with this setup, works from whatever client we use. (windows doman logons, smbclient, cifs mount, etc, etc)> How and where is the home dir for each user specified? On the DC? In the > smb.conf or via the ADUC console in the user properties under "Profile" > and/or "Unix attributes"? Are you using rfc2307 in your smb.conf?ADUC. And yes: we are using rfc2307.> Does this work for log-ons on Windows as well as Linux machines?Yep. As long as the linux clients use cifs to mount the share, obviously. MJ
Ok. Thank you very much! So - just guessing - is this working in your case, as you actually named the share on the file server 'homes' as the [homes] section in the smb.conf? No, that can't be the case. There is no 'path' parameter in that section of yours. Out of curiosity: who is the owner of your auto-created homes according to a) Windows and b) Linux? @Rowland: I think what the wiki means is: if you just define an arbitrary share on your file server, mount this on your linux member server to e.g. /xyz, and then on the DC via the Unix Attributes (using rfc2307) define the user home as /xyz/newuser, this home dir is automatically created. I did this in the past. Of course, you have to cifs-mount the share with the right permission for the user to be able to auto-create his home during his first logon. In contrast, the [homes] section is not intended to be used as an actual share definition, as it is a designated special-purpose section. And, thus, the just described auto-creation of user homes wouldn't/shouldn't work. But it can work with root preexec, which isn't described on that wiki page you cite. Now you tell me that you even have a preexec parameter in the [homes] section on the DC that is working?! Are the actual homes in this case located on the DC? I am on the verge of losing my mind. Am 21.10.2015 um 16:59 schrieb mourik jan heupink:> Hi Ole, > > On 10/21/2015 02:38 PM, Ole Traupe wrote: >> MJ, thanks a lot! Just to make sure I get you right: >> >> This section is in the smb.conf. >> a) on the DC acting as file sever as well, or >> b) on a separate file server running Samba 4.1.17? > on a separate fileserver. DC's are 4.2.4, fileserver 4.1.17. > >> The user log-on happens on a third machine, that is neither DC nor that >> file server, right? > Doesn't matter: we have never had any issues with this setup, works > from whatever client we use. (windows doman logons, smbclient, cifs > mount, etc, etc) > >> How and where is the home dir for each user specified? On the DC? In the >> smb.conf or via the ADUC console in the user properties under "Profile" >> and/or "Unix attributes"? Are you using rfc2307 in your smb.conf? > ADUC. And yes: we are using rfc2307. > >> Does this work for log-ons on Windows as well as Linux machines? > Yep. As long as the linux clients use cifs to mount the share, obviously. > > MJ > >
On 19:10:05 wrote Ole Traupe:> Ok. Thank you very much! > > So - just guessing - is this working in your case, as you actually > named the share on the file server 'homes' as the [homes] section in > the smb.conf? No, that can't be the case. There is no 'path' > parameter in that section of yours. > > Out of curiosity: who is the owner of your auto-created homes > according to a) Windows and b) Linux? > > > @Rowland: I think what the wiki means is: if you just define an > arbitrary share on your file server, mount this on your linux member > server to e.g. /xyz, and then on the DC via the Unix Attributes > (using rfc2307) define the user home as /xyz/newuser, this home dir > is automatically created. I did this in the past. Of course, you > have to cifs-mount the share with the right permission for the user > to be able to auto-create his home during his first logon. > > In contrast, the [homes] section is not intended to be used as an > actual share definition, as it is a designated special-purpose > section. And, thus, the just described auto-creation of user homes > wouldn't/shouldn't work. But it can work with root preexec, which > isn't described on that wiki page you cite. > > Now you tell me that you even have a preexec parameter in the [homes] > section on the DC that is working?! Are the actual homes in this case > located on the DC? > > I am on the verge of losing my mind.Never mind. I am pretty sure that the preexec function is working on all shares. You may get confused by the share names for the users home. I believe that this is right (not tested): use [homes] on all smb servers, but not on DCs use [home] only on DCs where DC means AD style DCs, not NT4 style PDC/BDC and remember that winbind use this path as default for [home[s]]: /home/%D/%U Reread Rowlands mail: https://lists.samba.org/archive/samba/2015-October/195162.html -- regards Harry Jede