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
rsvpstat(8)						      System Manager's Manual						       rsvpstat(8)

NAME
rsvpstat - Display resource reservation status SYNOPSIS
/usr/sbin/rsvpstat [-nv46PT] [sess_num [phop_num | tcs_num]] /usr/sbin/rsvpstat [-nv46SRxl] [sess_num [phop_num | tcs_num | snd_num | rcv_num]] OPTIONS
Displays network addresses in numeric form. Specifies verbose mode. Displays information related to Internet Protocol Version 4 (IPv4) sessions only. Displays information related to Internet Protocol Version 6 (IPv6) sessions only. Displays previous hop information. Dis- plays traffic control state information. Displays sender information. Displays receiver information. Displays senders and receivers for a given sess_num and phop_num or tcs_num. Displays senders and receivers running on this host. Specifies a session number. This is required with the -x option. Specifies the number of a previous hop (PHOP). Specifies a traffic control state number. Specifies a sender number. Specifies a receiver number. DESCRIPTION
The rsvpstat utility displays the Resource ReSerVation Protocol (RSVP) state on the local system. By default, rsvpstat displays a list of all RSVP sessions. Alternatively, you can specify either the -P, -T, -S, or -R option to list the previous hop, traffic control state, sender, or receiver information, respectively. If you specify the -v option in conjunction with -P, -T, -S, or -R option, rsvpstat displays the content of all the associated RSVP objects or Integrated Services objects. If you specify the -4 or -6 option, rsvpstat displays information pertaining to IPv4 or IPv6 sessions, respectively, only. You can restrict the amount of information displayed further if you specify the -l or -x option and up to two additional arguments described in the OPTIONS section. You can also specify up to two arguments without specifying the options. When no rsvpd daemon is running on the system, rsvpstat returns the following error message: rsvpstat: cannot connect to RSVP daemon EXAMPLES
In the following examples, the values for the sess_nr, hop_nr, tcs_nr, rcv_nr, and snd_nr fields are identification numbers assigned by the RSVP daemon, and are not significant to the RSVP protocol. To display session information, enter: % rsvpstat IPv4 sessions sess_nr dest prot port PATH RESV ============================================================= 2 host1.corp.com UDP 9999 1 1 Each entry lists the session address, IP protocol, port number, and the number of PATH and RESV states for the given session. To display verbose previous hop information, enter: % rsvpstat -Pv IPv4 phops hop_nr prev_hop_addr lih rsvp_hop ========================================================= --- sess_nr 1 to host1.corp.com UDP port 9999 2 host2.corp.com 7 yes rsvp hop host1.corp.com lih 7 refresh period 30000ms style FF flowspec (28 bytes of parameters) controlled load svc: <tb_tspec r=137000 b=4000 p=137000 m=528 M=548> filterspec IPv4 addr host2.corp.com port 1745 A previous hop is an RSVP-capable system from which PATH messages are received. Previous hops are displayed by session, with a ses- sion header preceding the associated list of previous hops. The hop_nr value is relative to the session. Information for each previous hop includes its hop_nr, address, and logical interface handle, and rsvp_hop information. If rsvp_hop value is yes, the hop is a direct neighbor; if no, rsvpstat detected an automatic tunnel. In verbose mode, rsvpstat displays the contents of the RSVP RESV message that is sent back to the previous hop. It is the result of merging all relevant reservations for the previous hop. To display traffic control state information, enter: % rsvpstat -T IPv4 Traffic Control State tcs_nr rhandle if options =================================== --- sess_nr 2 to host1.corp.com UDP port 9999 1 0xfffffc00037b4500 1 A traffic control state (TCS) is created as a result of accepting one or more reservation requests. Traffic control states are dis- played by session, with a session header preceding the associated list of TCSs. The tcs_nr is relative to the session. For each TCS, rsvpstat displays the tcs_nr, rhandle, interface index, and policing options (see RFC 2205 for more information). When the rhandle is non-zero, the interface is traffic control capable and a reservation is in place. You can use the iftcntl command to obtain more information about the reservation. In verbose mode, rsvpstat displays the flowspec and tspec used to install the reservation. They are the result of merging flowspecs and tspecs of all associated RESV messages. To display receiver information, enter: % rsvpstat -R IPv4 receivers rcv_nr next_hop_addr lih if tcs_nr =========================================================== --- sess_nr 1 to host1.corp.com UDP port 9999 1 host1.corp.com 7 1 1 Receiver information is displayed by session, with a session header preceding the associated list of receiver information. The rcv_nr is relative to the session. RESV messages containing more than one filterspec are split up and a different rcv_nr is created for each filterspec. For each rcv_nr, rsvpstat displays the contents of the RSVP HOP message (next_hop_addr and logical interface handle) received as part of the RESV message, the interface on which the RESV message has been received, and the tcs_nr of the associated traffic con- trol state. In verbose mode, rsvpstat displays all the other contents of the RESV message from which this receiver information has been derived. To display verbose sender information, enter: % rsvpstat -Sv IPv4 senders snd_nr src port ttl =============================================== --- sess_nr 1 to host1.corp.com UDP port 9999 2 host2.corp.com 1745 29 rsvp hop host2.corp.com lih 7 refresh period 30000ms tspec (28 bytes of parameters) general info: <tb_tspec r=137000 b=4000 p=137000 m=528 M=548> adspec (40 bytes of parameters) general info: hop_cnt=1 path_bw=625000 min_latency=-1 composed_mtu=1500 controlled load svc: Sender information is displayed by session, with a session header preceding the associated list of sender information. The snd_nr is relative to the session. For each sender, rsvpstat displays the source address, port number (or IPv6 flowlabel), and IPv4 ttl / IPv6 hop limit value. In verbose mode, rsvpstat displays all the other contents of the PATH message that corresponds to this sender. SEE ALSO
Commands: iftcntl(8) Daemons: rsvpd(8) RFC 2205, Resource ReSerVation Protocol (RSVP) - Version 1 Functional Specification RFC 2210, The Use of RSVP with IETF Integrated Services rsvpstat(8)
All times are GMT -4. The time now is 02:27 AM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy