Solved

LDAP for VB

Posted on 2001-07-25
7
523 Views
Last Modified: 2010-05-18
I want to connect and authenticate user to an LDAP server using VB. I also want to change my password on the LDAP server using VB. Are there any available OCX (free) that can be used? Any sample

Thanks
0
Comment
Question by:puruknoy
  • 4
  • 2
7 Comments
 
LVL 8

Expert Comment

by:Dave_Greene
ID: 6316914
Go here and search the page for LDAP.. they have code samples

http://developer.novell.com/support/sample/areas/vbs.htm
0
 

Accepted Solution

by:
jackyx earned 200 total points
ID: 6316942
You must install the ADSI runtime (ADS.EXE) available from www.microsoft.com/ntserver/info/adsi.htm, and then add a reference to Active DS Type Library.

Note: Windows 2000 includes the ADSI 2.5 runtime. Installation of the above runtime is not required.

Here is some code snippet (not completed) but it will help you get going.  Once you referenced ADSI 2.5 you will find all objects in the object explorer (F2 key).

You will find all the needed info in the net or look at the ADSI samples in VB from Microsoft website.

...
'Declaration here
Dim machinename As IADs...
Dim username As IADS...
...
'Make the ADSI call for password change
Set oUser = GetObject("WinNT://machinename/username")
oUser.ChangePassword "oldpassword", "newpassword"
oUser.SetInfo
Set oUser = Nothing
...

Well i hope this was what you needed.

Regards

jackyx
0
 
LVL 8

Expert Comment

by:Dave_Greene
ID: 6316963
jackyx.

Please the the section "Tips on Comments and Answers" at the bottom of this page.

Hint:  if you have to put something like ("Well i hope this was what you needed.") in your post, it should probably be a comment.

Thanks

Dave
0
Do You Know the 4 Main Threat Actor Types?

Do you know the main threat actor types? Most attackers fall into one of four categories, each with their own favored tactics, techniques, and procedures.

 

Author Comment

by:puruknoy
ID: 6320347
I still have to try that solution, Dave green was right but anyway thanks for the tip and effort.
0
 

Author Comment

by:puruknoy
ID: 6320403
Dave_Green, where can i find the LDAPSDK Library to be used in the VB sample program?

http://developer.novell.com/support/sample/areas/vbs.htm

Thanks
0
 

Author Comment

by:puruknoy
ID: 6320522
Dave_Green, where can i find the LDAPSDK Library to be used in the VB sample program?

http://developer.novell.com/support/sample/areas/vbs.htm

Thanks
0
 

Author Comment

by:puruknoy
ID: 6320587
Dave_Green, where can i find the LDAPSDK Library to be used in the VB sample program?

http://developer.novell.com/support/sample/areas/vbs.htm

Thanks
0

Featured Post

How your wiki can always stay up-to-date

Quip doubles as a “living” wiki and a project management tool that evolves with your organization. As you finish projects in Quip, the work remains, easily accessible to all team members, new and old.
- Increase transparency
- Onboard new hires faster
- Access from mobile/offline

Join & Write a Comment

There are many ways to remove duplicate entries in an SQL or Access database. Most make you temporarily insert an ID field, make a temp table and copy data back and forth, and/or are slow. Here is an easy way in VB6 using ADO to remove duplicate row…
Introduction While answering a recent question about filtering a custom class collection, I realized that this could be accomplished with very little code by using the ScriptControl (SC) library.  This article will introduce you to the SC library a…
Get people started with the process of using Access VBA to control Excel using automation, Microsoft Access can control other applications. An example is the ability to programmatically talk to Excel. Using automation, an Access application can laun…
This lesson covers basic error handling code in Microsoft Excel using VBA. This is the first lesson in a 3-part series that uses code to loop through an Excel spreadsheet in VBA and then fix errors, taking advantage of error handling code. This l…

747 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

Need Help in Real-Time?

Connect with top rated Experts

13 Experts available now in Live!

Get 1:1 Help Now