Google Website Translator Gadget

Mostrando entradas con la etiqueta JNDI. Mostrar todas las entradas
Mostrando entradas con la etiqueta JNDI. Mostrar todas las entradas

jueves, 29 de marzo de 2012

LDAP errors

Microsoft Active Directory
Microsoft Active Directory
Al intentar fer les connexions des de Tomcat a LDAP m'he trobat amb molts errors.
Aquí hi ha una pista del que signifiquen aquests errors i com generar-los i capturar-los:

[LDAP: error code 49 - 80090308: LdapErr: DSID-0C0903A9, 
comment: AcceptSecurityContext error, data 52e, v1db1]

Error Code Description Java Exception
34 - 0000208FProblem 2006 DN (distinghishedName) not foundInvalidNameException
525 user not found
52e invalid credentials
530 not permitted to logon at this time
531 not permitted to logon at this workstation
532 password expired (remember to check the user set in osuser.xml also)
533 account disabled
701 account expired
773 user must reset password
775 user account locked



 Informació addicional:

Java - JNDI LDAP exceptions

sábado, 18 de febrero de 2012

JNDI Queries complexes amb Searchcontrols

Una de les opcions més interesants es la possibilitat de crear cerques complexes amb l'ús de Searchcontrols

String query_filter = "(|(cn=*"+pCanonicalName+"*) (sAMAccountName=*"+pCanonicalName+"*))";

Cal recordar que l'operador va abans dels operands.

Operadors:
SymbolDescription
&conjunction (i.e.,and -- all in list must be true)
| disjunction (i.e.,or -- one or more alternatives must be true)
!negation (i.e.,not -- the item being negated must not be true)
=equality (according to the matching rule of the attribute)
~= approximate equality (according to the matching rule of the attribute)
>=greater than (according to the matching rule of the attribute)
<=less than (according to the matching rule of the attribute)
=*presence (i.e., the entry must have the attribute but its value is irrelevant)
* wildcard (indicates zero or more characters can occur in that position); used when specifying attribute values to match
\escape (for escaping '*', '(', or ')' when they occur inside an attribute value)



Sources:
http://docs.oracle.com/javase/tutorial/jndi/ops/index.html
http://docs.oracle.com/javase/tutorial/jndi/ops/filter.html