Sponsored Content
Operating Systems Solaris Ldapsearch command not exiting Post 302826461 by daniel333 on Wednesday 26th of June 2013 04:16:03 PM
Old 06-26-2013
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 when it's done. It displays the users information I wanted, but then sits there. This of course prevents me from putting this into a shell script.

Any idea how I get ldapsearch to exit when it's done displaying the information?

Code:
ldapsearch -v -LLL -x -D "CN=SUPER Man,OU=SSF,OU=UserAccts,DC=corp,DC=com " -h mydc01.corp.com -b "dc=corp,dc=com" "sAMAccountName=username*"

 

10 More Discussions You Might Find Interesting

1. Red Hat

ldapsearch doesnt work.

Hii All, I am using openldap v2.3 on redhat El-4. When i run ldapsearch it returns all the entries. The command runs successfully. But when I run the ldapsearch with following filter option it doesnt work and immediately returns to the shell. ldapsearch uidNumber>=2000 I've started slapd... (0 Replies)
Discussion started by: shamik
0 Replies

2. Shell Programming and Scripting

Shell script..invoking command and exiting at fixed intervals

Hi, I need to write a shell script. Based on command line param to script say demode=yes Need to run an ant command for an hour(configurable) Then exit Again run the ant command all this needs to be in a loop. Thanks in advance Raj (1 Reply)
Discussion started by: rajuak12
1 Replies

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

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

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

6. UNIX for Dummies Questions & Answers

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

7. Shell Programming and Scripting

ssh - running remote command not exiting

Hi, i have a shellscript, where in i need to connect to different server start these three jobs and exit from the server and start the same three jobs on local server. ssh user@remotehost 'bash -s' << EOF ${GETT_HOME}/bin/start1 & sleep 10 ${GETT_HOME}/bin/start2 & sleep 10... (1 Reply)
Discussion started by: swapnabhargav
1 Replies

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

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. Shell Programming and Scripting

Parser ldapsearch to mysql

Hi, I'm trying to make a bash script to read LDAP (from MS active directory with ldapsearch), extract the fields 'mail', 'division', 'memberOf', 'userAccountControl', 'uidNumber', 'name', 'sAMAccountName' and save in a mysql database. I have extracted the fields with ldapsearch but I am... (2 Replies)
Discussion started by: somachibun
2 Replies
XFERFAXSTATS(8) 					      System Manager's Manual						   XFERFAXSTATS(8)

NAME
xferfaxstats - summarize HylaFAX transmission accounting SYNOPSIS
/usr/sbin/xferfaxstats [ options ] [ files ] DESCRIPTION
xferfaxstats is a command script that prints a summary of the HylaFAX accounting statistics for transmitted jobs. The statistics can be sorted using one of several keys: the sender's account name (default), the job tag (useful when used for accounting purposes), the remote party's CSI, the called phone number, the output device used for the call, the communication speed, and the communication data format. Statistics are read from the file /var/spool/hylafax/log/xferfaxlog in the spooling area, unless filenames are specified on the command line. The following table is an example of the output from xferfaxstats (using the default sort key): Destination Pages Time Pg/min Errs TypRate TypData cadsmith@esd.sgi.com 34 24:05 1.4 0 9600 1-D MH ctb@corp.sgi.com 32 20:43 1.5 2 9600 2-D MR edmark@esd.sgi.com 42 29:30 1.4 3 9600 1-D MH fredc@mfg.sgi.com 157 1:37:52 1.6 0 9600 2-D MR jlw@engr.sgi.com 81 57:29 1.4 1 9600 1-D MH jlw@wpd.sgi.com 346 3:57:57 1.5 100 9600 1-D MH karlton@asd.sgi.com 68 36:57 1.8 0 9600 1-D MH kerrie@mfg.sgi.com 48 32:29 1.5 1 9600 2-D MR kgraf@mfg.sgi.com 128 1:48:21 1.2 2 9600 1-D MH kubey@wpd.sgi.com 264 3:22:13 1.3 6 9600 1-D MH loki@wpd.sgi.com 205 2:56:45 1.2 5 9600 2-D MR moondog@esd.sgi.com 112 1:23:01 1.3 4 9600 2-D MR mpolen@mti.sgi.com 122 1:39:32 1.2 1 9600 1-D MH nancyf@mfg.sgi.com 174 2:08:44 1.4 2 9600 2-D MR paulh@mfg.sgi.com 56 1:29:24 0.6 0 9600 2-D MR richardn@mfg.sgi.com 34 24:42 1.4 1 9600 1-D MH rosa@corp.sgi.com 32 28:00 1.1 2 9600 1-D MH sam@asd.sgi.com 65 46:25 1.4 5 9600 1-D MH seth@asd.sgi.com 34 25:04 1.4 0 9600 1-D MH -------------------------------------------------------------------------- Total 2034 25:49:13 1.3 135 The first column column shows the sort key value used (the sender's identity here, but otherwise the destination phone number, remote CSI, etc.). The Pages column is the total number of good pages transmitted. The time column shows the total amount of time spent transmitting. The Pg/min column displays the average transfer rate. The Errs column indicates how many errors were encountered while transmitting fac- simile. (Note that this statistic does not include problems encountered while placing a call; e.g. busy signals.) The TypRate column displays the most common communication speed with which facsimile were transmitted. The TypData column shows the most common data format in which facsimile data were transmitted. Account names other than ``root'' and ``guest'' can be automatically mapped to a canonical format in which the host name is removed and identical addresses in the same domain are merged together (i.e. for NIS environments). For example, ``sam@flake.asd.sgi.com'' and ``sam@foobar.asd.sgi.com'' are both mapped to ``sam@asd.sgi.com'' with the associated statistics accumulated. Identical account names in different domains generate a warning; e.g. ``loki@wpd.sgi.com'' and ``loki@corp.sgi.com''. The above mapping is done only if the -map option is specified, by default account names are not altered. OPTIONS
-age days Show information only for the facsimile transmitted in the last specified number of days. -csi* Sort output by the remote party's CSI. -dest* Sort output by the phone number called. -dev* Sort output by the output device (i.e. modem) used. -format Sort output by the negotiated data format. -job* Sort output by client-specified job tag identifiers. -nomap Do not perform the account name mapping by which statistics for the ``root'' and ``guest'' accounts are merged and leading hostname part of domain names are stripped. This is the default behavior. -map Perform the account name mapping by which statistics for the ``root'' and ``guest'' accounts are merged and leading hostname part of domain names are stripped. -send* Sort output by sender's account name (default). -since time Show information only for the facsimile transmitted since the specified time; where time is of the form ``MM/DD/YY HH:MM'' (the date(1) format string %D %H:%M). -end time Show information only for the facsimile transmitted before the specified time; where time is of the same form as since. -speed Sort output by the signalling rate. DIAGNOSTICS
``Warning, address clash, "%s" and "%s".'' During address mapping two mapped addresses were found for the same account name. ``Warning, weird user address/name "%s".'' During address mapping an address was encountered that multiple ``@'' symbols in it. NOTES
The sender field does not necessarily represent the submitter's actual identity. For example, it reflects the value given by the send- fax(8) ``-f'' option. Be cautious that this field is not utilized for auditing if the fax user base is not trusted. FILES
/var/spool/hylafax spooling area log/xferfaxlog default file from which to read statistics SEE ALSO
faxq(8), faxsend(8), recvstats(8), hylafax-log(5) May 12, 1996 XFERFAXSTATS(8)
All times are GMT -4. The time now is 06:07 AM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy