Jump to content
Sign in to follow this  
zsleo

Active Directory unlock a user

Recommended Posts

I have tried ADSI and a number of other APIs and I am successfully retrieving user credential but can find how to change the ADS user to unlock a user.

Does anyone direct me how to or know where to find Delphi code to unlock an Active Directory user account.

I could only retrieve status but not find a method to update the ADS record. I am using the ADSI API. Here is and extract of the code: 

procedure TForm1.btn3Click(Sender: TObject);
var
 lv_User: TADSIUserInfo;
 lv_Err: string;
 lv_P: TPassword;
begin
 lbl1.Caption := '';
 if ads1.GetUser(gv_Domain, kbmtblUsersUserName.AsString, lv_User, lv_Err) then
 begin
  chk1.Checked := lv_User.LockedOut;
    (... other code to display AD User Details...)
 end
 else
  lbl1.Caption := 'User not found';
end;


TIA

Share this post


Link to post
11 hours ago, Steku said:

Not shure if it helps, but maybe worth a try...

 

This guy here ist doing some AD user related stuff, unfortunatly the site is only in german available.

https://www.rathlev-home.de/tools/admintools.html

 

Greetings

Steku

Thank you.

 

I looked and it seems to put me on the correct track to solve my problem.

 

Share this post


Link to post

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
Sign in to follow this  

×