Solved

LDAP for VB

Posted on 2001-07-25
7
533 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
Master Your Team's Linux and Cloud Stack!

The average business loses $13.5M per year to ineffective training (per 1,000 employees). Keep ahead of the competition and combine in-person quality with online cost and flexibility by training with Linux Academy.

 

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

Does Powershell have you tied up in knots?

Managing Active Directory does not always have to be complicated.  If you are spending more time trying instead of doing, then it's time to look at something else. For nearly 20 years, AD admins around the world have used one tool for day-to-day AD management: Hyena. Discover why

Question has a verified solution.

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

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…
If you need to start windows update installation remotely or as a scheduled task you will find this very helpful.
As developers, we are not limited to the functions provided by the VBA language. In addition, we can call the functions that are part of the Windows operating system. These functions are part of the Windows API (Application Programming Interface). U…
Show developers how to use a criteria form to limit the data that appears on an Access report. It is a common requirement that users can specify the criteria for a report at runtime. The easiest way to accomplish this is using a criteria form that a…

770 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