[rancid] Re: Can't poll a cat5 switch. clogin works fine manually

Victor Breen victor at impulse.net
Tue Jun 17 20:48:23 UTC 2008


Hi Gareth,

I'd rather not send the entire file, of course.  It contains about 200 user/pass combos for different routers ;>)

I ran "clogin 10.10.10.7" and it definitely failed to work without all of the arguments.  Here are the only lines I'm using now.

add user 10.10.10.7      {rancid}
add password 10.10.10.7  {Masked}      {Masked}
add method 10.10.10.7    telnet

The current behavior using clogin with no extra args is it logs in with the "rancid" username, gets to the unprivileged prompt, it types "enable" and enters the password then it hangs there.  I'm not sure why it's doing that.

Thanks for your help!


--Victor



----- Original Message -----
From: "Gareth Hopkins" <gabbawp at gmail.com>
To: "Victor Breen" <victor at impulse.net>
Cc: rancid-discuss at shrubbery.net
Sent: Tuesday, June 17, 2008 1:10:50 PM GMT -08:00 US/Canada Pacific
Subject: Re: [rancid] Can't poll a cat5 switch. clogin works fine manually

Hi, 

What does your .cloginrc file look like? I'd hazard a guess that something is missing in there. 

The following config should work for your device 

add user 10.10.10.7 username 
add password 10.10.10.7 {password} 
add autoenable 10.10.10.7 1 

You can always run clogin 10.10.10.7 (without all the options) to see if your .cloginrc file is being used correctly. 

Cheers, 

Gabba 


On Tue, Jun 17, 2008 at 9:58 PM, Victor Breen < victor at impulse.net > wrote: 


Hello! 

I am having some pretty aggravating issues getting a Cisco Cat switch working in Rancid. Perhaps I'm missing something dumb? I'm hoping someone out there can hit me with the clue-by-four. 

I am using Rancid 2.3.1 on a FreeBSD box. The "cisco" devices I have set up poll just fine. This is the only cat5 device I'm attempting to poll so I can't say I've ever gotten one to work before. Just the same, clogin seems to work when I run it manually. 

Here's an example of clogin working fine with the cat5 switch. It does complete but I've snipped the output for less noise: 



rancid$ /usr/local/rancid/bin/clogin -autoenable -c "write term" -f 
/home/rancid/.cloginrc -u rancid -p (masked) -t 30 
10.10.10.7 

spawn telnet 10.10.10.7 
Trying 10.10.10.7... 
Connected to 10.10.10.7 . 
Escape character is '^]'. 


Cisco Systems, Inc. Console 




Username: rancid 


Password: 
sw2> (enable) 
sw2> (enable) set length 0 
Screen length for this session set to 0. 
sw2> (enable) set logging session disable 
System logging messages will not be sent to the current login session. 
sw2> (enable) 
sw2> (enable)write term 
This command shows non-default configurations only. 
Use 'write terminal all' to show both default and non-default 
configurations. 
................. 

............................. 
............................. 
.. 

begin 
! 
# ***** NON-DEFAULT CONFIGURATION ***** 
! 
! 
#time: Mon Jun 16 2008, 23:43:28 
! 
#version 8.4(11)GLX 

<snip snip> 


When I run /usr/local/rancid/bin/rancid-run to test the automated method, I see this show up in the log output: 



starting: Mon Jun 16 17:09:03 PDT 2008 



Trying to get all of the configs. 
10.10.10.7 : missed cmd(s): write term all 
===================================== 
Getting missed routers: round 1. 
10.10.10.7 : missed cmd(s): write term all 
===================================== 
Getting missed routers: round 2. 
10.10.10.7 : missed cmd(s): write term all 
===================================== 
Getting missed routers: round 3. 
10.10.10.7 : missed cmd(s): write term all 
===================================== 
Getting missed routers: round 4. 
10.10.10.7 : missed cmd(s): write term all 

cvs diff: Diffing . 
cvs diff: Diffing configs 
cvs commit: Examining . 
cvs commit: Examining configs 
done 

ending: Mon Jun 16 17:14:02 PDT 2008 




Any help would be greatly appreciated! 


-- 
============================================| 
Victor Breen 
victor at impulse.net 
|==========================================*| 


_______________________________________________ 
Rancid-discuss mailing list 
Rancid-discuss at shrubbery.net 
http://www.shrubbery.net/mailman/listinfo.cgi/rancid-discuss 



More information about the Rancid-discuss mailing list