• Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 875
  • Last Modified:

Removing "servername\users" permission from multiple folders.

A couple of days ago I had opened another question and found solution partially as follow (bolded)

dir /b >c:\users.txt
for /f %i in (c:\users.txt) do cacls %i /E /C /R "Authenticated users"



Now I need to remove Servername\Users with similar way but the following code did not work.
for /f %i in (c:\folders.txt) do cacls %i /E /C /R "Servername\Users"

So how can I remove Servername\Users permisson from all folders which they are not inherited.
Windows 2008 R2 member server
0
teomcam
Asked:
teomcam
  • 6
  • 6
1 Solution
 
pony10usCommented:
Try preceeding the "Servername" with a double backslash:  \\
0
 
teomcamAuthor Commented:
Hi,

It did not work.

C:\Users\Administrator\Desktop\Home>for /f %i in (c:\Users.txt) do cacls %i /E /C /R "\\SERVER10\Hom
e$"

C:\Users\Administrator\Desktop\Home>cacls New /E /C /R "\\SERVER10\Home$"
No mapping between account names and security IDs was done.

C:\Users\Administrator\Desktop\Home>cacls New /E /C /R "\\SERVER10\Home$"
No mapping between account names and security IDs was done.

C:\Users\Administrator\Desktop\Home>cacls student1 /E /C /R "\\SERVER10\Home$"
No mapping between account names and security IDs was done.

C:\Users\Administrator\Desktop\Home>cacls student2 /E /C /R "\\SERVER10\Home$"
No mapping between account names and security IDs was done.

C:\Users\Administrator\Desktop\Home>cacls student3 /E /C /R "\\SERVER10\Home$"
No mapping between account names and security IDs was done.

C:\Users\Administrator\Desktop\Home>

Open in new window

0
 
pony10usCommented:
"Cacls cannot set the following permissions: change permissions, take ownership, execute, delete use XCACLS to set any of these"
0
Get quick recovery of individual SharePoint items

Free tool – Veeam Explorer for Microsoft SharePoint, enables fast, easy restores of SharePoint sites, documents, libraries and lists — all with no agents to manage and no additional licenses to buy.

 
teomcamAuthor Commented:
So what's the syntax for it according to info above?

Regards
0
 
pony10usCommented:
0
 
teomcamAuthor Commented:
what's the syntax for it according to info above?
0
 
pony10usCommented:
I just read the other thread to see what was going on. After reading that and re-reading this one I think maybe this Microsoft KB might help:

http://support.microsoft.com/kb/180464
0
 
teomcamAuthor Commented:
Found the solution at the foreign forum as below.

CD C:\Users\Administrator\Desktop\Home
cacls Home /T /E /R Users
0
 
pony10usCommented:
No objection - just a clarification question so I will know in the future.

So basically it was just that you had it reversed?
0
 
teomcamAuthor Commented:
Hi pony10us,
 No it wasnt reverse. Look carefully and compare please

cacls %i /E /C /R "servername\users"
cacls Home /T /E /R Users
0
 
pony10usCommented:
Okay, I see a difference in switches used:

Added:
    /T            Changes ACLs of specified files in
                  the current directory and all subdirectories.
Removed:
    /C            Continue on access denied errors.
0
 
teomcamAuthor Commented:
Found the solution at the foreign forum as below.

CD C:\Users\Administrator\Desktop\Home
cacls Home /T /E /R Users
0

Featured Post

Keep up with what's happening at Experts Exchange!

Sign up to receive Decoded, a new monthly digest with product updates, feature release info, continuing education opportunities, and more.

  • 6
  • 6
Tackle projects and never again get stuck behind a technical roadblock.
Join Now