Operating System - Linux
1822732 Members
3806 Online
109644 Solutions
New Discussion юеВ

How can I use ldapsearch at HPUX

 
Sak
Occasional Advisor

How can I use ldapsearch at HPUX

When I use ./ldapsearch -x -b 'dc=stooges,dc=com' '(objectclass=*)' command it got the following error.

ldap_search: Can't connect to the LDAP server - Connection refused


How should me do?

Thank you
3 REPLIES 3
Steven E. Protter
Exalted Contributor

Re: How can I use ldapsearch at HPUX

Shalom,

Most ldap servers requires an admin id and password to do the ldapsearch.

$CMD = "/usr/local/bin/ldapsearch" ;
$DC = "ldap.is.ndr.com" ;
$DN = "CN=username\\, Somerset,OU=users,OU=Jerusalem,DC=is,DC=ndr,DC=com" ;
$PASSWD = "Schobagel123" ;
$ROOT_DOMAIN = "dc=ndr,dc=com" ;
$cmd = "$CMD -x -p $PORT -z 0 -h $DC -D \"$DN\" -w $PASSWD -b \"$ROOT_DOMAIN\" \"$EXPR\" $ATTR" ;

We ran this in perl but the principel is the same.

SEP



Steven E Protter
Owner of ISN Corporation
http://isnamerica.com
http://hpuxconsulting.com
Sponsor: http://hpux.ws
Twitter: http://twitter.com/hpuxlinux
Founder http://newdatacloud.com
Sak
Occasional Advisor

Re: How can I use ldapsearch at HPUX

What do you mean Stephen ???
You guide me to do that you say is it?
Steven E. Protter
Exalted Contributor

Re: How can I use ldapsearch at HPUX

Shalom,

What I mean is that I think one of two things is happening.

1) Your ldap server is not accepting the connection. Which could mean:
a) Its not listening on the right port and is miconfigured.
b) Perhaps a firewall is blocking access

2) Your ldap server wants authetnication. My code above is an example of how to provide an ldap server with proper authentication when requesting information.

SEP
Steven E Protter
Owner of ISN Corporation
http://isnamerica.com
http://hpuxconsulting.com
Sponsor: http://hpux.ws
Twitter: http://twitter.com/hpuxlinux
Founder http://newdatacloud.com