On 10/21/2015 02:52 PM, Rowland Penny wrote:> 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.This is what we observe, yes. The only problem with this that ADUC autocreation does NOT work with this, rather unfortunate. If someone knowns of a way to make ADUC NOT create the homdir, we would like to know. The preexec in smb.conf does it, and ADUC should simply accept whatever we type for homedir. MJ
Am 22.10.2015 um 10:00 schrieb mourik jan heupink:> > > On 10/21/2015 02:52 PM, Rowland Penny wrote: >> 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. > > This is what we observe, yes. The only problem with this that ADUC > autocreation does NOT work with this, rather unfortunate. > > If someone knowns of a way to make ADUC NOT create the homdir, we > would like to know. The preexec in smb.conf does it, and ADUC should > simply accept whatever we type for homedir.Probably, the best way would be to use scripting under Windows: http://blogs.technet.com/b/heyscriptingguy/archive/2005/12/02/how-can-i-change-the-location-of-a-user-s-home-drive-in-active-directory.aspx You should be able to do, whatever you do in the ADUC console on a Windows client, via scripts, too: create the DC context, interactively logon, and set user properties. I formerly learned some things with the outdated MS scripting guide: https://technet.microsoft.com/en-us/library/ee221103.aspx More up-to-date would be a Power Shell approach (can't see right away, whether the above link is using this). However, I have no knowledge in that and can't tell you how it works. Another way, of course, might be to set the windows home dir path after the first user logon during which the share is created. But that is not at all comfortable or practiable.> > MJ >
Group policies + VBscript can do this for you. And more ease, use the variables of windows to get the info you need. Open an box : cmd , type set. See HOMEDRIVE HOMESHARE .. etc. Use a VBScript to do the magic. Make a Computer policy to run the VBscript which gives needed rights etc. I do something simaler but i use that for import/deleting certificates. See the certificates examples: http://terenceluk.blogspot.nl/2012/05/how-to-remove-trusted-certificate.html and https://www.jasonpearce.com/2012/02/02/import-pfx-certificate-via-group-policy-preferences/ Greetz, Louis> -----Oorspronkelijk bericht----- > Van: samba [mailto:samba-bounces at lists.samba.org] Namens Ole Traupe > Verzonden: donderdag 22 oktober 2015 10:41 > Aan: samba at lists.samba.org > Onderwerp: Re: [Samba] Can't get 'root preexec' to run > > > > Am 22.10.2015 um 10:00 schrieb mourik jan heupink: > > > > > > On 10/21/2015 02:52 PM, Rowland Penny wrote: > >> 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. > > > > This is what we observe, yes. The only problem with this that ADUC > > autocreation does NOT work with this, rather unfortunate. > > > > If someone knowns of a way to make ADUC NOT create the homdir, we > > would like to know. The preexec in smb.conf does it, and ADUC should > > simply accept whatever we type for homedir. > > Probably, the best way would be to use scripting under Windows: > http://blogs.technet.com/b/heyscriptingguy/archive/2005/12/02/how-can-i- > change-the-location-of-a-user-s-home-drive-in-active-directory.aspx > > You should be able to do, whatever you do in the ADUC console on a > Windows client, via scripts, too: create the DC context, interactively > logon, and set user properties. > > I formerly learned some things with the outdated MS scripting guide: > https://technet.microsoft.com/en-us/library/ee221103.aspx > > More up-to-date would be a Power Shell approach (can't see right away, > whether the above link is using this). However, I have no knowledge in > that and can't tell you how it works. > > Another way, of course, might be to set the windows home dir path after > the first user logon during which the share is created. But that is not > at all comfortable or practiable. > > > > > > MJ > > > > > -- > To unsubscribe from this list go to the following URL and read the > instructions: https://lists.samba.org/mailman/options/samba
On 22/10/15 09:40, Ole Traupe wrote:> > > Am 22.10.2015 um 10:00 schrieb mourik jan heupink: >> >> >> On 10/21/2015 02:52 PM, Rowland Penny wrote: >>> 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. >> >> This is what we observe, yes. The only problem with this that ADUC >> autocreation does NOT work with this, rather unfortunate. >> >> If someone knowns of a way to make ADUC NOT create the homdir, we >> would like to know. The preexec in smb.conf does it, and ADUC should >> simply accept whatever we type for homedir. > > Probably, the best way would be to use scripting under Windows: > http://blogs.technet.com/b/heyscriptingguy/archive/2005/12/02/how-can-i-change-the-location-of-a-user-s-home-drive-in-active-directory.aspx > > > You should be able to do, whatever you do in the ADUC console on a > Windows client, via scripts, too: create the DC context, interactively > logon, and set user properties. > > I formerly learned some things with the outdated MS scripting guide: > https://technet.microsoft.com/en-us/library/ee221103.aspx > > More up-to-date would be a Power Shell approach (can't see right away, > whether the above link is using this). However, I have no knowledge in > that and can't tell you how it works. > > Another way, of course, might be to set the windows home dir path > after the first user logon during which the share is created. But that > is not at all comfortable or practiable. >You do not have to create users with ADUC, you could use samba-tool and set quite a lot with this, try running 'samba-tool user create --help' for a full list of what you can set. You can also write your own scripts to do this, either around samba-tool or by using ldifs and ldap or ldb tools. Rowland