Pages

Thursday, July 7, 2016

Connect Ldap using Java

LDAP (Lightweight Directory Access Protocol) is a software protocol for enabling anyone to locate organizations, individuals, and other resources such as files and devices in a network, whether on the public Internet or on a corporate intranet. LDAP is a "lightweight" (smaller amount of code) version of Directory Access Protocol (DAP), which is part of X.500, a standard for directory services in a network.
Directory structure strings:
rdnRelative Distinguished Name
dnDistinguished Name
cnCommon Name
ouOrganizational Unit
dcDomain Component
snSurName
As an example, the Entry look like was:
dn: cn=Joe Smith,ou=East,dc=MyDomain,dc=com
 cn: John Doe
 givenName: John
 sn: Doe
 telephoneNumber: +1 888 555 6789
 telephoneNumber: +1 888 555 1232
 mail: john@example.com
 manager: cn=Barbara Doe,dc=example,dc=com
 objectClass: inetOrgPerson
 objectClass: organizationalPerson
 objectClass: person
 objectClass: top