ANTICHAT.XYZ    VIDEO.ANTICHAT.XYZ    НОВЫЕ СООБЩЕНИЯ    ФОРУМ  
Баннер 1   Баннер 2
Antichat снова доступен.
Форум Antichat (Античат) возвращается и снова открыт для пользователей. Здесь обсуждаются безопасность, программирование, технологии и многое другое. Сообщество снова собирается вместе.
Новый адрес: forum.antichat.xyz
Вернуться   Форум АНТИЧАТ > Оффтоп > Forum for discussion of ANTICHAT
   
Ответ
 
Опции темы Поиск в этой теме Опции просмотра

Working with LDAP
  #1  
Старый 20.05.2006, 18:38
Аватар для Dracula4ever
Dracula4ever
Постоянный
Регистрация: 08.05.2006
Сообщений: 559
Провел на форуме:
1593567

Репутация: 354


Отправить сообщение для Dracula4ever с помощью ICQ Отправить сообщение для Dracula4ever с помощью AIM Отправить сообщение для Dracula4ever с помощью Yahoo
По умолчанию Working with LDAP

Hey again,

In the last few weeks I was working on an application that works with the Active Directory of Windows 2003 using LDAP.This time my boss told me to write it in Java so i went looking for a technology that implement the connection with the Active Directory and I found OpenLDAP (http://www.openldap.org/). first I was looking for some code examples for the jar and on Novell's site I found http://developer.novell.com/ndk/doc/...Bind.java.html - that was exactly what I was looking for. Still, there was a weird problem with the password checking

attribute = new LDAPAttribute( "userPassword", userPWD );

that got exception every time I ran it ... but without that part the code was running perfectly and I didnt really needed it for my specific application was supposed to open a connection to the Active Directory and that's it.
(I mean: lc.connect( ldapHost, ldapPort ); was enough)
ah yeah, if you are trying to work with LDAP protocol dont forget that the username and password in the Active Directory isnt enough, You need to get the User's full details in the LDAP specific string (the example from the code above was "cn=JSmith,ou=sales,o=Acme")
I dont remember the port I was using exactly but try ports 389/636.
I am almost sure it was one of them.

have fun!
dracula4ever
 
Ответить с цитированием
Ответ





Здесь присутствуют: 1 (пользователей: 0 , гостей: 1)
 


Быстрый переход




ANTICHAT.XYZ