Sponsored Content
Top Forums UNIX for Dummies Questions & Answers Need assistance on using ldapsearch Post 302524830 by srhadden on Tuesday 24th of May 2011 06:59:07 PM
Old 05-24-2011
Need assistance on using ldapsearch

Never knew of this command ldapsearch, but I would like to use it to lookup a single user and return where their office is.

Is this possible?

I'm totally starting from scratch. I already saw some of the gurus say read the man page, which is pretty greek when you don't know the details of ldap.

Could someone provide just an example to get me started?

This is for solaris/unix.

The other question is, will I even be able to do this as a non-admin, just a regular user? Because one of the examples I entered it generated a bind password error and I assume this is some domain controller password?

So, this is pretty much ldapsearch 101 for me and ldap 101 in general, so I would appreciate any info that might get me started besides a man page.

Thank you very much!Smilie
 

10 More Discussions You Might Find Interesting

1. IP Networking

Help Needed regarding Ldapsearch script

Hi guys, I very appreciate for answering to my previous query. I have encountered another problem.I have a perl script to display required networking information like DNS,gateway,etc. to be changed in a remote computer which is to be added to a computing cluster. I need a script which... (0 Replies)
Discussion started by: pranav.mehta3
0 Replies

2. UNIX for Dummies Questions & Answers

ldapsearch time limit

We have an application that uses Active directory to authenticate the users. the admins of the app. were complaining because the windows domain controller they are going against is not very stable. I wrote a shell script using ldapsearch to look up a user against the domain controller their app... (2 Replies)
Discussion started by: jayjabour
2 Replies

3. UNIX for Dummies Questions & Answers

How to trim ldapsearch results

I have a script that iterates through all the users that have logged in to the system for the past day and pulls out their role(s), adding them to a file. The iteration part is working just fine, but the issue I have is with the result. When I do the LDAP query, the results I get are: ... (2 Replies)
Discussion started by: a_calder
2 Replies

4. UNIX for Advanced & Expert Users

ldapsearch and XML

Hello all I would like to know if it's possible to extract users from Active Directory and parse the output to obtain a XML file with specific format. So the AD is a windows machine, and I would like to extract from a red hat linux serveur. I try ldapsearch command and ok I'm abble to extract... (5 Replies)
Discussion started by: ldiaz2106
5 Replies

5. Programming

LDAPSEARCH in C

Hi all, I've been searching for ldapsearch function these few days. Still I couldn't found the solution. I would like to translate this query ldapsearch -x -LLL -h new_IP -p new_Port -D "cn=jw" -w "dummy" -b "id=2311,o=WC,c=jp" -s sub to ldap_search_ext_s() function in C program. ... (0 Replies)
Discussion started by: tailangong
0 Replies

6. Red Hat

ldapsearch bash script help

