it may be the command before this that failed. in general, for it to
runn all the commands, it needs enable. try
export NOPIPE=YES
rancid -d 172.16.2.2
172.16.2.2.raw will have the output from the device and .new the crunched
output.
> But if i run rancid-run in my logs i will see:
>
> Trying to get all of the configs.
> 172.16.2.2: missed cmd(s): show configuration
> 172.16.2.2: End of run not found
> !
> =====================================
> Getting missed routers: round 1.
> 172.16.2.2: missed cmd(s): show configuration
> 172.16.2.2: End of run not found
>
> I can't understand why it works like this.
> Help me if u can :)
> _______________________________________________
> Rancid-discuss mailing list
> Rancid-...@shrubbery.net
> http://www.shrubbery.net/mailman/listinfo.cgi/rancid-discuss
_______________________________________________
Rancid-discuss mailing list
Rancid-...@shrubbery.net
http://www.shrubbery.net/mailman/listinfo.cgi/rancid-discuss
it must have show version.
> have '>' in command line (i think)).
the rancid script shouldnt care about which prompt it shows, but in
general, enable mode is required.
> I did as you say:
> In racid.conf i have:
> NOPIPE=YES; export NOPIPE
>
> Then i did:
>
> ]# /usr/local/libexec/rancid/rancid -d 172.16.2.2
> executing /usr/local/libexec/rancid/clogin -t 90 -c"show configuration"
> 172.16.2.2
> 172.16.2.2: missed cmd(s): show configuration
> 172.16.2.2: missed cmd(s): show configuration
> 172.16.2.2: End of run not found
> 172.16.2.2: End of run not found
> !
> ]# cat /usr/local/libexec/rancid/172.16.2.2.new
> !RANCID-CONTENT-TYPE: cisco
> !
> !
> !
> !
> and that is all that in this file.
and what is in the 172.16.2.2.raw file?
>> ]# cat /usr/local/libexec/rancid/172.16.2.2.new>and what is in the 172.16.2.2.raw file?
>> !RANCID-CONTENT-TYPE: cisco
>> !
>> !
>> !
>> !
>> and that is all that in this file.
In .clogin set
add autoenable <hostname> 1
Run ok for HP direct login to manager level and cisco nexus switches
that don't have enabler level.
(nexus use nxrancid and clogin scripts/program)
/Peo
----------------------------------------------------------
Per-Olof Olsson Email: p...@chalmers.se
Chalmers tekniska högskola IT-service
Hörsalsvägen 5 412 96 Göteborg
Tel: 031/772 6738 Fax: 031/772 8660
----------------------------------------------------------
thats 172.16.2.2.new, not 172.16.2.2.raw.
> >it must have show version.
> I am not sure i understand you right. In rancid file i must use 'show
> version'?
yes, it must include show version since its used in writeterm, at least
for some platforms.
>
> >the rancid script shouldnt care about which prompt it shows, but in
> >general, enable mode is required.
> But in theory - can rancid work with Cisco device w/o 'enable'?
some commands require higher privledges. if you eliminate those that
do, then it'd work.
>thats 172.16.2.2.new, not 172.16.2.2.raw.
Sorry, my fault.
Sorry but it will not work to use rancid for unpriv level, and ">"-prompt.
After some try to grab all open information in unpriv mode from cisco
switches, there have to be some changes to fix a working script.
I add a new switch type/script where I replase all "return(-1)" abort on
"authorization failed" to "retrun(1)" continue on "authorization
failed". See included diff for rancid to rancid_noen
Add -noenabler to clogin command to not have to change in my running
.cloginrc settings
To run cisco rancid script in unpriv mode, there must be some code
update to find >-prompt and to match commands (cmds_regexp) with
>-prompt. Today rancid script only match for #-prompt.
Notice that "show running-config" in nopriv gives error text
"% Invalid input detected at '^' marker."
and you have to set "found_end" before exit "write terminal" parsing
else you will not get a clean run.
If I don't have access to "show running" there is left one
extra line "more system:running-config" in output.
Can't understand to remove that extra line from my rancid_noen just now.
If I run my rancid_noen vs. rancid using full priv there is no diffs in
outputs to switch files.
/Peo
----------------------------------------------------------
Per-Olof Olsson Email: p...@chalmers.se
Chalmers tekniska h�gskola IT-service
H�rsalsv�gen 5 412 96 G�teborg
Tel: 031/772 6738 Fax: 031/772 8680
----------------------------------------------------------
that is not right; it accepts either on.
> If I don't have access to "show running" there is left one
> extra line "more system:running-config" in output.
> Can't understand to remove that extra line from my rancid_noen just now.
thats for the pix.
Sorry, Per-Olof; you are correct. I was looking at a local change. I'll
include this '>' prompt handling change with 2.3.4.