Moving home directories to a new location, cacls problem
Hi, I'm trying to move home folders to a new location, users have modified file security properties so I have several access denied errors while copying. I've planned to do the copying like this: 1.) Take file/folder ownership to local administrators group: takeown.exe /A /R /D Y /F i:\userdata /A – Grants ownership to the Administrators group rather than a particular user. /R – Recurses /D Y – Sets the default to prompts to Yes /F – The file name of the file system object to take ownership of 2.) Add full rights to local administrators group: cacls i:\userdata /t /e /g Administrators:f 3.) Copy data to new location: robocopy \\oldserver\UserData \\newserver\UserData\ /MIR /COPY:DATS /R:1 /W:1 /LOG:c:\log\userdata.txt /TEE 4.) Change Home directory in ADUC: Get-QADUser -HomeDirectory \\oldserver\Userdata\* | Get-QADUser -Enabled | Foreach-Object{ Set-QADUser $_ -HomeDirectory "\\newserver\UserData\$($_.logonname)" -HomeDrive 'P:' } In step 2 when I use CACLS I get this error: "The data area passed to a system call is too small." How could I batch change the file/folder security settigns if CACLS does not work?
October 27th, 2010 12:20pm

Are you using "Xcacls" or just "cacls"? Also any reason you chose copy:DATS instead of COPYALL? Anyhow, does it have an issue since its syntax is user:perm ? expecting a user value when you are trying to use the short name of a built-in group? See my example below, which i have used in the past. You may need to specify the machine name if you are using its local admin group, or domain name if using an AD group. xcacls H:\users\Nick /F /T /S /P "domain1\domain admins":F
Free Windows Admin Tool Kit Click here and download it now
October 27th, 2010 3:28pm

This topic is archived. No further replies will be accepted.

Other recent topics Other recent topics