ldap authentication

C

Corey

Dear All,

Has anyone successfully implemented code to authenticate a user against a
non Active Directory LDAP server? I've managed to be able to bind to the
server but am unable to authenticate the users credentials. I either get
"object not found" errors or "invalid username or password errors". The
invalid username or password errors are not correct as the credentials I'm
using I know are correct and exist in the directory.

With thanks.

-Corey
 
R

Rich Blum

Corey said:
Dear All,

Has anyone successfully implemented code to authenticate a user against a
non Active Directory LDAP server? I've managed to be able to bind to the
server but am unable to authenticate the users credentials. I either get
"object not found" errors or "invalid username or password errors". The
invalid username or password errors are not correct as the credentials I'm
using I know are correct and exist in the directory.
Corey -

I have successfully logged in and manipulated data on an OpenLDAP
server using the following syntax:

DirectoryEntry de = new DirectoryEntry(
"LDAP://192.168.1.1/cn=rblum, ou=container1, dc=test1, dc=net",
"cn=Administrator, dc=test1, dc=net", "password",
AuthenticationTypes.ServerBind);

de.Properties["telephoneNumber"].Add("(111)222-3333");
de.CommitChanges();
de.Close();

The first value in the constructor specifies the object to connect
to, the next two specify the user name and password to authenticate
into the LDAP tree with, and the last parameter specifies the
authentication type. Hope this helps some.

Rich Blum - Author
"C# Network Programming" (Sybex)
http://www.sybex.com/sybexbooks.nsf/Booklist/4176
"Network Performance Open Source Toolkit" (Wiley)
http://www.wiley.com/WileyCDA/WileyTitle/productCd-0471433012.html
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top