teomcam
asked on
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
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
Try preceeding the "Servername" with a double backslash: \\
ASKER
Hi,
It did not work.
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>
"Cacls cannot set the following permissions: change permissions, take ownership, execute, delete use XCACLS to set any of these"
ASKER
So what's the syntax for it according to info above?
Regards
Regards
ASKER
what's the syntax for it according to info above?
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
http://support.microsoft.com/kb/180464
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
No objection - just a clarification question so I will know in the future.
So basically it was just that you had it reversed?
So basically it was just that you had it reversed?
ASKER
Hi pony10us,
No it wasnt reverse. Look carefully and compare please
cacls %i /E /C /R "servername\users"
cacls Home /T /E /R Users
No it wasnt reverse. Look carefully and compare please
cacls %i /E /C /R "servername\users"
cacls Home /T /E /R Users
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.
Added:
/T Changes ACLs of specified files in
the current directory and all subdirectories.
Removed:
/C Continue on access denied errors.
ASKER
Found the solution at the foreign forum as below.
CD C:\Users\Administrator\Des ktop\Home
cacls Home /T /E /R Users
CD C:\Users\Administrator\Des
cacls Home /T /E /R Users