[rancid] Re: Hlogin & Timeout

Mahaffey, Brian bmahaffey at pelco.com
Tue Aug 18 16:21:21 UTC 2009


Looks like I over looked the .cloginrc file.

 

I have our Cisco Devices using the following

## START CLOGINRC

## CISCO INTERNAL DEVICES 

Add user *.pelco.org                      user

Add password *.pelco.org           password

Add autoenable *.pelco.org       0

Add method *.pelco.org              ssh

So I tried our HP devices as follows

## HP INTERNAL DEVICES

Add user HP*                    user

Add password HP*          password manager

Add autoenable HP*      0

Add method HP*             ssh

## END CLOGINRC 

I would assume since I was trying to login to the switch via hostname
HP5308-b6-1.pelco.org when the system would do a lookup for this device
in the .cloginrc file it would match the first configuration for the
Cisco Devices via the .pelco.org?

 

So I modified the HP devices configuration in the .cloginrc file to look
at the IP address of the device and tested

Hlogin 10.10.10.1

Which Worked.

 

I stripped the .pelco.org from the hlogin command with the HP* in the
.cloginrc file (See above) and that also worked.

Hlogin hp5308-b6-1

 

Looks like I need to figure out a better way to call devices in the
.cloginrc file. Thanks everyone for the input.

 

 

From: rancid-discuss-bounces at shrubbery.net
[mailto:rancid-discuss-bounces at shrubbery.net] On Behalf Of Schlottog,
Tighe
Sent: Monday, August 17, 2009 1:10 PM
To: Rancid-discuss at shrubbery.net
Subject: [rancid] Re: Hlogin & Timeout

 

Hey there,

                In your .cloginrc file do you have autoenable set to 1
by chance?  It looks like you are getting to the operator level prompt
but are not into the full manager level prompt.  There is also a
wonderful issue with the 4100 series that the switch does not seem to
handle the privalege elevation handed too it by the Radius server, so
we've had to pull the individual switches out via configuration like
this:

 

add user xx.xx.xx.xx             rancid

add password xx.xx.xx.xx         {XXXXXXX}      {XXXXXXX}

add autoenable xx.xx.xx.xx        0

add userprompt xx.xx.xx.xx       {"Please Enter Login Name:"}

add passprompt xx.xx.xx.xx       {"Please Enter Password:"}

 

                It looks like you are timing out while waiting on the #
prompt to appear.

 

Tighe

 

--

Tighe Schlottog

Peabody Energy

 

From: rancid-discuss-bounces at shrubbery.net
[mailto:rancid-discuss-bounces at shrubbery.net] On Behalf Of Mahaffey,
Brian
Sent: Monday, August 17, 2009 2:55 PM
To: Rancid-discuss at shrubbery.net
Subject: [rancid] Hlogin & Timeout

 

Hello,

 

When trying to use hlogin I get timeouts when trying to login to the
enable prompt. I thought I was running version 2.3.2a10 but I guess my
upgrade didn't work as expected.

 

-bash-3.2$ hlogin HP5308-B6-1.pelco.org

hp5308-b6-1.pelco.org

spawn hpuifilter -- ssh -c 3des -x -l user hp5308-b6-1.pelco.org

Switch - DO NOT LOGIN.

user at hp5308-b6-1.pelco.org's password: 

ProCurve J4819A Switch 5308xl

Software revision E.11.03

 

Copyright (C) 1991-2008 Hewlett-Packard Co.  All Rights Reserved.

 

                           RESTRICTED RIGHTS LEGEND

 

 Use, duplication, or disclosure by the Government is subject to
restrictions

 as set forth in subdivision (b) (3) (ii) of the Rights in Technical
Data and

 Computer Software clause at 52.227-7013.

 

         HEWLETT-PACKARD COMPANY, 3000 Hanover St., Palo Alto, CA 94303

 

Press any key to continueHP5308-B6-1> 

Error: TIMEOUT reached

 

HLOGIN Version

#! /usr/bin/expect --

##

## $Id: hlogin.in,v 1.58 2008/11/12 00:59:04 heas Exp $

##

## rancid 2.3.2a9

 

I found a patch from a google search which didn't work for me.

 

--- bin/hlogin.original.2.3.2a9 2009-02-03 18:35:55.000000000 -0600

+++ bin/hlogin  2009-02-04 00:07:52.000000000 -0600

@@ -666,7 +671,9 @@

     # Figure out prompts

     set u_prompt [find userprompt $router]

     if { "$u_prompt" == "" } {

-       set u_prompt "(Username|login|user name):"

+        #added "Name" for 5406zl

+        #which has the prompt "Please Enter Login Name:"

+       set u_prompt "(Name|Username|login|user name):"

     } else {

        set u_prompt [join [lindex $u_prompt 0] ""]

     }

 

 

Thank you,

 

Brian Mahaffey
Sr. Network Engineer
Pelco

(559) 292.1981 ext 5323

(559) 840.5686 Mobile
AIM/GTALK/MSN: bmahaffey at gmail.com

 


-
------------------------------------------------------------------------
------
Confidentiality Notice: The information contained in this transmission
is legally privileged and confidential, intended only for the use of the
individual(s) or entities named above. This email and any files
transmitted with it are the property of Pelco. If the reader of this
message is not the intended recipient, or an employee or agent
responsible for delivering this message to the intended recipient, you
are hereby notified that any review, disclosure, copying, distribution,
retention, or any action taken or omitted to be taken in reliance on it
is prohibited and may be unlawful. If you receive this communication in
error, please notify us immediately by telephone call to +1-559-292-1981
or forward the e-mail to administrator at pelco.com and then permanently
delete the e-mail and destroy all soft and hard copies of the message
and any attachments. Thank you for your cooperation. 
-
------------------------------------------------------------------------
------




________________________________

E-mail Disclaimer: The information contained in this e-mail, and in any
accompanying documents, may constitute confidential and/or legally
privileged information. The information is intended only for use by the
designated recipient. If you are not the intended recipient (or
responsible for the delivery of the message to the intended recipient),
you are hereby notified that any dissemination, distribution, copying,
or other use of, or taking of any action in reliance on this e-mail is
strictly prohibited. If you have received this email communication in
error, please notify the sender immediately and delete the message from
your system. 


- ------------------------------------------------------------------------------
Confidentiality Notice: The information contained in this transmission is legally privileged and confidential, intended only for the use of the individual(s) or entities named above. This email and any files transmitted with it are the property of Pelco. If the reader of this message is not the intended recipient, or an employee or agent responsible for delivering this message to the intended recipient, you are hereby notified that any review, disclosure, copying, distribution, retention, or any action taken or omitted to be taken in reliance on it is prohibited and may be unlawful. If you receive this communication in error, please notify us immediately by telephone call to +1-559-292-1981 or forward the e-mail to administrator at pelco.com and then permanently delete the e-mail and destroy all soft and hard copies of the message and any attachments. Thank you for your cooperation. 
- ------------------------------------------------------------------------------
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://www.shrubbery.net/pipermail/rancid-discuss/attachments/20090818/5b1c5baf/attachment.html 


More information about the Rancid-discuss mailing list