Sys Admin
2021-Feb-04 19:50 UTC
[Samba] Windows User Home Folders automatic creation via GPO
Hello, I've been following the Windows User Home Folders <https://wiki.samba.org/index.php/Windows_User_Home_Folders> guide in the Samba wiki to create user home folders on a Samba file server that is also a domain member. I followed the Windows ACL sections to a tee, and to cut a long story short, the end result is I can now supply the appropriate Home folder path in ADUC (i.e. \\server\users\demo) and have the user folder be automatically created with the appropriate permissions, as described in the article. However, I cannot seem to automate this process via GPO as described in the article ("Using a Group Policy Preference" section). The GPO is configured correctly and I've confirmed it's being applied correctly on the target machine, however no home folder is automatically created upon user login; instead, it only maps the home folders **already created manually** in ADUC. Is this expected behaviour? I think I must be misunderstanding the purpose of the GPO; do I have to first manually assign the home folders to each user manually in ADUC, after which the GPO will automatically map them? Or does the GPO also automatically assigns and creates the home folders and maps them as a drive? Any insight into this is appreciated, thanks. A.Z
Roy Eastwood
2021-Feb-05 09:52 UTC
[Samba] Windows User Home Folders automatic creation via GPO
> > Hello, > > I've been following the Windows User Home Folders <https://wiki.samba.org/index.php/Windows_User_Home_Folders> guide in > the Samba wiki to create user home folders on a Samba file server that is also a domain member. > > I followed the Windows ACL sections to a tee, and to cut a long story short, the end result is I can now supply the appropriateHome> folder path in ADUC (i.e. \\server\users\demo) and have the user folder be automatically created with the appropriate permissions, > as described in the article. > > However, I cannot seem to automate this process via GPO as described in the article ("Using a Group Policy Preference" section).The> GPO is configured correctly and I've confirmed it's being applied correctly on the target machine, however no home folder is > automatically created upon user login; instead, it only maps the home folders **already created manually** in ADUC. Is thisexpected> behaviour? > > I think I must be misunderstanding the purpose of the GPO; do I have to first manually assign the home folders to each usermanually> in ADUC, after which the GPO will automatically map them? Or does the GPO also automatically assigns and creates the home folders > and maps them as a drive? >What works for me and has been recommended in Microsoft Technet for many years is to connect a drive letter on the Home folder section of the Profile Tab of the user's properties in ADUC in the form: Connect H: \\fqdn\sharename\%UserName%. (You can do the same for the Roaming Profile folder if you wish, but I don't use them.) Then when the user is created (or that added to their configuration), provided the Share and NTFS permissions are correct on the share, the user's home folder is automatically created. I then use the GPO to set Folder Redirection for the Documents, Desktop, Downloads etc folders to point at the new location. Note that you need to log on and off twice as the user before the folder redirection takes effect, though the user's home folder is created as soon as the user is added in ADUC. Hope that helps. @Rowland: maybe this could be mentioned in the WiKi? Roy