Discussion:
[rancid] Incomplete output
Justin Lambert
2008-07-09 17:56:01 UTC
Permalink
I am trying to set up rancid and must be missing something simple. This is a manual run with clogin using expect 5.43 compiled with the expect-hack1. Destination switch is a Cisco 3020 (blade chassis switch).

~$ clogin -t 90 -c"show running-config write term""

The output I get for both commands is:
Building configuration...

Current configuration : 159 bytes
!
! Last configuration change at 18:07:19 EDT Wed Jul 9 2008 by jlambert
! NVRAM config last updated at 13:40:03 EDT Wed Jul 9 2008 by jlambert
!
!
!
!
!
end


I tried adding 'terminal length 0' to the start of the clogin command hoping maybe that would be sufficient to print out the whole config without hanging on a 'more', but to no avail. I ran expect -d <....> and didn't see anything in the output that looked wrong. Is this related to the expect issues that for some reason are still manifesting itself on my machine? I have tried this on my gentoo machine and on a CentoOS 5.2 machine.

Thanks,
Justin
Martin, Seth
2008-07-09 18:02:19 UTC
Permalink
Are you sure you are getting logged into the device with the appropriate
privilege level?



What if you just use ./clogin devicename does it give you an enable
prompt, and if so can you execute the show run command then manually
from the prompt it gives you?



_____________________________________________________________________
Seth Martin



________________________________

From: rancid-discuss-***@shrubbery.net
[mailto:rancid-discuss-***@shrubbery.net] On Behalf Of Justin
Lambert
Sent: Wednesday, July 09, 2008 1:56 PM
To: rancid-***@shrubbery.net
Subject: [rancid] Incomplete output



I am trying to set up rancid and must be missing something simple. This
is a manual run with clogin using expect 5.43 compiled with the
expect-hack1. Destination switch is a Cisco 3020 (blade chassis
switch).



~$ clogin -t 90 -c"show running-config write term""



The output I get for both commands is:

Building configuration...



Current configuration : 159 bytes

!

! Last configuration change at 18:07:19 EDT Wed Jul 9 2008 by jlambert

! NVRAM config last updated at 13:40:03 EDT Wed Jul 9 2008 by jlambert

!

!

!

!

!

end





I tried adding 'terminal length 0' to the start of the clogin command
hoping maybe that would be sufficient to print out the whole config
without hanging on a 'more', but to no avail. I ran expect -d <....>
and didn't see anything in the output that looked wrong. Is this
related to the expect issues that for some reason are still manifesting
itself on my machine? I have tried this on my gentoo machine and on a
CentoOS 5.2 machine.



Thanks,

Justin
Justin Lambert
2008-07-09 19:08:23 UTC
Permalink
That is exactly what it was. Even though I had given that privilege level rights to the show running-config and write term command you are only able to see what you can modify. It looks like with TACAS+ I could set a user to read only, but for now had to just change the user rancid uses to priv level 15.

Thanks for pointing out the obvious.

Justin

From: Martin, Seth [mailto:***@sourceinterlink.com]
Sent: Wednesday, July 09, 2008 12:02 PM
To: Justin Lambert; rancid-***@shrubbery.net
Subject: RE: [rancid] Incomplete output

Are you sure you are getting logged into the device with the appropriate privilege level?

What if you just use ./clogin devicename does it give you an enable prompt, and if so can you execute the show run command then manually from the prompt it gives you?

_____________________________________________________________________
Seth Martin
________________________________
From: rancid-discuss-***@shrubbery.net [mailto:rancid-discuss-***@shrubbery.net] On Behalf Of Justin Lambert
Sent: Wednesday, July 09, 2008 1:56 PM
To: rancid-***@shrubbery.net
Subject: [rancid] Incomplete output

I am trying to set up rancid and must be missing something simple. This is a manual run with clogin using expect 5.43 compiled with the expect-hack1. Destination switch is a Cisco 3020 (blade chassis switch).

~$ clogin -t 90 -c"show running-config write term""

The output I get for both commands is:
Building configuration...

Current configuration : 159 bytes
!
! Last configuration change at 18:07:19 EDT Wed Jul 9 2008 by jlambert
! NVRAM config last updated at 13:40:03 EDT Wed Jul 9 2008 by jlambert
!
!
!
!
!
end


I tried adding 'terminal length 0' to the start of the clogin command hoping maybe that would be sufficient to print out the whole config without hanging on a 'more', but to no avail. I ran expect -d <....> and didn't see anything in the output that looked wrong. Is this related to the expect issues that for some reason are still manifesting itself on my machine? I have tried this on my gentoo machine and on a CentoOS 5.2 machine.

Thanks,
Justin

Loading...