Hi, <br><br>Looks like that worked though as all you are doing with that command is logging in. Remember clogin is only the login mechanism.<br><br>Try the following <br><br>clogin <a href="http://10.10.10.7">10.10.10.7</a> -c "show version"<br>
<br>That should login, go into enable mode, do a show version, and exit. <br><br><div class="gmail_quote">On Tue, Jun 17, 2008 at 11:07 PM, Victor Breen <<a href="mailto:victor@impulse.net">victor@impulse.net</a>> wrote:<br>
<blockquote class="gmail_quote" style="border-left: 1px solid rgb(204, 204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;">Seth,<br>
<br>
I added the "add autoenable <a href="http://10.10.10.7" target="_blank">10.10.10.7</a> 0" line but it didn't change how it's behaving.<br>
<br>
I have included the terminal output for scrutiny. After it enables, an additional carriage return is being sent with no command, then it hangs until I manually kill it.<br>
<br>
<br>
rancid$ /usr/local/rancid/bin/clogin <a href="http://10.10.10.7" target="_blank">10.10.10.7</a><br>
<div class="Ih2E3d"><a href="http://10.10.10.7" target="_blank">10.10.10.7</a><br>
spawn telnet <a href="http://10.10.10.7" target="_blank">10.10.10.7</a><br>
Trying 10.10.10.7...<br>
Connected to <a href="http://10.10.10.7" target="_blank">10.10.10.7</a><br>
Escape character is '^]'.<br>
<br>
<br>
Cisco Systems, Inc. Console<br>
<br>
<br>
<br>
<br>
Username: rancid<br>
<br>
<br>
Password:<br>
sw2> enable<br>
<br>
Password:<br>
sw2> (enable)<br>
sw2> (enable)<br>
<br>
<br>
<br>
<br>
</div>Anything else I could be missing?<br>
<br>
Thanks again!<br>
<font color="#888888"><br>
<br>
-- Victor<br>
</font><div class="Ih2E3d"><br>
<br>
<br>
----- Original Message -----<br>
From: "Seth Martin" <<a href="mailto:SMartin@sourceinterlink.com">SMartin@sourceinterlink.com</a>><br>
To: "Victor Breen" <<a href="mailto:victor@impulse.net">victor@impulse.net</a>>, "Gareth Hopkins" <<a href="mailto:gabbawp@gmail.com">gabbawp@gmail.com</a>><br>
Cc: <a href="mailto:rancid-discuss@shrubbery.net">rancid-discuss@shrubbery.net</a><br>
</div><div><div></div><div class="Wj3C7c">Sent: Tuesday, June 17, 2008 1:54:46 PM GMT -08:00 US/Canada Pacific<br>
Subject: RE: [rancid] Re: Can't poll a cat5 switch. clogin works fine manually<br>
<br>
add autoenable <a href="http://10.10.10.7" target="_blank">10.10.10.7</a> 0<br>
<br>
If you are logging in with a privileged user then you don't have to<br>
enable. But if your clogin gets an unprivileged prompt then you need to<br>
turn off autoenable for the host.<br>
<br>
_____________________________________________________________________<br>
Seth Martin<br>
<br>
<br>
-----Original Message-----<br>
From: <a href="mailto:rancid-discuss-bounces@shrubbery.net">rancid-discuss-bounces@shrubbery.net</a><br>
[mailto:<a href="mailto:rancid-discuss-bounces@shrubbery.net">rancid-discuss-bounces@shrubbery.net</a>] On Behalf Of Victor Breen<br>
Sent: Tuesday, June 17, 2008 4:48 PM<br>
To: Gareth Hopkins<br>
Cc: <a href="mailto:rancid-discuss@shrubbery.net">rancid-discuss@shrubbery.net</a><br>
Subject: [rancid] Re: Can't poll a cat5 switch. clogin works fine<br>
manually<br>
<br>
Hi Gareth,<br>
<br>
I'd rather not send the entire file, of course. It contains about 200<br>
user/pass combos for different routers ;>)<br>
<br>
I ran "clogin <a href="http://10.10.10.7" target="_blank">10.10.10.7</a>" and it definitely failed to work without all<br>
of the arguments. Here are the only lines I'm using now.<br>
<br>
add user <a href="http://10.10.10.7" target="_blank">10.10.10.7</a> {rancid}<br>
add password <a href="http://10.10.10.7" target="_blank">10.10.10.7</a> {Masked} {Masked}<br>
add method <a href="http://10.10.10.7" target="_blank">10.10.10.7</a> telnet<br>
<br>
The current behavior using clogin with no extra args is it logs in with<br>
the "rancid" username, gets to the unprivileged prompt, it types<br>
"enable" and enters the password then it hangs there. I'm not sure why<br>
it's doing that.<br>
<br>
Thanks for your help!<br>
<br>
<br>
--Victor<br>
<br>
<br>
<br>
----- Original Message -----<br>
From: "Gareth Hopkins" <<a href="mailto:gabbawp@gmail.com">gabbawp@gmail.com</a>><br>
To: "Victor Breen" <<a href="mailto:victor@impulse.net">victor@impulse.net</a>><br>
Cc: <a href="mailto:rancid-discuss@shrubbery.net">rancid-discuss@shrubbery.net</a><br>
Sent: Tuesday, June 17, 2008 1:10:50 PM GMT -08:00 US/Canada Pacific<br>
Subject: Re: [rancid] Can't poll a cat5 switch. clogin works fine<br>
manually<br>
<br>
Hi,<br>
<br>
What does your .cloginrc file look like? I'd hazard a guess that<br>
something is missing in there.<br>
<br>
The following config should work for your device<br>
<br>
add user <a href="http://10.10.10.7" target="_blank">10.10.10.7</a> username<br>
add password <a href="http://10.10.10.7" target="_blank">10.10.10.7</a> {password}<br>
add autoenable <a href="http://10.10.10.7" target="_blank">10.10.10.7</a> 1<br>
<br>
You can always run clogin <a href="http://10.10.10.7" target="_blank">10.10.10.7</a> (without all the options) to see if<br>
your .cloginrc file is being used correctly.<br>
<br>
Cheers,<br>
<br>
Gabba<br>
<br>
<br>
On Tue, Jun 17, 2008 at 9:58 PM, Victor Breen < <a href="mailto:victor@impulse.net">victor@impulse.net</a> ><br>
wrote:<br>
<br>
<br>
Hello!<br>
<br>
I am having some pretty aggravating issues getting a Cisco Cat switch<br>
working in Rancid. Perhaps I'm missing something dumb? I'm hoping<br>
someone out there can hit me with the clue-by-four.<br>
<br>
I am using Rancid 2.3.1 on a FreeBSD box. The "cisco" devices I have set<br>
up poll just fine. This is the only cat5 device I'm attempting to poll<br>
so I can't say I've ever gotten one to work before. Just the same,<br>
clogin seems to work when I run it manually.<br>
<br>
Here's an example of clogin working fine with the cat5 switch. It does<br>
complete but I've snipped the output for less noise:<br>
<br>
<br>
<br>
rancid$ /usr/local/rancid/bin/clogin -autoenable -c "write term" -f<br>
/home/rancid/.cloginrc -u rancid -p (masked) -t 30<br>
<a href="http://10.10.10.7" target="_blank">10.10.10.7</a><br>
<br>
spawn telnet <a href="http://10.10.10.7" target="_blank">10.10.10.7</a><br>
Trying 10.10.10.7...<br>
Connected to <a href="http://10.10.10.7" target="_blank">10.10.10.7</a> .<br>
Escape character is '^]'.<br>
<br>
<br>
Cisco Systems, Inc. Console<br>
<br>
<br>
<br>
<br>
Username: rancid<br>
<br>
<br>
Password:<br>
sw2> (enable)<br>
sw2> (enable) set length 0<br>
Screen length for this session set to 0.<br>
sw2> (enable) set logging session disable<br>
System logging messages will not be sent to the current login session.<br>
sw2> (enable)<br>
sw2> (enable)write term<br>
This command shows non-default configurations only.<br>
Use 'write terminal all' to show both default and non-default<br>
configurations.<br>
.................<br>
<br>
.............................<br>
.............................<br>
.<br>
<br>
begin<br>
!<br>
# ***** NON-DEFAULT CONFIGURATION *****<br>
!<br>
!<br>
#time: Mon Jun 16 2008, 23:43:28<br>
!<br>
#version 8.4(11)GLX<br>
<br>
<snip snip><br>
<br>
<br>
When I run /usr/local/rancid/bin/rancid-run to test the automated<br>
method, I see this show up in the log output:<br>
<br>
<br>
<br>
starting: Mon Jun 16 17:09:03 PDT 2008<br>
<br>
<br>
<br>
Trying to get all of the configs.<br>
<a href="http://10.10.10.7" target="_blank">10.10.10.7</a> : missed cmd(s): write term all<br>
=====================================<br>
Getting missed routers: round 1.<br>
<a href="http://10.10.10.7" target="_blank">10.10.10.7</a> : missed cmd(s): write term all<br>
=====================================<br>
Getting missed routers: round 2.<br>
<a href="http://10.10.10.7" target="_blank">10.10.10.7</a> : missed cmd(s): write term all<br>
=====================================<br>
Getting missed routers: round 3.<br>
<a href="http://10.10.10.7" target="_blank">10.10.10.7</a> : missed cmd(s): write term all<br>
=====================================<br>
Getting missed routers: round 4.<br>
<a href="http://10.10.10.7" target="_blank">10.10.10.7</a> : missed cmd(s): write term all<br>
<br>
cvs diff: Diffing .<br>
cvs diff: Diffing configs<br>
cvs commit: Examining .<br>
cvs commit: Examining configs<br>
done<br>
<br>
ending: Mon Jun 16 17:14:02 PDT 2008<br>
<br>
<br>
<br>
<br>
Any help would be greatly appreciated!<br>
<br>
<br>
--<br>
============================================|<br>
Victor Breen<br>
victor at <a href="http://impulse.net" target="_blank">impulse.net</a><br>
|==========================================*|<br>
<br>
<br>
_______________________________________________<br>
Rancid-discuss mailing list<br>
<a href="mailto:Rancid-discuss@shrubbery.net">Rancid-discuss@shrubbery.net</a><br>
<a href="http://www.shrubbery.net/mailman/listinfo.cgi/rancid-discuss" target="_blank">http://www.shrubbery.net/mailman/listinfo.cgi/rancid-discuss</a><br>
<br>
_______________________________________________<br>
Rancid-discuss mailing list<br>
<a href="mailto:Rancid-discuss@shrubbery.net">Rancid-discuss@shrubbery.net</a><br>
<a href="http://www.shrubbery.net/mailman/listinfo.cgi/rancid-discuss" target="_blank">http://www.shrubbery.net/mailman/listinfo.cgi/rancid-discuss</a><br>
</div></div></blockquote></div><br>