Solved

LDAP SEARCH

Posted on 2012-03-20
2
519 Views
Last Modified: 2013-11-13
Hi,

I need a shell script to export the users from AD to a file.

I tryed this scritp but when I run the script the system show the message:

Additional information: 0000208F: LdapErr: DSID-0C090654, comment: Error processing name, data 0, vece

ldapsearch -LLL  -h $ADDSERVER:389 -D $EMAIL_SERVER -w $PASSWD_SERVER -b \"$DOMINIO_SERVER\" -E pr=100000/noprompt

If I change the variables and execute the command, It's work fine.

I tryed:
 command="ldapsearch -LLL  -h $ADDSERVER:389 -D $EMAIL_SERVER -w $PASSWD_SERVER -b \"$DOMINIO_SERVER\" -E pr=100000/noprompt"

echo command

And paste the result in the prompt and worked very well.

Anyone knows what is the problem?:q!
0
Comment
Question by:berechit
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
2 Comments
 
LVL 34

Accepted Solution

by:
Duncan Roe earned 500 total points
ID: 37746575
When issuing as a command directly, you don't want to put backslashes before the quotes. i.e. \"$DOMINIO_SERVER\" should be "$DOMINIO_SERVER"
0
 
LVL 5

Expert Comment

by:1ly4me
ID: 37747543
try with wbinfo command.
#wbinfo -u (Lists all domain users from windows domain)
0

Featured Post

Simple, centralized multimedia control

Watch and learn to see how ATEN provided an easy and effective way for three jointly-owned pubs to control the 60 televisions located across their three venues utilizing the ATEN Control System, Modular Matrix Switch and HDBaseT extenders.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

This is about my first experience with programming Arduino.
An article on effective troubleshooting
In this fifth video of the Xpdf series, we discuss and demonstrate the PDFdetach utility, which is able to list and, more importantly, extract attachments that are embedded in PDF files. It does this via a command line interface, making it suitable …
This demo shows you how to set up the containerized NetScaler CPX with NetScaler Management and Analytics System in a non-routable Mesos/Marathon environment for use with Micro-Services applications.

705 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question