Configuring Windows Profile Folder Redirections

From SambaWiki
Revision as of 22:00, 26 February 2017 by Mmuehlfeld (talk | contribs) (Updated steps in the procedure)

Configure folder redirection in an AD environment

To keep the following guide simple, we setup the policy in the „Default Domain Policy“. If you have different requirements, adapt it to your needs.

  • Open the Group Policy Management console.
  • Right-click to your AD domain and select "Create a GPO in this domain, and Link it here".
GPMC Create GPO.png
  • Enter a name for the GPO, such as "Folder redirection". The new GPO is shown below the domain entry.
  • Right-click to the newly-created GPO and select "Edit" to open the "Group Policy Management Editor".
  • Navigate to „User Configuration“ / „Policies“ / „Windows Settings“ / „Folder Redirection“, right-click to „Documents“ and choose „Properties“.
  • Redirect the folder to your needs and adjust the values on the „Settings“ tab, too.
Folder Redirection Documents.png
  • In the „Folder redirection“ sub-tree you can redirect other folders, too.
  • Save the changes by closing the Group Policy Management Editor.


GPO work around for Samba "homes" directive

The smb.conf [homes] directive creates an auto share \\SERVER\some_user for the user home directory.

The Vanilla Windows Folder Redirection GPO insists on having the following share/folder structure for the location of user home folders on the server:

\\SERVER\someshare\some_user

The following steps provide a workaround. (Tested in a Windows 2012 Domain with Windows 7 and 2012 clients)

  • Open the Group Policy Management Console
  • Completely disable the folder redirection GPO.
  • Create a new GPO

Expand the folder heirarchy:

 User Configuration 
   Preferences
      Windows Settings
        Registry


Right click on "Registry" and select "New" then "Registry Item"

  • Action: Replace
  • Hive: HKEY_CURRENT_USER
  • Key path: Software\Microsoft\Windows\CurrentVersion\Explorer\User Shell Folders
  • Value name: Personal
  • Value type: REG_EXPAND_SZ
  • Value data: \\SERVER\%username%\My Documents

Apply changes. Reboot Windows 7 clients.

Note that this does NOT work for XP clients unless they have the GPP extension installed (allegedly)

Screenshot:

Folder redirection via reg gpo.png



In a NT4 domain

NT4 policies can only be applied to Windows NT4 up to XP machines. Newer Windows versions only support group policies.

To keep this guide simple, we set the folder redirection in this example on the default user policy.

  • Open the System Policy Editor (poledit.exe).
You find PolEdit e.g. on your Windows Server CD-ROM or in the Ms Office 2000 Resource Kit (ORK). Please look here for more informations: KB-910203
Poledit opening adm.png
  • Create a new policy or open an existing.
  • Double-click on „Default User“.
  • Follow the tree to the folder redirection (the way depends on the ADM file you use).
Poledit folder redirection.png
  • Set a location where you want to redirect the folder to.
  • Redirect other folders too, if necessary.
  • Close the „Default User Properties“ window.
  • Save the policy to \\PDC\NetLogon\ntconfig.pol (the file must be placed on your PDC's NetLogon share with the name „ntconfig.pol" and should be world-readable).