?
Solved

General Access Denied error while unlocking an Account programmatically

Posted on 2004-08-18
2
Medium Priority
?
1,318 Views
Last Modified: 2013-12-04
Hi,

I use the following code to reset a locked account:

userid = "someUser"
Set objUser = GetObject("WinNT://server/" & userid)
objUser.AccountDisabled = False
objUser.SetInfo
Set objUser = Nothing

But I get the following error when executed while logging as a user with delegated privileges:

Active Directory error '80070005'
General access denied error

I followed the same steps mentioned in the microsoft KB article for delegating permissions:
http://www.microsoft.com/technet/prodtechnol/windows2000serv/howto/delestep.mspx

Is there anything I have missed out?

Please help..

Regards,
nganesh.
0
Comment
Question by:nganesh
2 Comments
 
LVL 85

Accepted Solution

by:
oBdA earned 1000 total points
ID: 11835525
Yes, you missed to set the proper permissions--which is not really your fault, because the "unlock account" permissions are hidden by default. You can either edit the dssec.dat file to show this in the regular ADUC MMC (which is what I do), or go directly at it with ADSIEdit.

How To Delegate the Unlock Account Right
http://support.microsoft.com/?kbid=294952

HOW TO: Grant a User the Right to Unlock a Locked Account
http://support.microsoft.com/?kbid=312012
0
 
LVL 1

Author Comment

by:nganesh
ID: 11838037
Excellent... Thanks a lot for the same....

Regards,
nganesh.
0

Featured Post

Upgrade your Question Security!

Add Premium security features to your question to ensure its privacy or anonymity. Learn more about your ability to control Question Security today.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Security measures require Windows be logged in using Standard User login (not Administrator).  Yet, sometimes an application has to be run “As Administrator” from a Standard User login.  This paper describes how to create a shortcut icon to launch a…
Container Orchestration platforms empower organizations to scale their apps at an exceptional rate. This is the reason numerous innovation-driven companies are moving apps to an appropriated datacenter wide platform that empowers them to scale at a …
Please read the paragraph below before following the instructions in the video — there are important caveats in the paragraph that I did not mention in the video. If your PaperPort 12 or PaperPort 14 is failing to start, or crashing, or hanging, …
Is your OST file inaccessible, Need to transfer OST file from one computer to another? Want to convert OST file to PST? If the answer to any of the above question is yes, then look no further. With the help of Stellar OST to PST Converter, you can e…

850 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question