clogin not logging into Cisco router

Zhang, Anchi AZhang at reliant.com
Fri Mar 15 18:08:58 UTC 2002


Maybe the space between Username and : is giving problems:

log2# grep Username clogin 
        # Username
        # Enable Username
    if { "$u_prompt" == "" } { set u_prompt "(Username|Login|login|user
name):" }
log2# telnet 10.51.5.254
Trying 10.51.5.254...
Connected to 10.51.5.254.
Escape character is '^]'.


User Access Verification

Username: 

-----Original Message-----
From: Joshua Wright [mailto:Joshua.Wright at jwu.edu]
Sent: Friday, March 15, 2002 9:16 AM
To: 'rancid-discuss at shrubbery.net'
Subject: clogin not logging into Cisco router


First, thanks for such a terrific tool.  I have used RANCID 2.2 on a few
FreeBSD boxes and have always been very happy with its results.

I am trying to get RANCID 2.2 working on a Solaris machine, and am
running
into some troubles.  Here are my vitals:

$ uname -a
SunOS george.services.brown.edu 5.8 Generic sun4u sparc SUNW,Ultra-5_10
$ ls -l `which tclsh`
lrwxrwxrwx   1 root     other          8 Oct  5  1999
/usr/local/bin/tclsh
-> tclsh8.0*
$ expect -v 
expect version 5.28.1
$ perl -v

This is perl, version 5.005_03 built for sun4-solaris
<snip>
$ 

Running "rancid -d router.mydomain.com" results in:

$ rancid -d router.mydomain.com
executing clogin -t 90 -c"show version;show install active;show env
all;show
gsr chassis;show boot;show bootvar;show variables boot;show flash;dir
/all
nvram:;dir /all bootflash:;dir /all slot0:;dir /all disk0:;dir /all
slot1:;dir /all disk1:;dir /all sup-bootflash:;dir /all
sup-microcode:;show
controllers;show controllers cbus;show diagbus;show diag;show
module;show
c7200;show vtp status;show vlan;write term" router.mydomain.com
router.mydomain.com clogin error: Error: TIMEOUT reached
router.mydomain.com clogin error: Error: TIMEOUT reached
router.mydomain.com: missed cmd(s): show diagbus,write term,dir /all
bootflash:,show env all,show controllers cbus,dir /all nvram:,show
module,show version,dir /all sup-bootflash:,show c7200,show variables
boot,show flash,show vlan,dir /all slot0:,show install active,dir /all
slot1:,show boot,show diag,show controllers,show gsr chassis,dir /all
sup-microcode:,dir /all disk0:,dir /all disk1:,show bootvar,show vtp
status
router.mydomain.com: missed cmd(s): show diagbus,write term,dir /all
bootflash:,show env all,show controllers cbus,dir /all nvram:,show
module,show version,dir /all sup-bootflash:,show c7200,show variables
boot,show flash,show vlan,dir /all slot0:,show install active,dir /all
slot1:,show boot,show diag,show controllers,show gsr chassis,dir /all
sup-microcode:,dir /all disk0:,dir /all disk1:,show bootvar,show vtp
status
router.mydomain.com: End of run not found
router.mydomain.com: End of run not found
!
$ 

Running "clogin -c "sh bootvar" router.mydomain.com"

$ clogin -c "sh bootvar" router.mydomain.com
router.mydomain.com
spawn telnet router.mydomain.com
Trying 1.1.1.1...
Connected to router.
Escape character is '^]'.

Username :
% Username : timeout expired!
Username :
Error: TIMEOUT reached
$ 

Checking into the README, I am running >Solaris 2.6 so the patches don't
apply.  I don't think the problems with Linux+expect/tcl apply to me
either.
Contents of my .cloginrc file are as follows:

add autoenable  *.mydomain.com    1
add user        *.mydomain.com    username
add password    *.mydomain.com    password

I have verified the username and password are correct.  The output from
clogin appears that expect isn't passing the login information, any
thoughts
as to why?

Thanks very much.


-Joshua Wright
Team Leader, Networks and Systems
Johnson & Wales University
Joshua.Wright at jwu.edu 

pgpkey: http://pgp.mit.edu:11371/pks/lookup?op=get&search=0xD44B4A73
fingerprint: FDA5 12FC F391 3740 E0AE BDB6 8FE2 FC0A D44B 4A73




More information about the Rancid-discuss mailing list