Link to home
Start Free TrialLog in
Avatar of nganesh
nganesh

asked on

General Access Denied error while unlocking an Account programmatically

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.
ASKER CERTIFIED SOLUTION
Avatar of oBdA
oBdA

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
Avatar of nganesh
nganesh

ASKER

Excellent... Thanks a lot for the same....

Regards,
nganesh.