?
Solved

LDAP SEARCH

Posted on 2012-03-20
2
Medium Priority
?
520 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 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

Basic Security of Your VPC

So, you’ve got this shiny new VPC and a fancy new application configured on your EC2 servers ready to go. This application is only accessible from your computer, which is great for security, but you need your users to be able to access it! So, what’s the easiest way to do this?

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.
The SignAloud Glove is capable of translating American Sign Language signs into text and audio.
Learn several ways to interact with files and get file information from the bash shell. ls lists the contents of a directory: Using the -a flag displays hidden files: Using the -l flag formats the output in a long list: The file command gives us mor…
Learn how to get help with Linux/Unix bash shell commands. Use help to read help documents for built in bash shell commands.: Use man to interface with the online reference manuals for shell commands.: Use man to search man pages for unknown command…
Suggested Courses

800 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