Solved

LDAP SEARCH

Posted on 2012-03-20
2
518 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 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

Microsoft Certification Exam 74-409

Veeam® is happy to provide the Microsoft community with a study guide prepared by MVP and MCT, Orin Thomas. This guide will take you through each of the exam objectives, helping you to prepare for and pass the examination.

Question has a verified solution.

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

Suggested Solutions

This article offers some helpful and general tips for safe browsing and online shopping. It offers simple and manageable procedures that help to ensure the safety of one's personal information and the security of any devices.
Resolve DNS query failed errors for Exchange
An introduction to basic programming syntax in Java by creating a simple program. Viewers can follow the tutorial as they create their first class in Java. Definitions and explanations about each element are given to help prepare viewers for future …

730 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