Redirect my documents to home folder

G

Guest

I want to redirect My Documents to my users home folders. However, they are
not the owners of their individual home folders. We made a custom admin group
the owner of all home folders for different reasons, but this seems to cause
redirection to fail. Is there a way to make this work w/o the user being the
owner of the home folder?
 
G

Guest

http://www.microsoft.com/windowsserver2003/community/centers/management/manage_faq.mspx

Basically
A. By default, if the redirection target folder already exists, Folder
Redirection will check to see if the user is the owner of the folder. If the
user is not the owner of the folder, redirection will fail with Event ID 101:
"This security ID may not be assigned as the owner of this object." Folder
Redirection treats this as an error to protect against a malevolent user
pre-creating folders for malicious purposes.

To avoid this error:

• Do not pre-create the folders; let Folder Redirection create them for you.

• If the folders already exist and have data in them, uncheck the "Grant the
user exclusive rights to my documents" checkbox on the settings page of the
Folder Redirection dialog. This tells Folder Redirection not to do the
ownership check and assume the permissions are OK. If you do this, you'll
need to make sure to set the permissions correctly.
 
G

Guest

I did exactly what you said but it still fail w/the security error. Once I
make the user the owner of the home drive it works like a charm. This is what
I"m trying to get around.
 
G

Guest

Nevermind. I decided to do this w/a vbscript. I made the script part of the
logon/logoff in the GPO. This does exactly what I want w/o worrying about
permissions. For those interested the code follows:

Set objNetwork = CreateObject("Wscript.Network")
Set objSysInfo = CreateObject("ADSystemInfo")
Set oShell = CreateObject("WScript.Shell")
strUserDN = objSysInfo.userName

' Bind to the AD user object with the LDAP provider.
Set objUser = GetObject("LDAP://" & strUserDN)

' Get user home directory and append My Documents to the path for later
homedir = objUser.homeDirectory & "\My Documents"

' Redirect My Documents to the user home directory
oShell.RegWrite "HKCU\Software\Microsoft\Windows\CurrentVersion\" _
& "Explorer\Shell Folders\Personal", homedir, "REG_SZ"
oShell.RegWrite "HKCU\Software\Microsoft\Windows\CurrentVersion\" _
& "Explorer\User Shell Folders\Personal", homedir, "REG_SZ"
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top