Hi there everyone. I'm trying to make a bash script that accepts some arguments ans give's back some info about LDAP users and servers. I have this function : has_group_access(){ result=$(ldapsearch -LLL "cn=${GROUP_NAME}" cn member | cut -d"," -f1 | cut -d":" -f2 | cut -d"=" -f2 | grep... (1 Reply)
Discussion started by: theboogymaster
1 Replies

7. Red Hat

Ldapsearch problem

Hi I'm not familiar with ldap and I hope someone to help me. I need to get some attribute value from ldap DB. When i run the following command is OK: ldapsearch -h localhost -p 16611 -x -D cn=user -w passwd -b msisdn=359502479649,dc=MSISDN,DC=C-NTDB "(objectClass=SUBINNSS)" refinmocNAME the... (0 Replies)
Discussion started by: vasil
0 Replies

8. Solaris

Ldapsearch command not exiting

All, New to this forum and unix here so please forgive any silly questions. I am on a Solaris 10 machine and need a script to query our Windows Domain controller to determine if a user is active or not. Man files were helpful enough and it worked. The Challenge is the program doesn't exit... (1 Reply)
Discussion started by: daniel333
1 Replies

9. UNIX for Beginners Questions & Answers

Help with output from ldapsearch command

Using ldapsearch, I've built the following command to get what I need. ldapsearch -x -LLL -E pr=200/noprompt -h abc-loc.somecompany.com -D "account@somecompany.com" -w password -b "ou=End Users,ou=Accounts,dc=abc,dc=somecompany,dc=com" -s sub '(distinguishedName=CN=Bob\\, Billy J,OU=End... (8 Replies)
Discussion started by: who10
8 Replies

10. UNIX for Beginners Questions & Answers

Ldapsearch using variable will not work

When I execute the code below with cn set to the $adgroup variable, I get the following error: Invalid DN syntax (34) Additional information: 0000208F: NameErr: DSID-031001F7, problem 2006 (BAD_NAME), data 8349, best match of: ,ou=Resource,ou=groups,dc=abc,dc=somecompany,dc=com' If I set cn... (6 Replies)
Discussion started by: who10
6 Replies
OCF_HEARTBEAT_SLAPD(7)						OCF resource agents					    OCF_HEARTBEAT_SLAPD(7)

NAME
ocf_heartbeat_slapd - Manages a Stand-alone LDAP Daemon (slapd) instance SYNOPSIS
slapd [start | stop | monitor | meta-data | validate-all] DESCRIPTION
Resource script for Stand-alone LDAP Daemon (slapd). It manages a slapd instance as an OCF resource. SUPPORTED PARAMETERS
slapd Full path to the slapd binary. For example, "/usr/sbin/slapd". (optional, string, default "/usr/sbin/slapd") ldapsearch Full path to the ldapsearch binary. For example, "/usr/bin/ldapsearch". (optional, string, default "ldapsearch") config Full path to a slapd configuration directory or a slapd configuration file. For example, "/etc/ldap/slapd.d" or "/etc/ldap/slapd.conf". (unique, optional, string, no default) pidfile File to read the PID from; read from olcPidFile/pidfile in config if not set. (optional, string, no default) user User name or id slapd will run with. The group id is also changed to this user's gid, unless the group parameter is used to override. (optional, string, no default) group Group name or id slapd will run with. (optional, string, no default) services LDAP (and other scheme) URLs slapd will serve. For example, "ldap://127.0.0.1:389 ldaps:/// ldapi:///" (unique, optional, string, default "ldap:///") watch_suffix Suffix (database backend) that will be monitored for availability. Multiple suffixes can be specified by providing a space seperated list. By providing one or more suffixes here, the ignore_suffix parameter is discarded. All suffixes will be monitored if left blank. (optional, string, no default) ignore_suffix Suffix (database backend) that will not be monitored for availability. Multiple suffixes can be specified by providing a space seperated list. No suffix will be excluded if left blank. (optional, string, no default) bind_dn Distinguished Name used to bind to the LDAP directory for testing. Leave blank to bind to the LDAP directory anonymously. (optional, string, no default) password Password used to bind to the LDAP directory for testing. (optional, string, no default) parameters slapd may be called with additional parameters. Specify any of them here. (optional, string, no default) stop_escalate Number of seconds to wait for shutdown (using SIGTERM) before resorting to SIGKILL (optional, integer, default 15) SUPPORTED ACTIONS
This resource agent supports the following actions (operations): start Starts the resource. Suggested minimum timeout: 20s. stop Stops the resource. Suggested minimum timeout: 20s. monitor Performs a detailed status check. Suggested minimum timeout: 20s. Suggested interval: 60s. validate-all Performs a validation of the resource configuration. Suggested minimum timeout: 20s. meta-data Retrieves resource agent metadata (internal use only). Suggested minimum timeout: 5s. EXAMPLE
The following is an example configuration for a slapd resource using the crm(8) shell: primitive p_slapd ocf:heartbeat:slapd op monitor depth="0" timeout="20s" interval="60s" SEE ALSO
http://www.linux-ha.org/wiki/slapd_(resource_agent) AUTHOR
Linux-HA contributors (see the resource agent source for information about individual authors) resource-agents UNKNOWN 06/09/2014 OCF_HEARTBEAT_SLAPD(7)
All times are GMT -4. The time now is 07:57 AM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy