Hi, On 10/21/2015 01:21 PM, Rowland Penny wrote:> I am now beginning to think it doesn't work at all, if samba4 is > involved in any way. I knew that it wouldn't work on a DC (probably > because the user is DOMAIN\username and not just username), but from my > experiment (see my earlier post) it doesn't seem to work at all, try > your setup with '[home]' and a path line. > > Rowland >Probably I misunderstand the above, but I can only say: we're on samba4.1.17, and on our fileserver we use this:> [homes] > root preexec = /usr/local/sbin/mkhomedir.sh %U > comment=Home directory for %S > read only = No > browseable = No > create mask = 0770 > directory mask = 0770And this works as expected: the preexec runs, and the homes share gives us per user home folders. MJ
On 21/10/15 12:41, mourik jan heupink wrote:> Hi, > > On 10/21/2015 01:21 PM, Rowland Penny wrote: >> I am now beginning to think it doesn't work at all, if samba4 is >> involved in any way. I knew that it wouldn't work on a DC (probably >> because the user is DOMAIN\username and not just username), but from my >> experiment (see my earlier post) it doesn't seem to work at all, try >> your setup with '[home]' and a path line. >> >> Rowland >> > > Probably I misunderstand the above, but I can only say: we're on > samba4.1.17, and on our fileserver we use this: > >> [homes] >> root preexec = /usr/local/sbin/mkhomedir.sh %U >> comment=Home directory for %S >> read only = No >> browseable = No >> create mask = 0770 >> directory mask = 0770 > > And this works as expected: the preexec runs, and the homes share > gives us per user home folders. > > MJ >OK, further tests, Mourik is correct, if you use '[homes]' and browse direct to the users share it works, whats more, exactly the same setup works on a DC!, so it would seem that you can use '[homes]' on a DC, you just cannot browse to the 'homes' share (well, I cannot). I feel more tests coming on. :-) Rowland
On 21/10/15 13:30, Rowland Penny wrote:> On 21/10/15 12:41, mourik jan heupink wrote: >> Hi, >> >> On 10/21/2015 01:21 PM, Rowland Penny wrote: >>> I am now beginning to think it doesn't work at all, if samba4 is >>> involved in any way. I knew that it wouldn't work on a DC (probably >>> because the user is DOMAIN\username and not just username), but from my >>> experiment (see my earlier post) it doesn't seem to work at all, try >>> your setup with '[home]' and a path line. >>> >>> Rowland >>> >> >> Probably I misunderstand the above, but I can only say: we're on >> samba4.1.17, and on our fileserver we use this: >> >>> [homes] >>> root preexec = /usr/local/sbin/mkhomedir.sh %U >>> comment=Home directory for %S >>> read only = No >>> browseable = No >>> create mask = 0770 >>> directory mask = 0770 >> >> And this works as expected: the preexec runs, and the homes share >> gives us per user home folders. >> >> MJ >> > > OK, further tests, Mourik is correct, if you use '[homes]' and browse > direct to the users share it works, whats more, exactly the same setup > works on a DC!, so it would seem that you can use '[homes]' on a DC, > you just cannot browse to the 'homes' share (well, I cannot). > > I feel more tests coming on. :-) > > Rowland > >Just had a further thought, has the OP made his script executable ? probably he has, but easy to forget. Rowland
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? The user log-on happens on a third machine, that is neither DC nor that file server, right? 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? Does this work for log-ons on Windows as well as Linux machines? Thank you for any more details! Ole Am 21.10.2015 um 13:41 schrieb mourik jan heupink:> Hi, > > On 10/21/2015 01:21 PM, Rowland Penny wrote: >> I am now beginning to think it doesn't work at all, if samba4 is >> involved in any way. I knew that it wouldn't work on a DC (probably >> because the user is DOMAIN\username and not just username), but from my >> experiment (see my earlier post) it doesn't seem to work at all, try >> your setup with '[home]' and a path line. >> >> Rowland >> > > Probably I misunderstand the above, but I can only say: we're on > samba4.1.17, and on our fileserver we use this: > >> [homes] >> root preexec = /usr/local/sbin/mkhomedir.sh %U >> comment=Home directory for %S >> read only = No >> browseable = No >> create mask = 0770 >> directory mask = 0770 > > And this works as expected: the preexec runs, and the homes share > gives us per user home folders. > > MJ >
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