[THIN] Re: OT: script bulk NTFS changes

  • From: "Jay Jukes" <thin@xxxxxxxx>
  • To: <thin@xxxxxxxxxxxxx>
  • Date: Mon, 13 Dec 2004 23:31:50 +0930

Would Dumpsec help you here? (it produces a report of the existing ACLs)
http://www.somarsoft.com/



-----Original Message-----
From: thin-bounce@xxxxxxxxxxxxx [mailto:thin-bounce@xxxxxxxxxxxxx] On Behalf
Of Pavlo Ignatusha
Sent: Monday, 13 December 2004 11:18 PM
To: Org Thin (E-mail)
Subject: [THIN] OT: script bulk NTFS changes

Hi list.

This is a bit off-topic but I know there are script gurus out here that can
help me out (and they did a lot in the past-thanks Neil).

We are migrating users to new accounts in AD. Obviously the NTFS permissions
given to old accounts will not work once user is given a new account. I need
to change ACL for all the files and folders. Current NTFS permissions are
mess, some inheritance is there but lots of manual setting per user
exist...I would like to script bulk NTFS changes like this:

1. have source file that I feed the script with. This way I establish old
user account mapping to new account:

jdoe = John Doe
pignatusha = Pavlo Ignatusha

2. browse file and folder structure and read ACL on every object.
3. if user's old account is explicitly there add user's new account to the
ACL.

I sure have no problem creating the user name mapping file. I will figure
how to script permission change as well (cacls, setacl, etc). The
challenging part is the browse function because I'm not sure how to make
script to move along the folder tree structure. This is what I need the most
help with. Does anybody has an idea or better yet a sample of how to script
through the drive folder structure?

Thanks,

Pavlo Ignatusha
Systems Network Coordinator
Pembroke General Hospital
Tel. (613) 732-3675 ext.6150
Fax. (613) 732-9986
www.pemgenhos.org

"All that matters is love and work" - Sigmund Freud.

********************************************************
This Weeks Sponsor SeamlessPlanet.com Domain Names
Register your .com domain name for as low as $7.85
One of the lowest prices on the web! Part of The Kenzig Group.
http://www.seamlessplanet.com
********************************************************** 
Useful Thin Client Computing Links are available at:
http://thin.net/links.cfm
ThinWiki community - Awesome SBC Search Capabilities!
http://www.thinwiki.com
***********************************************************
For Archives, to Unsubscribe, Subscribe or 
set Digest or Vacation mode use the below link:
http://thin.net/citrixlist.cfm

********************************************************
This Weeks Sponsor SeamlessPlanet.com Domain Names
Register your .com domain name for as low as $7.85
One of the lowest prices on the web! Part of The Kenzig Group.
http://www.seamlessplanet.com
********************************************************** 
Useful Thin Client Computing Links are available at:
http://thin.net/links.cfm
ThinWiki community - Awesome SBC Search Capabilities!
http://www.thinwiki.com
***********************************************************
For Archives, to Unsubscribe, Subscribe or 
set Digest or Vacation mode use the below link:
http://thin.net/citrixlist.cfm

Other related posts: