Google Website Translator Gadget

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

martes, 18 de febrero de 2014

LDAP Active Directory: com obtenir el SID dels objectes.

Microsoft Active Directory
Microsoft Active Directory
Quan gestiones una xarxa gran de usuaris amb Active Directory et calen eines per a fer tasques massivament.
Una de les coses habituals es extreure un llistat de objectes a Excel.



Els objectes estan identificats internament, amb independència del nom amb que es presenten, en un camp anomenat objectSID amb un format semblant a: S-1-5-21-xxx però si consultes el camp el que et trobes es un llarg hexadecimal 01050051500DFEADFEADFEADFEADFEADFEADFEA


Com fer la conversió de objectSID al format llegible?

He utilitzat aquest VisualBasic script per a fer la conversió:

v_SID_AD1 = fnGet_HexString(p_objRecordSet.Fields("objectSid").Value)

on la funció esta definida de la següent manera:

Function fnGet_HexString(intSID)
  Dim strRet, i, b
  strRet = ""
      
  For i = 0 To UBound(intSID)
   b = Hex(AscB(MidB(intSID, i + 1, 1)))
   If (Len(b) = 1) Then b = "0" & b
    strRet = strRet & b
  Next

  fnGet_HexString = fnHexStrToDecStr(strRet)
End Function



Enllaços relacionats:




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

LDAP Active Directory Attributes

Microsoft Active Directory
Microsoft Active Directory
Una manera ràpida de consultar la infinita llista de atributs existents al Active Directory LDAP de Microsoft:

http://msdn.microsoft.com/en-us/library/ms675090(VS.85).aspx


Encara que potser si estàs programant en Java deu ser perquè vols ser el màxim standard possible i no hauràs arribat a aquest blog....




Enllaços relacionats:


martes, 14 de febrero de 2012

LDAP objectClass and objectCategory

Microsoft Active Directory
Microsoft Active Directory
Quan busques la manera de identificar la classe de un objecte LDAP Active Directory ens trobem 2 variables:
  • objectClass
  • objectCategory
Exemples:




He trobat la següent informació a Microsoft:
objectClass
Each instance of an object class has a multi-valued objectClass property that identifies the class of which the object is an instance, as well as all structural or abstract superclasses from which that class is derived.
Thus, the objectClass property of a user object would identify the top, person, organizationalPerson, and user classes.
The objectClass property does not include auxiliary classes in the list. The system sets the objectClass value when the object instance is created and it cannot be changed.
Important  The objectClass attribute is not indexed (Nota: A la pàgina origen - a baix - hi ha un comentari que diu que si indexa des de Windows 2008).

objectCategory
Each instance of an object class also has an objectCategory property, which is a single-valued property that contains the distinguished name of either the class of which the object is an instance or one of its superclasses.
When an object is created, the system sets its objectCategory property to the value specified by the defaultObjectCategory property of its object class. An object's objectCategory property cannot be changed.

To locate objects of a given class, use the objectCategory attribute, which is single-valued and indexed.
For most classes, the defaultObjectCategory is the distinguished name of the class's classSchema object. For example, the defaultObjectCategory for the organizationalUnit class is "CN=Organizational-Unit,CN=Schema,CN=Configuration,<DC=forestroot>". However, some classes refer to another class as their defaultObjectCategory. This allows a query to readily find groups of related objects, even if they are of differing classes. For example, the user, person, organizationalPerson, and contact classes all identify the person class in their defaultObjectCategory properties. This allows search filters like (objectCategory=person) to locate instances of all these classes with a single query. Queries for people are very common, so this is a simple optimization.

From:
http://msdn.microsoft.com/en-us/library/windows/desktop/ms677612(v=vs.85).aspx

Enllaços relacionats: