Active Directory

Posted on 2006-05-29
Medium Priority
Last Modified: 2008-01-09
I need to write a login screen with validation by Active Directory but I am not sure how to do it. Would any kind experts please guide me how I can pass a userid and password to Active Directory to verify a user.

I've looked at a few sources such as:

but I can't find anything on userid and password validation.

Question by:delphikit
  • 2
LVL 28

Expert Comment

ID: 16787964
you could try and just log in using that user and pass. I took a look at the demo on that article and the button3 on bindigs demo does the job ;)

Author Comment

ID: 16788403
Hi ciuly,

Thanks for pointing out the demo to me. I did played around with it. But why is it I can only verify my current user id and password and not others?

If I tried using other userid and password besides my own I get this error:

Multiple connections to a server or shared resource by the same user, using more than one user name, are not allowed. Disconnect all previous connections to the server or shared resource and try again.

If I tried using my own userid and password it shows me:

I've changed the on click procedure to:

procedure TForm1.Button3Click(Sender: TObject);
var hr : integer;
    obj : IADs;
  hr := ADsOpenObject('WinNT://' + DOMAINNAME, edUserID.text, edPassword.text,
           ADS_PROMPT_CREDENTIALS , IADs, obj );
  if Succeeded(hr) then
     ShowMessage(obj.Name + ',' + obj.ADsPath);

LVL 28

Accepted Solution

2266180 earned 375 total points
ID: 16788453
that is some policy on your domain that restricts one user to one logon session. mine has something like if you miss the password the account is locked for some period of time. and of course that when I tested the code... I used a bad password so to see that indeed it worked. guess what happened when I tried to log on correctly :)
the best way to test such thing is using a test domain. those usually don't have much restrictions and you can do whatever you like. if you are in a software development company, then you must have some test domains (qa is usually using those)

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

Have you ever had your Delphi form/application just hanging while waiting for data to load? This is the article to read if you want to learn some things about adding threads for data loading in the background. First, I'll setup a general applica…
Introduction Raise your hands if you were as upset with FireMonkey as I was when I discovered that there was no TListview.  I use TListView in almost all of my applications I've written, and I was not going to compromise by resorting to TStringGrid…
Exchange organizations may use the Journaling Agent of the Transport Service to archive messages going through Exchange. However, if the Transport Service is integrated with some email content management application (such as an anti-spam), the admin…
In a question here at Experts Exchange (https://www.experts-exchange.com/questions/29062564/Adobe-acrobat-reader-DC.html), a member asked how to create a signature in Adobe Acrobat Reader DC (the free Reader product, not the paid, full Acrobat produ…
Suggested Courses
Course of the Month16 days, 11 hours left to enroll

862 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