?
Solved

LDAP SEARCH

Posted on 2012-03-20
2
Medium Priority
?
526 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
2 Comments
 
LVL 35

Accepted Solution

by:
Duncan Roe earned 2000 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

Free recovery tool for Microsoft Active Directory

Veeam Explorer for Microsoft Active Directory provides fast and reliable object-level recovery for Active Directory from a single-pass, agentless backup or storage snapshot — without the need to restore an entire virtual machine or use third-party tools.

Question has a verified solution.

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

In this post we will learn different types of Android Layout and some basics of an Android App.
Often times it's very very easy to extend a volume on a Linux instance in AWS, but impossible to shrink it. I wanted to contribute to the experts-exchange community a way of providing a procedure that works on an AWS instance. It can also be used on…
In this fourth video of the Xpdf series, we discuss and demonstrate the PDFinfo utility, which retrieves the contents of a PDF's Info Dictionary, as well as some other information, including the page count. We show how to isolate the page count in a…
Loops Section Overview
Suggested Courses

840 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