Sponsored Content
Full Discussion: ldap search problem
Top Forums UNIX for Dummies Questions & Answers ldap search problem Post 302512765 by cjcox on Monday 11th of April 2011 02:55:58 PM
Old 04-11-2011
You have to bind... which could be anonymous, but many times it's restricted (could be used as an auth source in fact).

The command "ldapsearch" varies from platform to platform. Do a man on "ldapsearch" on your platform.... make note especially of things dealing with "bind"... including the -x option for non SASL bind (and for anonymous bind)... if it's an "auth" required bind, likely you need to supply a bind DN (sometimes that -D <dn> option) ... Then you have to figure out if you need simple auth (often -x) or some sort of SASL based auth (again, it varies depending on ldapsearch). You might also need/want to know a "base" from which to make queries and then you'll need to know what you can filter on, but that comes after you make successful bind.
 

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. Programming

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... (1 Reply)
Discussion started by: mridula
1 Replies

3. 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

4. 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

5. 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

6. 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

7. 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

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
URI::ldap(3)						User Contributed Perl Documentation					      URI::ldap(3)

NAME
URI::ldap - LDAP Uniform Resource Locators SYNOPSIS
use URI; $uri = URI->new("ldap:$uri_string"); $dn = $uri->dn; $filter = $uri->filter; @attr = $uri->attributes; $scope = $uri->scope; %extn = $uri->extensions; $uri = URI->new("ldap:"); # start empty $uri->host("ldap.itd.umich.edu"); $uri->dn("o=University of Michigan,c=US"); $uri->attributes(qw(postalAddress)); $uri->scope('sub'); $uri->filter('(cn=Babs Jensen)'); print $uri->as_string," "; DESCRIPTION
"URI::ldap" provides an interface to parse an LDAP URI in its constituent parts and also build a URI as described in RFC 2255. METHODS
"URI::ldap" support all the generic and server methods defined by URI, plus the following. Each of the following methods can be used to set or get the value in the URI. The values are passed in unescaped form. None of these will return undefined values, but elements without a default can be empty. If arguments are given then a new value will be set for the given part of the URI. $uri->dn( [$new_dn] ) Set or get the Distinguised Name part of the URI. The DN identifies the base object of the LDAP search. $uri->attributes( [@new_attrs] ) Set or get the list of attribute names which will be returned by the search. $uri->scope( [$new_scope] ) Set or get the scope that the search will use. The value can be one of "base", "one" or "sub". If none is given in the URI then the return value will default to "base". $uri->_scope( [$new_scope] ) Same as scope(), but does not default to anything. $uri->filter( [$new_filter] ) Set or get the filter that the search will use. If none is given in the URI then the return value will default to "(objectClass=*)". $uri->_filter( [$new_filter] ) Same as filter(), but does not default to anything. $uri->extensions( [$etype => $evalue,...] ) Set or get the extensions used for the search. The list passed should be in the form etype1 => evalue1, etype2 => evalue2,... This is also the form of list that will be returned. SEE ALSO
RFC-2255 AUTHOR
Graham Barr <gbarr@pobox.com> Slightly modified by Gisle Aas to fit into the URI distribution. COPYRIGHT
Copyright (c) 1998 Graham Barr. All rights reserved. This program is free software; you can redistribute it and/or modify it under the same terms as Perl itself. perl v5.8.0 2000-08-02 URI::ldap(3)
All times are GMT -4. The time now is 11:57 PM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy