Empresas
Empleos
  • Sobre nosotros
  • Soluciones
    • Publicación de vacantes
      Publica tu vacante y recibe candidatos calificados en 48h.
    • Evaluación de candidatos
      500+ pruebas técnicas y psicológicas, más anti-fraude.
    • Headhunting
      Búsqueda ejecutiva a la medida de principio a fin.
    • Nómina + EOR
      Dispersión de nómina y EOR en más de 15 países de LATAM.
  • Precios
  • Empleos

0

255
Vistas
ldapsearch: possible to include user attributes in the output/result even if the attribute is not set or null?

Dear stackoverflow community, time to ask my first (and maybe stupid) question here :)

I am facing the following problem at the moment and hope that maybe some of you can help me with this: for reasons, I have to query our Active-Directory to get some user data and write it into an CSV file on my Linux machine. For the query, I use the ldapsearch utility. Basically I was able to get this to work and query the user attributes i need. Now I'm facing the problem, that I have some users, that dont have one or more of the queried attributes set (e.g. "othertelephone"). In this case, ldapsearch does not include these empty attribute(s) in the output/result. Is there a possibility to include all queried attributes in the result/output, even if they are not set or empty? The reasons I need this, is to keep a uniform clean format of the output (to convert the output into CSV easily later on). So e.g. if Attribute "othertelephone" is empty, I want to have the output looks like that:

sn: abc
givenName: xyz
othertelephone: 
memberOf: blablabla

instead of

sn: abc
givenName: xyz
memberOf: blablabla

Sadly, I have not found any switch of the ldapsearch command with which I can achieve this. Is this even possible with ldapsearch or which other way can i go? I am thankful for every hint you can give to a beginner.

over 4 years ago · Santiago Trujillo
1 Respuestas
Responde la pregunta

0

I know of no ldapsearch utilities that will return empty values.

However you can use Apache Studio and do the search and then copy table (icon in upper right) then pasting into text editor and achieve almost the same result.

over 4 years ago · Santiago Trujillo Denunciar
Responde la pregunta
Encuentra empleos remotos

¡Descubre la nueva forma de encontrar empleo!

Top de empleos
Top categorías de empleo
Empresas
Publicar vacante Precios Comercial
Legal
Términos y condiciones Política de privacidad
© 2026 PeakU Inc. All Rights Reserved.
Andres GPT
Recomiéndame algunas ofertas
Necesito ayuda