[Samba] Windows User Home Folders automatic creation via GPO
spindles7 at gmail.com
Fri Feb 5 09:52:58 UTC 2021
> 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
> 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).
> 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
> I think I must be misunderstanding the purpose of the GPO; do I have to first manually assign the home folders to each user
> 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?
More information about the samba