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 >
On 21/10/15 16:49, Ole Traupe wrote:> 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 > >A users profile is different from a users Unix homedir and normally you need to create the subdirectory manually and then when the user logs in/out the users profile is created. I don't understand when you say 'As soon as you press "Ok", the folder is created' , what 'OK' button and where is the folder created? Rowland
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 >> > >
On a Windows domain member client in the ADUC console, you specifiy the home dir path that is to be used on Windows machines on the "Profile" tab. As soon as you click 'Ok' (or 'Apply' for that matter), the folder is created (by the DC via your domain admin account) on the Samba server hosting the share the path you provided leads to. Try it, its nice an simple. However, not useful in my case, as I want to create a zfs data set. Am 21.10.2015 um 18:13 schrieb Rowland Penny:> On 21/10/15 16:49, Ole Traupe wrote: >> 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 >> >> > > A users profile is different from a users Unix homedir and normally > you need to create the subdirectory manually and then when the user > logs in/out the users profile is created. I don't understand when you > say 'As soon as you press "Ok", the folder is created' , what 'OK' > button and where is the folder created? > > Rowland >
On 21/10/15 17:37, Ole Traupe wrote:> 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. >Ah, light dawns, you are confusing the 'homeDirectory' and the 'unixHomeDirectory' attributes, windows uses the first one and should as you say contain something like ' \\server\newuser', whereas Unix uses the last one and should contain the full Unix path to the users homedir i.e. '/home/newuser'. So what you are proposing to try tomorrow should work if you bear the above in mind. Rowland Rowland