?
Solved

General Access Denied error while unlocking an Account programmatically

Posted on 2004-08-18
2
Medium Priority
?
1,313 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
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
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

Independent Software Vendors: We Want Your Opinion

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

Question has a verified solution.

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

As I write this article, I am finishing cleanup from the Qakbot virus variant found in the wild on April 18, 2011.  It was a messy beast that had varying levels of infection, speculated as being dependent on how long it resided on the infected syste…
No security measures warrant 100% as a "silver bullet". The truth is we also cannot assume anything but a defensive and vigilance posture. Adopt no trust by default and reveal in assumption. Only assume anonymity or invisibility in the reverse. Safe…
In this video you will find out how to export Office 365 mailboxes using the built in eDiscovery tool. Bear in mind that although this method might be useful in some cases, using PST files as Office 365 backup is troublesome in a long run (more on t…
In this video, Percona Solutions Engineer Barrett Chambers discusses some of the basic syntax differences between MySQL and MongoDB. To learn more check out our webinar on MongoDB administration for MySQL DBA: https://www.percona.com/resources/we…
Suggested Courses

741 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