Empresas
Empregos
  • Sobre nós
  • Soluções
    • Publicação de vagas
      Publique sua vaga e receba candidatos qualificados em 48h.
    • Avaliações de candidatos
      Mais de 500 testes técnicos e psicológicos, mais anti-fraude.
    • Headhunting
      Busca executiva personalizada do início ao fim.
    • Folha de Pagamento + EOR
      Dispersão de folha e EOR em mais de 15 países da LATAM.
  • Preços
  • Empregos

0

257
Visualizações
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 Respostas
Responde à pergunta

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 Relatório
Responde à pergunta
Encontrar trabalhos remotos

Descubra a nova forma de encontrar um emprego!

melhores empregos
Principais categorias de trabalho
Empresas
Postar vaga Preços Comercial
Jurídico
Termos e Condições Política de privacidade
© 2026 PeakU Inc. All Rights Reserved.
Andres GPT
Recomende algumas ofertas para mim
Preciso de ajuda