Cisco 11503 Administration Guide - Page 332
LDAP Keepalive, Lightweight Directory Access Protocol v3
UPC - 746320664958
View all Cisco 11503 manuals
Add to My Manuals
Save this manual to your list of manuals |
Page 332 highlights
Script Keepalive Examples Chapter 8 Using the CSS Scripting Language set EXIT_MSG "Waitfor: Failed" ! Wait for confirmation socket waitfor ${SOCKET} "+OK" 200 set EXIT_MSG "Send: Failed" ! Send the password socket send ${SOCKET} "PASS ${Password}\n" set EXIT_MSG "Waitfor: Failed" ! Wait for confirmation socket waitfor ${SOCKET} "+OK" 200 ! We've successfully logged in, the server is up and going. ! The job was done successfully. socket disconnect ${SOCKET} no set EXIT_MSG exit script 0 LDAP Keepalive !no echo Filename: ap-kal-ldap ! Parameters: HostName ! ! Description: "Lightweight Directory Access Protocol v3" ! This script will connect to an LDAP server and attempt to ! "bind request" to the server. Once the server gives a ! positive response we will disconnect (RFC-2251). ! ! Bind Response Code we will search for is: 0x0a 0x01 0x00 ! ! Failure Upon: ! 1. Not establishing a connection with the host. ! 2. Failure to receive the above response code ! Make sure the user has a qualified number of arguments if ${ARGS}[#] "NEQ" "1" echo "Usage: ap-kal-ldap \'Hostname\'" exit script 1 endbranch ! Defines: set HostName "${ARGS}[1]" set EXIT_MSG "Connection Failed" 8-64 Cisco Content Services Switch Administration Guide OL-5647-02