Re: Setting rights on an AD account using vb



Albert Kikkert wrote:

I'm looking for a way to set security rights on an active diectory user
account using Vbscript.
The thing is, we have a lot of users (12.000) in one OU and we have
multiple account operators.
However we don't want ALL operators to be able to manage all accounts.
Creating sub-OU's is not an option because users can have multiple jobs in
our company and consequently have multiple operators.

Therefore I want to be able to give account operators rights on accounts,
but ONLY the ones I want them to manage.

I found that I could get the security information using the
"ntSecurityDescriptor" object, but I cannot find anything to set them.

If anyone could post up a code snippet or at least point me in the right
direction I'd really appreciate it.

I have an example VBScript program that assigns the deny permissions
required so a user cannot change their password linked here:

http://www.rlmueller.net/Cannot%20Change%20PW.htm

This demonstrates the techniques involved for assigning any permissions. The
following example removes these permissions, which allows the user to change
their password:

http://www.rlmueller.net/Can%20Change%20PW.htm

Check kb 269159 for info on when re-ordering ace's is required. I believe it
is not needed if your client is XP or W2k3:

http://support.microsoft.com/kb/269159

--
Richard Mueller
Microsoft MVP Scripting and ADSI
Hilltop Lab - http://www.rlmueller.net
--


.



Relevant Pages

  • Re: adminDSholder being over zealous!
    ... I have experienced the same problems, where users in members of groups ... without the account ACLs reverting to match AdminSDHolder. ... account operators can manage their own accounts or the ... >>A supported fix is now available from Microsoft, ...
    (microsoft.public.win2000.security)
  • Re: Setting rights on an AD account using vb
    ... I'm not sure about how to do this in vbscript, but i'm pretty sure subinacl could do it. ... I'm looking for a way to set security rights on an active diectory user account using Vbscript. ... Creating sub-OU's is not an option because users can have multiple jobs in our company and consequently have multiple operators. ... Therefore I want to be able to give account operators rights on accounts, but ONLY the ones I want them to manage. ...
    (microsoft.public.scripting.vbscript)
  • Re: Setting rights on an AD account using vb
    ... I think I'll be going with the subinacl solution. ... multiple account operators. ... Creating sub-OU's is not an option because users can have multiple jobs ... Therefore I want to be able to give account operators rights on accounts, ...
    (microsoft.public.scripting.vbscript)
  • Re: Permission for user account in AD
    ... Setting tab for UserAccount - Account Operators has ... was removed from Permissions entries... ...
    (microsoft.public.win2000.active_directory)
  • Re: Account Operators accessing other account operators
    ... account from the account operators group as that is a protected group by AD ... attribute to NOT SET and enable permissions inheritance on the objects. ... If the ACL that is on the AdminSDHolder object is ...
    (microsoft.public.windows.server.active_directory)

Loading