Solved

LDAP SEARCH

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

IT, Stop Being Called Into Every Meeting

Highfive is so simple that setting up every meeting room takes just minutes and every employee will be able to start or join a call from any room with ease. Never be called into a meeting just to get it started again. This is how video conferencing should work!

Join & Write a Comment

Suggested Solutions

Title # Comments Views Activity
What is Python programming? 3 68
Issue with  IP address/conflict 10 49
LINUX, CPANEL & WHM 5 23
Network Switch Connections 8 32
Since upgrading to Office 2013 or higher installing the Smart Indenter addin will fail. This article will explain how to install it so it will work regardless of the Office version installed.
Whether you've completed a degree in computer sciences or you're a self-taught programmer, writing your first lines of code in the real world is always a challenge. Here are some of the most common pitfalls for new programmers.
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…
Connecting to an Amazon Linux EC2 Instance from Windows Using PuTTY.

760 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

Need Help in Real-Time?

Connect with top rated Experts

20 Experts available now in Live!

Get 1:1 Help Now