I recently had to write a script to change permissions on shares from
Change to Full Control for a couple of thousand users due to the NT
4.0/2000 Roaming profile share permissions requirement differences. I
looked at doing this with ADSI and was able to create shares, etc but
was unable to set the Share permissions. 
Then had a look at using the ADSSECURITY.DLL SecurityDescriptor methods
in the Platform SDK and found that it was OK against Files, Folders but
unable to apply against shares. 
Las throw of the dice was doing it in VB and using the NetAPI.dll
(NetCreateShare, NetShareSetInfo, etc) and AdvApi.dll (AddACE, etc) API
calls. This was becoming long winded and for support reasons we needed
it yesterday. End result:

- Wrote a VBS script to wrap logic around the resource kit RMTSHARE
utility to Change the permissions on existing shares.
- Completed VB app to remove 'Unknown' references in shares resulting
from decommissioned domains as part of the migration.

(both tools had to work regardless of the server being Win2K or NT 4.0
as such support for scripting interfaces beyond WINNT could not be used,
hence the drive towards API's)

Cheers

David


-----Original Message-----
From: [EMAIL PROTECTED]
[mailto:[EMAIL PROTECTED]] On Behalf Of Baker, David
Sent: 08 April 2002 21:07
To: [EMAIL PROTECTED]
Subject: [ActiveDir] Want to create shares and set up permissions


We have just created 100 user directories.  What is the easiest way to
automate:

1) Creating each one as a share.

2) Setting the permissions on each one to allow that user change
permissions, and adminstrators full.

Thanks,

David
List info   : http://www.activedir.org/mail_list.htm
List FAQ    : http://www.activedir.org/list_faq.htm
List archive:
http://www.mail-archive.com/activedir%40mail.activedir.org/

---
Incoming mail is certified Virus Free.
Checked by AVG anti-virus system (http://www.grisoft.com).
Version: 6.0.344 / Virus Database: 191 - Release Date: 02/04/2002
 

---
Outgoing mail is certified Virus Free.
Checked by AVG anti-virus system (http://www.grisoft.com).
Version: 6.0.344 / Virus Database: 191 - Release Date: 02/04/2002
 

List info   : http://www.activedir.org/mail_list.htm
List FAQ    : http://www.activedir.org/list_faq.htm
List archive: http://www.mail-archive.com/activedir%40mail.activedir.org/

Reply via email to