Deployment Solution - Symantec Enterprise<\/a><\/p>\n<\/blockquote>\n<\/aside>\nI’ve used Richcopy in the past. It’s good, however, it has a nasty habit of stripping file permissions unless you run it off of the source server. Since I’m pulling the files off our old mini-SAN, I used CLI robocopy with the /copyall switch. It worked fine. It’s just that I our mini-SAN had a habit of changing NTFS file permissions. When I contacted EMC, they said this behavior was by design.<\/p>","upvoteCount":0,"datePublished":"2018-06-18T16:21:03.000Z","url":"https://community.spiceworks.com/t/error-applying-security-to-userhome-folders/657466/15","author":{"@type":"Person","name":"mercutio879","url":"https://community.spiceworks.com/u/mercutio879"}},{"@type":"Answer","text":"\n\n
<\/div>\n
Neally:<\/div>\n
\nsomething like so<\/p>\n
get-childitem \"C:\\parentfolder\" |\nforeach{\n #icacls.exe d:\\test /setowner domain\\username /T /C\n icacls.exe $_.name /setowner domain\\$_.name /T /C\n}\n<\/code><\/pre>\n\n\n
<\/div>\n
Mercutio879:<\/div>\n
\nI really should get more into it.<\/p>\n<\/blockquote>\n<\/aside>\n
Especially PowerShell :¬ )<\/p>\n<\/blockquote>\n<\/aside>\n
Tried running that script. Got this error:<\/p>\n
“No mapping between account names and security IDs was done. \nSuccessfully processed 0 files; Failed processing 0 files”<\/p>","upvoteCount":0,"datePublished":"2018-06-18T16:55:26.000Z","url":"https://community.spiceworks.com/t/error-applying-security-to-userhome-folders/657466/16","author":{"@type":"Person","name":"mercutio879","url":"https://community.spiceworks.com/u/mercutio879"}},{"@type":"Answer","text":"\n\n
<\/div>\n
Mercutio879:<\/div>\n
\n“No mapping between account names and security IDs was done. \nSuccessfully processed 0 files; Failed processing 0 files”<\/p>\n<\/blockquote>\n<\/aside>\n
Can you post sanitized what exactly you run? \nDid you replace the ‘placeholders’ with actual data? \nDo the folder names match the usernames (samaccountname)?<\/p>","upvoteCount":0,"datePublished":"2018-06-18T16:57:42.000Z","url":"https://community.spiceworks.com/t/error-applying-security-to-userhome-folders/657466/17","author":{"@type":"Person","name":"Neally","url":"https://community.spiceworks.com/u/Neally"}},{"@type":"Answer","text":"\n\n
<\/div>\n
Neally:<\/div>\n
\n\n\n
<\/div>\n
Mercutio879:<\/div>\n
\n“No mapping between account names and security IDs was done. \nSuccessfully processed 0 files; Failed processing 0 files”<\/p>\n<\/blockquote>\n<\/aside>\n
Can you post sanitized what exactly you run? \nDid you replace the ‘placeholders’ with actual data? \nDo the folder names match the usernames (samaccountname)?<\/p>\n<\/blockquote>\n<\/aside>\n
By and large, the foldernames match the usernames. There are a few exceptions, but I can manually clean those up.<\/p>\n
Here’s what I ran:<\/p>\n
get-childitem \"F:\\Userhome\\\" |\nforeach{\n #icacls.exe d:\\test /setowner mcc.local\\username /T /C\n icacls.exe $_.name /setowner mcc.local\\$_.name /T /C\n} \n<\/code><\/pre>\n\n<\/code><\/pre>","upvoteCount":0,"datePublished":"2018-06-18T16:59:59.000Z","url":"https://community.spiceworks.com/t/error-applying-security-to-userhome-folders/657466/18","author":{"@type":"Person","name":"mercutio879","url":"https://community.spiceworks.com/u/mercutio879"}},{"@type":"Answer","text":"nkay try like so:<\/p>\n
get-childitem \"F:\\Userhome\" |\nforeach{\n icacls.exe $_.fullname /setowner \"mcc\\$($_.name)\" /T /C\n} \n<\/code><\/pre>","upvoteCount":0,"datePublished":"2018-06-18T17:03:57.000Z","url":"https://community.spiceworks.com/t/error-applying-security-to-userhome-folders/657466/19","author":{"@type":"Person","name":"Neally","url":"https://community.spiceworks.com/u/Neally"}},{"@type":"Answer","text":"\n\n
<\/div>\n
Neally:<\/div>\n
\nnkay try like so:<\/p>\n
get-childitem \"F:\\Userhome\" |\nforeach{\n icacls.exe $_.fullname /setowner \"mcc\\$($_.name)\" /T /C\n} \n<\/code><\/pre>\n<\/blockquote>\n<\/aside>\nBoom! It’s running now. Looks like it’s working how I’d want it to.<\/p>\n
Out of curiosity, what’s the difference?<\/p>","upvoteCount":0,"datePublished":"2018-06-18T17:07:29.000Z","url":"https://community.spiceworks.com/t/error-applying-security-to-userhome-folders/657466/20","author":{"@type":"Person","name":"mercutio879","url":"https://community.spiceworks.com/u/mercutio879"}}]}}
I’m migrating our userhome location to a new VM. My first mistake was not setting security correctly on the share folder that the users’ folders will live in. I used a script from here:
To fix ownership issues (which it doesn’t look like it’s done, there’s an error ‘Set-Acl : Cannot set the ACL because the method that it needs to invoke, SetSecurityDescriptor, does not exist.’). Unfortunately, at some point, it wiped out the domain admins’ access to the folders. All the folders have the local administrators as having full access, but are missing domain admins, and even though domain admins are part of the local admin group on this server, that’s not enough.
I added Domain Admins with full access to the root folder, but now it’s showing these errors:
It’s not a huge deal that domain admins have access to these folders, but each user has this error pop 3 times, and if you hit enter by mistake, you have to start over again.
Is there an easier way?
3 Spice ups
Neally
(Neally)
June 18, 2018, 3:37pm
2
Take ownership or have the owner add domain admins?
Right but the issue is if there is a sub folder that does not inherit permissions.
We usually blow away all permissions for all sub folders as well and then re-set the permissions, which is easy because of RBAC, right? :¬P
Ideally, both. The script I found doesn’t seem to work correctly. I’m more concerned about the missing domain admin rights, though.
Neally
(Neally)
June 18, 2018, 3:40pm
4
See more comments above
Why are you concerned? If you need access you can take ownership.
There is no need to have access to all folders at all times, but if you need to, you can take ownership. ¯_(ツ)_/¯
Neally:
See more comments above
Why are you concerned? If you need access you can take ownership.
There is no need to have access to all folders at all times, but if you need to, you can take ownership. ¯_(ツ)_/¯
Sorry, I should have been more clear. The folder’s owner should be the username that is attached to the folder. So ‘abetts’ should be the owner of her folder. We’re redirecting our users’ My Documents, among other things. They don’t redirect correctly if they don’t own the folder.
So really, I need to set their folders so they own them, and put Domain Admins as full access on all of them as well. Except, when I propogate the Domain Admins access, I get that error about 1500 times.
matt234
(momurda)
June 18, 2018, 3:44pm
6
I am missing something.
Why are users involved in this at all?
Set DA to take control/be owner of the userhome root and all subdirs. Done without user knowledge on the server.
Set the user to have control of their userhome directory. Done without user knowledge on the server.
Neally
(Neally)
June 18, 2018, 3:45pm
7
Mercutio879:
well lol that makes more sense.
Have you looked into icacls?
1 Spice up
momurda:
I am missing something.
Why are users involved in this at all?
Set DA to take control/be owner of the userhome root and all subdirs. Done without user knowledge on the server.
Set the user to have control of their userhome directory. Done without user knowledge on the server.
I probably answered this with the previous comment.
Sorry, I’m not the clearest explainer sometimes.
I hadn’t looked into icacls. I don’t do much with CLI in Windows, sadly. I really should get more into it.
Neally
(Neally)
June 18, 2018, 3:52pm
9
something like so
get-childitem "C:\parentfolder" |
foreach{
#icacls.exe d:\test /setowner domain\username /T /C
icacls.exe $_.name /setowner domain\$_.name /T /C
}
Especially PowerShell :¬ )
1 Spice up
johnn1494
(John3367)
June 18, 2018, 3:53pm
10
How many users do you have? Do you have the old server up still?
There are about 350 folders in here. The old server is still up, so, if necessary, I can blow this away and start over.
Try adding Administrators with the cacls command:
cacls I:\FolderName /T /E /G Administrators:F
If Admins don’t have rights at all for some reason, you might need to use PSEXEC with CACLS to run CACLS as the System account.
psexec -s -i cacls I:\FolderName /T /E /G Administrators:F
SetACL might help you too: SetACL Command Line-Version (SetACL.exe) - Syntax and Description
1 Spice up
Neally
(Neally)
June 18, 2018, 4:02pm
13
Mike_Choices:
Try adding Administrators with the cacls command:
cacls I:\FolderName /T /E /G Administrators:F
If Admins don’t have rights at all for some reason, you might need to use PSEXEC with CACLS to run CACLS as the System account.
psexec -s -i cacls I:\FolderName /T /E /G Administrators:F
SetACL might help you too: SetACL Command Line-Version (SetACL.exe) - Syntax and Description
CACLS ??
http://www.itprotoday.com/security/icacls-new-and-improved-cacls
https://ss64.com/nt/icacls.html
2 Spice ups
johnn1494
(John3367)
June 18, 2018, 4:10pm
14
I’ve used Richcopy in the past. It’s good, however, it has a nasty habit of stripping file permissions unless you run it off of the source server. Since I’m pulling the files off our old mini-SAN, I used CLI robocopy with the /copyall switch. It worked fine. It’s just that I our mini-SAN had a habit of changing NTFS file permissions. When I contacted EMC, they said this behavior was by design.
Tried running that script. Got this error:
“No mapping between account names and security IDs was done.
Successfully processed 0 files; Failed processing 0 files”
Neally
(Neally)
June 18, 2018, 4:57pm
17
Can you post sanitized what exactly you run?
Did you replace the ‘placeholders’ with actual data?
Do the folder names match the usernames (samaccountname)?
By and large, the foldernames match the usernames. There are a few exceptions, but I can manually clean those up.
Here’s what I ran:
get-childitem "F:\Userhome\" |
foreach{
#icacls.exe d:\test /setowner mcc.local\username /T /C
icacls.exe $_.name /setowner mcc.local\$_.name /T /C
}
Neally
(Neally)
June 18, 2018, 5:03pm
19
nkay try like so:
get-childitem "F:\Userhome" |
foreach{
icacls.exe $_.fullname /setowner "mcc\$($_.name)" /T /C
}
Boom! It’s running now. Looks like it’s working how I’d want it to.
Out of curiosity, what’s the difference?