10-30-2003, 01:36 AM | #1 (permalink) |
Devils Cabana Boy
Location: Central Coast CA
|
win 2k scripting
ok i need a command to change the file permissions on a folder
background: i need to lock down my computer so i wrote a script to first remove all shares (even c$, admin$ ipc$...) then it remaps them to random folders on my drive i then want to deny access to these folders to everyone so that they can not be acessed. here is what i have so far. md c:\goaway\A$ md c:\goaway\B$ ... md c:\goaway\Z$ REM this makes all the directories to be mapped they go to net share A$ /delete net share B$ /delete ... net share Z$ /delete net share ADMIN$ /delete net share IPC$ /delete REM this removes all the hidden shares net share A$=c:\goaway\a$ net share B$=c:\goaway\b$ ... net share A$=c:\goaway\a$ REM this remaps all the shares to the folders. Cacls c:\goaway\a$ /d everyone Cacls c:\goaway\b$ /d everyone ... Cacls c:\goaway\c$ /d everyone REM this changes the permission to deny for the usergroup everyone the only problem is that i have to accept by pressing y and enter to confirm it, i cant have this confirm i need it to run with out confirmation. and help?
__________________
Donate Blood! "Love is not finding the perfect person, but learning to see an imperfect person perfectly." -Sam Keen |
10-30-2003, 02:07 AM | #2 (permalink) |
Devils Cabana Boy
Location: Central Coast CA
|
ah i figured it out
ECHO Y |Cacls c:\goaway /d everyone teh ECHO Y drops the y for me and accepts it, while were at it, any one here script? the old art of .bat files?
__________________
Donate Blood! "Love is not finding the perfect person, but learning to see an imperfect person perfectly." -Sam Keen |
10-31-2003, 12:32 PM | #4 (permalink) |
Devils Cabana Boy
Location: Central Coast CA
|
this is legit hacking though, its in school and we are alowed to hack the teachers computer to learn security
its loads of fun
__________________
Donate Blood! "Love is not finding the perfect person, but learning to see an imperfect person perfectly." -Sam Keen |
Tags |
scripting, win |
|
|