Operating System - HP-UX
1827937 Members
2499 Online
109973 Solutions
New Discussion

_hp_ldap_split_host_port(): host parsing failed, parameter error

 
Binbin_1
Occasional Contributor

_hp_ldap_split_host_port(): host parsing failed, parameter error

When I try to setup the LDAP on HP to connect to a remote Directory Server. The "nsquery passwd user ldap" command always fails.

Actually the ldapsearch works fine with anonymous bind.

Here's the output to nsquery command:
-bash-3.00# nsquery passwd abc ldap

Using "ldap" for the passwd policy.
Searching ldap for abc
This Name Service is currently unavailable
Switch configuration: Allows fallback
All name services have been searched

The error messages in the log:

Oct 23 12:44:56 tivhp11 pwgrd: pid:1174 - getpwnam.c:401:getbynam():
Oct 23 12:44:56 tivhp11 pwgrd: pid:1174 - ldapd_client.c:481:_hp_ldap_send_recv_query():
Oct 23 12:44:56 tivhp11 pwgrd: pid:1174 - ldapd_client.c:374:_hp_ldap_client_init():
Oct 23 12:44:56 tivhp11 pwgrd: pid:1174 - ldapd_client.c:193:_hp_ldap_client_cache_daemon_is_up():
Oct 23 12:44:56 tivhp11 syslog: pid:10127 - ldap_common.c:3040:_hp_ldap_init():
Oct 23 12:44:56 tivhp11 syslog: pid:10127 - ldap_common.c:2160:_hp_ldap_bind_by_my_uid():
Oct 23 12:44:56 tivhp11 syslog: pid:10127 - ldap_common.c:2271:_hp_ldap_bind_by_my_uid(): attempting
anonymous bind.
Oct 23 12:44:56 tivhp11 syslog: pid:10127 - ldap_common.c:1371:_hp_ldap_simple_bind():
Oct 23 12:44:56 tivhp11 pwgrd: pid:1174 - ldapd_client.c:229:_hp_ldap_client_poll():
Oct 23 12:44:56 tivhp11 syslog: pid:10127 - ldap_common.c:3175:_hp_ldap_split_host_port():
host parsing failed, parameter error
Oct 23 12:44:56 tivhp11 syslog: pid:10127 - ldap_common.c:2285:_hp_ldap_bind_by_my_uid():
_hp_ldap_simple_bind(anonymous):Failure
Oct 23 12:44:56 tivhp11 syslog: pid:10127 - ldap_common.c:2292:_hp_ldap_bind_by_my_uid(): Unable to
bind, returning failure.
Oct 23 12:44:56 tivhp11 syslog: pid:10127.10 - connection.c:733:init_ldap_conn(): _hp_ldap_bind_by_m
y_uid()==-1 failed
Oct 23 12:44:56 tivhp11 pwgrd: pid:1174 - ldapd_client.c:193:_hp_ldap_client_cache_daemon_is_up():
Oct 23 12:44:56 tivhp11 syslog: pid:10127.10 - pw.c:60:get_pw_from_right_domain(): failed to get con
nection
Oct 23 12:44:57 tivhp11 syslog: pid:10127.10 - pw.c:297:get_new_pw_cache_entry(): failed to get conn
ection
Oct 23 12:44:57 tivhp11 pwgrd: pid:1174 - getpwnam.c:110:_query_daemon_pw(): ret_val =10, result=2
Oct 23 12:44:57 tivhp11 pwgrd: pid:1174 - getpwnam.c:416:getbynam(): result: 2
Oct 23 12:48:24 tivhp11 sm-mta[10574]: pid:10574 - getpwnam.c:208:_nss_ldap_pw_destr():

Any help is highly appreciated.
I'm stuck on this for weeks..

3 REPLIES 3
Bob Neal-Joslin
Trusted Contributor

Re: _hp_ldap_split_host_port(): host parsing failed, parameter error

Hi,

It sounds like the host name has not been configured in the DUAConfigProfile. Could you perform the following steps for debugging:

/opt/ldapux/config/display_profile_cache

look for the host[:port] entry

LDAP-UX Client Services

Global Information from the Configuration Profile
=================================================
host[:port]: 99.99.99.99:389 100.100.100.100:389
default search base: dc=cup,dc=hp,dc=com
auth: simple
...

Also try:

more /etc/opt/ldapux/ldapux_profile.ldif

version: 1
dn: cn=myprofile,dc=example,dc=com
profilettl: 3600
preferredserverlist: 99.99.99.99:389 100.100.100.100:389
objectClass: top
objectClass: duaconfigprofile
cn: myprofile
defaultsearchbase: dc=example,dc=com
bindtimelimit: 5
authenticationmethod: simple
attributemap: passwd:userpassword=*NULL*
attributemap: shadow:userpassword=*NULL*
attributemap: passwd:gecos=cn l telephonenumber
attributemap: group:memberUid=memberUid member uniqueMember
servicesearchdescriptor: printers:dc=example,dc=com?sub?(&(objectclass=printerlpr)(printer-location=43L*))




Binbin_1
Occasional Contributor

Re: _hp_ldap_split_host_port(): host parsing failed, parameter error

Thank you, Bob!
I think you're right.
There're no host/port info in the output of display_profile_cache.

-bash-3.00# ./display_profile_cache |more

LDAP-UX Client Services

Global Information from the Configuration Profile
=================================================
host[:port]:
default search base:
auth: simple
profilecachettl: 0 = infinite
follow referrals: enabled
search time limit: 0 = no limit
bind time limit: 0 = no limit
credential level: anonymous

The ldapux_profiles.dlif seems ok:

-bash-3.00# more /etc/opt/ldapux/ldapux_profile.ldif
version: 1
dn: cn=profile1,ou=Profiles,dc=mydomain,dc=com
objectClass: top
objectClass: ldapsubentry
objectClass: nsroledefinition
objectClass: nssimpleroledefinition
objectClass: nsmanagedroledefinition
cn: profile1


So how shall I regonfiguer the host/port?
If I run the config/setup, the host/port is displayed correctly.
Is there some configure files I can modity to set this?
Thank you a lot!
Binbin_1
Occasional Contributor

Re: _hp_ldap_split_host_port(): host parsing failed, parameter error

Some recently update:
-bash-3.00# ./get_profile_entry -o p.ldif
Modify p.ldif to add following lines;
preferredserverlist: 9.123.98.94:389
defaultsearchbase:dc=mydomain,dc=com
bindtimelimit:10
Then the content of p.ldif is like:
version: 1
dn: cn=profile1,ou=Profiles,dc=cn,dc=ibm,dc=com
preferredserverlist: 9.123.98.94:389
objectClass: top
objectClass: ldapsubentry
objectClass: nsroledefinition
objectClass: nssimpleroledefinition
objectClass: nsmanagedroledefinition
cn: profile1
defaultsearchbase:dc=myhost,dc=com
bindtimelimit:10

Then I re-generate the cache file by:
-bash-3.00# ./create_profile_cache -i p.ldif

Now the nsquery ldap works:

-bash-3.00# nsquery passwd zhaobb ldap

Using "ldap" for the passwd policy.

Searching ldap for zhaobb
User name: zhaobb
User Id: 122
Group Id: 20
Gecos:
Home Directory: /home/zhaobb
Shell: /sbin/sh

Switch configuration: Terminates Search

I'm setting the PAM and will test if I can login to the hpux box with a ldap user.