Sponsored Content
Top Forums Programming problem with ldap search using c Post 95223 by mridula on Monday 9th of January 2006 08:51:48 AM
Old 01-09-2006
problem with ldap search using c

hi all

i m writin a c program to search ldap db for values.
i used the following code after search result return a value >0

if (result==1)
{
entry=ldap_first_entry(ld,msg);
for(....;....;...)
{
// code to store the data values
}
}

i m gettin an error at the highlighted statement.

the error msg is ...../....../..../libraries/libldap/getentry.c:36: ldap_first_entry: Assertion 'chain !=(( void *)0)' failed.



can ny body help with this????
 

10 More Discussions You Might Find Interesting

1. UNIX for Dummies Questions & Answers

ldap search filter

Hi, I am trying to do an ldapsearch with a filter that checks the uid and the userpassword: $filter= "(&(uid=$user) (userpassword=$password)"; $objs = $ldap->search( base => $basedn, filter => "($filter)"); i based it on this example i found on CPAN: $mesg = $ldap->search( ... (2 Replies)
Discussion started by: tine
2 Replies

2. UNIX for Dummies Questions & Answers

LDAP search query help

I would like to do an ldap search which looks for entries which do not actually have a certain attribute. Not that the attribute is Null, but where the attribute does not exist. Is this possible using ldapsearch? (3 Replies)
Discussion started by: dopple
3 Replies

3. Cybersecurity

Problem LDAP 389-ds

Hello I have install directory server but i can't change the password of user!!! I have used this command: # ldappasswd -x -D "cn=directory manager" -W "uid=xxxxx,ou=xxxx,dc=xxx,dc=xx" -S New password: Re-enter new password: Enter LDAP Password: Result: Confidentiality... (1 Reply)
Discussion started by: falagar81
1 Replies

4. UNIX for Advanced & Expert Users

ldap search to find dn for user

How can I do a ldapsearch to find a DN for a user when I know the exact cn for that user out of active directory. I have tried several different commands (hundreds) but need the -b with the full dn to perform the search using ldapsearch from AIX. I am trying to find the OU for a user and the... (1 Reply)
Discussion started by: cchart3
1 Replies

5. Red Hat

problem in open ldap in centos

Hi I am trying to use open ldap in centos. I have installed all the packaged. When I try to use slappasswd to encrypt the password, it does nothing. I searched for the file and I found out that it is in /usr/sbin and that the file is link to slapd. However slapd doesn't encrypt anything. ... (0 Replies)
Discussion started by: programAngel
0 Replies

6. Solaris

LDAP Problem during Kerberos setting for Win server 03 Active Directory

Hi, FYI, I'm new in Solaris I'm trying to use Kerberos on authenticating LDAP Client with the Active Directory on Windows Server 2003 on both Solaris 10 5/08 and Solaris 10 9/10 by referring to the pdf file kerberos_s10.pdf available at sun official site. ... (0 Replies)
Discussion started by: chongzh
0 Replies

7. UNIX for Dummies Questions & Answers

ldap search problem

I am posting in this section because in this regard I am a Dummy. I know very little about ldap. We have a couple of ldap registries running on an AIX box. I can connect into those registries using an openldap browser. But I am trying to run some queries against the registry on the server itself,... (1 Reply)
Discussion started by: fwellers
1 Replies

8. UNIX for Dummies Questions & Answers

ldap , search groups that user belong

i want run query to identify witch groups that user A belong, CN=name,CN=Users,DC=mydomain ?? (1 Reply)
Discussion started by: prpkrk
1 Replies

9. Shell Programming and Scripting

Ldap search query

Hi All, I have a existing Ldap query which take a HOME as variable and gives the result where i grep for a particular line. ldapsearch -h server_domain_name -p 389 -D "uid=user,ou=appadm,o=ent" -w PaB -b "ou=roles,o=ent" "cidx=$HOME" | grep -w "ent: xyz" Now i have 330K Homes in a... (1 Reply)
Discussion started by: posner
1 Replies

10. Solaris

Solaris LDAP group problem

I have a test environment which is running RedHat 6.5 Identity management. On the lab network are two Solaris 10 (U11) machines. I can successfully log into the S10 machines using the ldap username/passwords. However, I have a problem with groups and although I found through an internet search one... (3 Replies)
Discussion started by: cjhilinski
3 Replies
LDAP_FIRST_ENTRY(3)					     Library Functions Manual					       LDAP_FIRST_ENTRY(3)

NAME
ldap_first_entry, ldap_next_entry, ldap_count_entries - LDAP result entry parsing and counting routines LIBRARY
OpenLDAP LDAP (libldap, -lldap) SYNOPSIS
#include <ldap.h> int ldap_count_entries( LDAP *ld, LDAPMessage *result ) LDAPMessage *ldap_first_entry( LDAP *ld, LDAPMessage *result ) LDAPMessage *ldap_next_entry( LDAP *ld, LDAPMessage *entry ) DESCRIPTION
These routines are used to parse results received from ldap_result(3) or the synchronous LDAP search operation routines ldap_search_s(3) and ldap_search_st(3). The ldap_first_entry() routine is used to retrieve the first entry in a chain of search results. It takes the result as returned by a call to ldap_result(3) or ldap_search_s(3) or ldap_search_st(3) and returns a pointer to the first entry in the result. This pointer should be supplied on a subsequent call to ldap_next_entry() to get the next entry, the result of which should be supplied to the next call to ldap_next_entry(), etc. ldap_next_entry() will return NULL when there are no more entries. The entries returned from these calls are used in calls to the routines described in ldap_get_dn(3), ldap_first_attribute(3), ldap_get_values(3), etc. A count of the number of entries in the search result can be obtained by calling ldap_count_entries(). ERRORS
If an error occurs in ldap_first_entry() or ldap_next_entry(), NULL is returned and the ld_errno field in the ld parameter is set to indi- cate the error. If an error occurs in ldap_count_entries(), -1 is returned, and ld_errno is set appropriately. See ldap_error(3) for a description of possible error codes. SEE ALSO
ldap(3), ldap_result(3), ldap_search(3), ldap_first_attribute(3), ldap_get_values(3), ldap_get_dn(3) ACKNOWLEDGEMENTS
OpenLDAP Software is developed and maintained by The OpenLDAP Project <http://www.openldap.org/>. OpenLDAP Software is derived from the University of Michigan LDAP 3.3 Release. OpenLDAP 2017/06/01 LDAP_FIRST_ENTRY(3)
All times are GMT -4. The time now is 04:01 AM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy