Discussion:
[rancid] Presentation on RANCID at my local UUG
Peter Serwe
2008-11-08 00:54:01 UTC
Permalink
I gave a presentation on RANCID, and how to deploy it and use it on a
CentOS system to my
local Unix User's group.

I don't know if it's of interest or not, and I make no claims about
the quality of the material,
presentation, or video, but I have 2 hours of video, and powerpoint
slides if anyone's interested.

Also, it was alleged during the presentation that Ubuuntu does not
suffer from the problems alleged
to exist on Linux in general with expect, and hence, the need to build
expect from patched source
may not exist for Ubuuntu. I felt it worth mentioning for possible
inclusion in the README after
verification. It is even perhaps possible that all versions of Debian
do not suffer from this problem,
but I can't make that claim as I do not use or have an installation of
Ubuuntu or anything else Debian.

Peter
--
$B%T!<%?!<(B
Mr. James W. Laferriere
2008-11-08 20:09:04 UTC
Permalink
Hello Peter ,
Post by Peter Serwe
I gave a presentation on RANCID, and how to deploy it and use it on a
CentOS system to my
local Unix User's group.
I don't know if it's of interest or not, and I make no claims about
the quality of the material,
presentation, or video, but I have 2 hours of video, and powerpoint
slides if anyone's interested.
Also, it was alleged during the presentation that Ubuuntu does not
suffer from the problems alleged
to exist on Linux in general with expect, and hence, the need to build
expect from patched source
may not exist for Ubuuntu. I felt it worth mentioning for possible
inclusion in the README after
verification. It is even perhaps possible that all versions of Debian
do not suffer from this problem,
but I can't make that claim as I do not use or have an installation of
Ubuuntu or anything else Debian.
Peter
Might there be a URL: of where to view them ?

Tia , JimL
--
+------------------------------------------------------------------+
| James W. Laferriere | System Techniques | Give me VMS |
| Network&System Engineer | 2133 McCullam Ave | Give me Linux |
| ***@baby-dragons.com | Fairbanks, AK. 99701 | only on AXP |
+------------------------------------------------------------------+
Chris Gauthier
2008-11-10 05:08:38 UTC
Permalink
I tackled the Ubuntu issue earlier this summer with v8.04 LTS Server. Here is a link to my previous posts:
http://www.shrubbery.net/pipermail/rancid-discuss/2008-August/003246.html

Chris

________________________________

From: rancid-discuss-***@shrubbery.net on behalf of Peter Serwe
Sent: Fri 11/7/2008 4:54 PM
To: rancid-***@shrubbery.net
Subject: [rancid] Presentation on RANCID at my local UUG



I gave a presentation on RANCID, and how to deploy it and use it on a
CentOS system to my
local Unix User's group.

I don't know if it's of interest or not, and I make no claims about
the quality of the material,
presentation, or video, but I have 2 hours of video, and powerpoint
slides if anyone's interested.

Also, it was alleged during the presentation that Ubuuntu does not
suffer from the problems alleged
to exist on Linux in general with expect, and hence, the need to build
expect from patched source
may not exist for Ubuuntu. I felt it worth mentioning for possible
inclusion in the README after
verification. It is even perhaps possible that all versions of Debian
do not suffer from this problem,
but I can't make that claim as I do not use or have an installation of
Ubuuntu or anything else Debian.

Peter

--
????
A***@HydroOne.com
2008-11-10 20:48:59 UTC
Permalink
Hi,



The netscreen login script sets the 'console page to 0' to get the
config snapshot at once, but this command is not removed when it exists
the box. Can anyone help changing it? Although it is saying that do not
save the config; but still config is not removed.



Which files are used for Netscreens:



nlogin

nrancid

nrancid.back

nslogin

nsrancid



Appreciate your help.



Here is the portion of config: nlogin



set in_proc 1



send "set console page 0\r"

expect $prompt {}



# Is this a multi-command?

if [ string match "*\;*" "$command" ] {

set commands [split $command \;]

set num_commands [llength $commands]



for {set i 0} {$i < $num_commands} { incr i} {

send "[subst [lindex $commands $i]]\r"

expect {

-re "$prompt" {}

}

}

} else {

send "[subst $command]\r"

expect {

-re "$prompt" {}

}

}

send "exit\r"

expect {

"\n" { exp_continue }

-re "$prompt" {

send "exit\r"

exp_continue }

-re "Configuration modified, save?" {

send "n\r"

exp_continue }

timeout { return 0 }

eof { return 0 }

}

set in_proc 0

}
john heasley
2008-11-10 23:49:28 UTC
Permalink
Post by A***@HydroOne.com
Hi,
The netscreen login script sets the 'console page to 0' to get the
config snapshot at once, but this command is not removed when it exists
the box. Can anyone help changing it? Although it is saying that do not
save the config; but still config is not removed.
isn't the terminal length negotiated by telnet/ssh when you connect?
A***@HydroOne.com
2008-11-11 01:20:04 UTC
Permalink
Not sure about that.

I see in the script 'nlogin' that it is setting it to zero, which
causing issue for us as get commands keep scrolling. When techs login to
the FW for troubleshooting.

Anyone using netscreen expereinced this issue?

-----Original Message-----
From: john heasley [mailto:***@shrubbery.net]
Sent: Monday, November 10, 2008 6:49 PM
To: SIDDIQUI Atif
Cc: rancid-***@shrubbery.net
Subject: Re: [rancid] Netscreen: nlogin file 'set console page 0'
Post by A***@HydroOne.com
Hi,
The netscreen login script sets the 'console page to 0' to get the
config snapshot at once, but this command is not removed when it exists
the box. Can anyone help changing it? Although it is saying that do not
save the config; but still config is not removed.
isn't the terminal length negotiated by telnet/ssh when you connect?
john heasley
2008-11-11 22:25:08 UTC
Permalink
Most devices accept (negotiate) the terminal length sent by telnet/ssh and
most allow the pager to essentially be disabled by setting the terminal
length to zero. Some (broken) devices, like Foundry, have a global setting
to disable/enable the pager that is permanent and affects all users.

So, what flavour is the netscreen? Do you have the latest firmware? Do
you have a properly functioning/configured client?
Post by A***@HydroOne.com
Not sure about that.
I see in the script 'nlogin' that it is setting it to zero, which
causing issue for us as get commands keep scrolling. When techs login to
the FW for troubleshooting.
Anyone using netscreen expereinced this issue?
-----Original Message-----
Sent: Monday, November 10, 2008 6:49 PM
To: SIDDIQUI Atif
Subject: Re: [rancid] Netscreen: nlogin file 'set console page 0'
Post by A***@HydroOne.com
Hi,
The netscreen login script sets the 'console page to 0' to get the
config snapshot at once, but this command is not removed when it
exists
Post by A***@HydroOne.com
the box. Can anyone help changing it? Although it is saying that do
not
Post by A***@HydroOne.com
save the config; but still config is not removed.
isn't the terminal length negotiated by telnet/ssh when you connect?
Jethro R Binks
2008-11-11 22:45:29 UTC
Permalink
Some (broken) devices, like Foundry, have a global setting to
disable/enable the pager that is permanent and affects all users.
Perhaps once, but does not appear to be the case even on modestly recent
versions of the Foundry OS that I am familiar with (BigIron 7.6, 8.0,
Super-X 3.x, 4.x, FWSX). skip-page-display is a Priv exec command that
affects only the current session. Maybe it is time to remove the naughty
words surrounding this bit in flogin :)

"Serial console and Telnet CLI users can individually enable or disable
page-display mode without affecting the page-display mode of other CLI
users.

...

This command is equivalent to the no enable skip-page-display command at
the global CONFIG level."

Global config command "enable skip-page-display" is per-system, rather
than per-user. I guess the per-session priv exec command came later.

I note similar comments for Extreme: "... an extreme (since the pager can
not be disabled on a per-vty basis)".

Jethro.
--
. . . . . . . . . . . . . . . . . . . . . . . . .
Jethro R Binks
Computing Officer, IT Services, University Of Strathclyde, Glasgow, UK
john heasley
2008-11-12 07:31:59 UTC
Permalink
Post by Jethro R Binks
Some (broken) devices, like Foundry, have a global setting to
disable/enable the pager that is permanent and affects all users.
Perhaps once, but does not appear to be the case even on modestly recent
versions of the Foundry OS that I am familiar with (BigIron 7.6, 8.0,
Super-X 3.x, 4.x, FWSX). skip-page-display is a Priv exec command that
affects only the current session. Maybe it is time to remove the naughty
words surrounding this bit in flogin :)
any who aspire to have a cisco-like CLI then make a simple command
different, like terminal length 0 which has been around since IOS 8.0,
deserve the naughty bits.
Post by Jethro R Binks
"Serial console and Telnet CLI users can individually enable or disable
page-display mode without affecting the page-display mode of other CLI
users.
...
This command is equivalent to the no enable skip-page-display command at
the global CONFIG level."
Global config command "enable skip-page-display" is per-system, rather
than per-user. I guess the per-session priv exec command came later.
I note similar comments for Extreme: "... an extreme (since the pager can
not be disabled on a per-vty basis)".
can it be now? whats the command?
Jethro R Binks
2008-11-12 09:34:46 UTC
Permalink
Post by john heasley
any who aspire to have a cisco-like CLI then make a simple command
different, like terminal length 0 which has been around since IOS 8.0,
deserve the naughty bits.
That comment could be applied to many vendors, not just Foundry. I have
to deal with three or four Cisco-a-like CLI, each with their own quirks.
I've even seen some badged as "industry-standard CLI", which I suppose is
true in the broadest sense of operation and facility, but certainly not in
detail. And remember the lawsuit spat between Cisco and Huawei, where the
CLI was one issue of contentio. How close to a Cisco interface do vendors
dare go? We buy products from different vendors for good reason, we can
hardly expect every command to match exactly, and yet we should expect
rancid to deal with those differences without prejudice, where such
support is practicable.

Anyway, Cisco can hardly be held an exemplar for consistency :)
Post by john heasley
Post by Jethro R Binks
I note similar comments for Extreme: "... an extreme (since the pager
can not be disabled on a per-vty basis)".
can it be now? whats the command?
Pass, don't have 'em.

Jethro.
--
. . . . . . . . . . . . . . . . . . . . . . . . .
Jethro R Binks
Computing Officer, IT Services, University Of Strathclyde, Glasgow, UK
A***@HydroOne.com
2008-11-11 22:57:41 UTC
Permalink
I found this patch: config change;



but we should be able to put in the page only for that vty sessionnot
affecting all the users and config;

As RANCID does not save the config after doing the following steps;
other users always get a message to save the config or not; even though
they have not change anything; it was because RANCID added "set console
0" then unset it cause the config changes. Can we have a workaround.





http://www.shrubbery.net/pipermail/rancid-discuss/2006-May/001488.html



I'm using the latest nrancid and nlogin for netscreens. Seems to work

nicely, with one caveat: every time we run rancid, paging gets turned

off. On netscreens, paging is a global parameter which can only be

changed by admin users. This can be very annoying for non-admin

users.



Patch:



*** /tmp/T0EMaOJJ Wed May 17 03:12:01 2006

--- nlogin Wed May 17 02:36:55 2006

***************

*** 412,417 ****

--- 412,419 ----

}

}

}

+ send "unset console page\r"

+ expect -re "$prompt" {}

send "exit\r"

expect {

-re "$prompt" {

***************

*** 511,516 ****

--- 513,520 ----

send "set console page 0\r"

expect -re $prompt {}

source $sfile

+ send "unset console page\r"

+ expect -re "$prompt" {}

close

} else {

label $firewall





Thanks!



- Morty







-----Original Message-----
From: john heasley [mailto:***@shrubbery.net]
Sent: Tuesday, November 11, 2008 5:25 PM
To: SIDDIQUI Atif
Cc: rancid-***@shrubbery.net
Subject: Re: [rancid] Netscreen: nlogin file 'set console page 0'



Most devices accept (negotiate) the terminal length sent by telnet/ssh
and

most allow the pager to essentially be disabled by setting the terminal

length to zero. Some (broken) devices, like Foundry, have a global
setting

to disable/enable the pager that is permanent and affects all users.



So, what flavour is the netscreen? Do you have the latest firmware? Do

you have a properly functioning/configured client?
Post by A***@HydroOne.com
Not sure about that.
I see in the script 'nlogin' that it is setting it to zero, which
causing issue for us as get commands keep scrolling. When techs login to
the FW for troubleshooting.
Anyone using netscreen expereinced this issue?
-----Original Message-----
Sent: Monday, November 10, 2008 6:49 PM
To: SIDDIQUI Atif
Subject: Re: [rancid] Netscreen: nlogin file 'set console page 0'
Post by A***@HydroOne.com
Hi,
The netscreen login script sets the 'console page to 0' to get the
config snapshot at once, but this command is not removed when it
exists
Post by A***@HydroOne.com
the box. Can anyone help changing it? Although it is saying that do
not
Post by A***@HydroOne.com
save the config; but still config is not removed.
isn't the terminal length negotiated by telnet/ssh when you connect?
john heasley
2008-11-12 02:00:35 UTC
Permalink
Post by A***@HydroOne.com
I found this patch: config change;
but we should be able to put in the page only for that vty sessionnot
affecting all the users and config;
As RANCID does not save the config after doing the following steps;
other users always get a message to save the config or not; even though
they have not change anything; it was because RANCID added "set console
0" then unset it cause the config changes. Can we have a workaround.
That does not seem to be a very good fix. If another user happens to be
logged-in when rancid runs, the pager will be disabled AND if another user
re-enables the pager it will confuse nlogin, possibly causing it to hang
(thus more emails about problems collecting...).

A better fix, assuming this is still a global knob, is to deal with the
pager, if possible.
Skinner, Michael
2008-11-12 10:37:11 UTC
Permalink
It is possible for rancid to deal with the pager on netscreens. In my
infrastructure rancid has read only accounts on devices, so has no
ability to edit the console page, it gets on fine... admittedly I had to
hack the code a bit, as the build in read-only support was broken.

Problem and fix when originally discovered:
http://www.shrubbery.net/pipermail/rancid-discuss/2007-May/002224.html

Paul Zimmerman took the trouble to tidy this up further, details at
bottom of email

There is no reason this method couldn't be used for read/write accounts.

Mike


[***@caillez ~/local/libexec/rancid]$ sccs diffs -C8 -r1.2 nrancid

------- nrancid -------
*** - Mon Jul 23 09:20:57 2007
--- nrancid Mon Jul 23 09:17:18 2007
***************
*** 141,160 ****
}

# This routine parses "get system"
sub GetSystem {
print STDERR " In GetSystem: $_" if ($debug);

while (<INPUT>) {
tr/\015//d;
next if /^\s*$/;
last if(/$prompt/);
- # throw away the pager lines
- next if /^--- more ---/;

/^Serial Number: (\d+), Control Number: \d+$/ &&
ProcessHistory("SYSTEM","","", "!SN: $1\n") && next;
/^Product Name: (\S+)$/ &&
ProcessHistory("SYSTEM","","", "!Product: $1\n") &&
next;
/^Hardware Version: (\S+), / &&
ProcessHistory("SYSTEM","","", "!HW: $1\n") && next;
/^Software Version: (\S+), Type: (\S+)$/ &&
--- 141,160 ----
}

# This routine parses "get system"
sub GetSystem {
print STDERR " In GetSystem: $_" if ($debug);

while (<INPUT>) {
tr/\015//d;
+ # throw away the pager text
+ s/^--- more ---( \x08|\x08)*//;
next if /^\s*$/;
last if(/$prompt/);

/^Serial Number: (\d+), Control Number: \d+$/ &&
ProcessHistory("SYSTEM","","", "!SN: $1\n") && next;
/^Product Name: (\S+)$/ &&
ProcessHistory("SYSTEM","","", "!Product: $1\n") &&
next;
/^Hardware Version: (\S+), / &&
ProcessHistory("SYSTEM","","", "!HW: $1\n") && next;
/^Software Version: (\S+), Type: (\S+)$/ &&
***************
*** 179,199 ****
ProcessHistory("FILE","","","!\n");
return(0);
}

sub GetConf {
print STDERR " In GetConf: $_" if ($debug);
while (<INPUT>) {
tr/\015//d;
next if /^\s*$/;
next if /^Total Config.+$/i;
last if(/$prompt/);
- # throw away the pager lines
- next if /^--- more ---/;

if (/^set admin name "(\S+)"$/ && $filter_pwds >= 1) {
ProcessHistory("ADMIN","","","!set admin name <removed>
\n");
next;
}
if (/^set admin password (\S+)$/ && $filter_pwds >= 1) {
ProcessHistory("ADMIN","","","!set admin password
<removed>\n");
next;
--- 179,199 ----
ProcessHistory("FILE","","","!\n");
return(0);
}

sub GetConf {
print STDERR " In GetConf: $_" if ($debug);
while (<INPUT>) {
tr/\015//d;
+ # throw away the pager text
+ s/^--- more ---( \x08|\x08)*//;
next if /^\s*$/;
next if /^Total Config.+$/i;
last if(/$prompt/);

if (/^set admin name "(\S+)"$/ && $filter_pwds >= 1) {
ProcessHistory("ADMIN","","","!set admin name <removed>
\n");
next;
}
if (/^set admin password (\S+)$/ && $filter_pwds >= 1) {
ProcessHistory("ADMIN","","","!set admin password
<removed>\n");
next;



-----Original Message-----
From: rancid-discuss-***@shrubbery.net
[mailto:rancid-discuss-***@shrubbery.net] On Behalf Of john heasley
Sent: 12 November 2008 02:01
To: ***@HydroOne.com
Cc: rancid-***@shrubbery.net
Subject: [rancid] Re: Netscreen: nlogin file 'set console page 0'
Post by A***@HydroOne.com
I found this patch: config change;
but we should be able to put in the page only for that vty sessionnot
affecting all the users and config;
As RANCID does not save the config after doing the following steps;
other users always get a message to save the config or not; even
though they have not change anything; it was because RANCID added "set
console 0" then unset it cause the config changes. Can we have a
workaround.

That does not seem to be a very good fix. If another user happens to be
logged-in when rancid runs, the pager will be disabled AND if another
user re-enables the pager it will confuse nlogin, possibly causing it to
hang (thus more emails about problems collecting...).

A better fix, assuming this is still a global knob, is to deal with the
pager, if possible.
_______________________________________________
Rancid-discuss mailing list
Rancid-***@shrubbery.net
http://www.shrubbery.net/mailman/listinfo.cgi/rancid-discuss

------------------------------------------------------------------------------
Save Paper - Do you really need to print this e-mail?

Visit www.virginmedia.com for more information, and more fun.

This email and any attachments are or may be confidential and legally privileged
and are sent solely for the attention of the addressee(s). If you have received this
email in error, please delete it from your system: its use, disclosure or copying is
unauthorised. Statements and opinions expressed in this email may not represent
those of Virgin Media. Any representations or commitments in this email are
subject to contract. Please note that we are migrating our email addresses to a
company wide address of "@virginmedia.co.uk". If you are sending to a Telewest or
ntl email address your email will be re-directed.

Registered office: 160 Great Portland Street, London W1W 5QA.
Registered in England and Wales with number 2591237
==============================================================================
A***@HydroOne.com
2008-11-12 18:33:42 UTC
Permalink
Mike,

Thanks for the help here. This is the exact solution I was looking for.

Atif

-----Original Message-----
From: Skinner, Michael [mailto:***@virginmedia.co.uk]
Sent: Wednesday, November 12, 2008 5:37 AM
To: rancid-***@shrubbery.net
Cc: john heasley; SIDDIQUI Atif
Subject: RE: [rancid] Re: Netscreen: nlogin file 'set console page 0'

It is possible for rancid to deal with the pager on netscreens. In my
infrastructure rancid has read only accounts on devices, so has no
ability to edit the console page, it gets on fine... admittedly I had to
hack the code a bit, as the build in read-only support was broken.

Problem and fix when originally discovered:
http://www.shrubbery.net/pipermail/rancid-discuss/2007-May/002224.html

Paul Zimmerman took the trouble to tidy this up further, details at
bottom of email

There is no reason this method couldn't be used for read/write accounts.

Mike


[***@caillez ~/local/libexec/rancid]$ sccs diffs -C8 -r1.2 nrancid

------- nrancid -------
*** - Mon Jul 23 09:20:57 2007
--- nrancid Mon Jul 23 09:17:18 2007
***************
*** 141,160 ****
}

# This routine parses "get system"
sub GetSystem {
print STDERR " In GetSystem: $_" if ($debug);

while (<INPUT>) {
tr/\015//d;
next if /^\s*$/;
last if(/$prompt/);
- # throw away the pager lines
- next if /^--- more ---/;

/^Serial Number: (\d+), Control Number: \d+$/ &&
ProcessHistory("SYSTEM","","", "!SN: $1\n") && next;
/^Product Name: (\S+)$/ &&
ProcessHistory("SYSTEM","","", "!Product: $1\n") &&
next;
/^Hardware Version: (\S+), / &&
ProcessHistory("SYSTEM","","", "!HW: $1\n") && next;
/^Software Version: (\S+), Type: (\S+)$/ &&
--- 141,160 ----
}

# This routine parses "get system"
sub GetSystem {
print STDERR " In GetSystem: $_" if ($debug);

while (<INPUT>) {
tr/\015//d;
+ # throw away the pager text
+ s/^--- more ---( \x08|\x08)*//;
next if /^\s*$/;
last if(/$prompt/);

/^Serial Number: (\d+), Control Number: \d+$/ &&
ProcessHistory("SYSTEM","","", "!SN: $1\n") && next;
/^Product Name: (\S+)$/ &&
ProcessHistory("SYSTEM","","", "!Product: $1\n") &&
next;
/^Hardware Version: (\S+), / &&
ProcessHistory("SYSTEM","","", "!HW: $1\n") && next;
/^Software Version: (\S+), Type: (\S+)$/ &&
***************
*** 179,199 ****
ProcessHistory("FILE","","","!\n");
return(0);
}

sub GetConf {
print STDERR " In GetConf: $_" if ($debug);
while (<INPUT>) {
tr/\015//d;
next if /^\s*$/;
next if /^Total Config.+$/i;
last if(/$prompt/);
- # throw away the pager lines
- next if /^--- more ---/;

if (/^set admin name "(\S+)"$/ && $filter_pwds >= 1) {
ProcessHistory("ADMIN","","","!set admin name <removed>
\n");
next;
}
if (/^set admin password (\S+)$/ && $filter_pwds >= 1) {
ProcessHistory("ADMIN","","","!set admin password
<removed>\n");
next;
--- 179,199 ----
ProcessHistory("FILE","","","!\n");
return(0);
}

sub GetConf {
print STDERR " In GetConf: $_" if ($debug);
while (<INPUT>) {
tr/\015//d;
+ # throw away the pager text
+ s/^--- more ---( \x08|\x08)*//;
next if /^\s*$/;
next if /^Total Config.+$/i;
last if(/$prompt/);

if (/^set admin name "(\S+)"$/ && $filter_pwds >= 1) {
ProcessHistory("ADMIN","","","!set admin name <removed>
\n");
next;
}
if (/^set admin password (\S+)$/ && $filter_pwds >= 1) {
ProcessHistory("ADMIN","","","!set admin password
<removed>\n");
next;



-----Original Message-----
From: rancid-discuss-***@shrubbery.net
[mailto:rancid-discuss-***@shrubbery.net] On Behalf Of john heasley
Sent: 12 November 2008 02:01
To: ***@HydroOne.com
Cc: rancid-***@shrubbery.net
Subject: [rancid] Re: Netscreen: nlogin file 'set console page 0'
Post by A***@HydroOne.com
I found this patch: config change;
but we should be able to put in the page only for that vty sessionnot
affecting all the users and config;
As RANCID does not save the config after doing the following steps;
other users always get a message to save the config or not; even
though they have not change anything; it was because RANCID added "set
console 0" then unset it cause the config changes. Can we have a
workaround.

That does not seem to be a very good fix. If another user happens to be
logged-in when rancid runs, the pager will be disabled AND if another
user re-enables the pager it will confuse nlogin, possibly causing it to
hang (thus more emails about problems collecting...).

A better fix, assuming this is still a global knob, is to deal with the
pager, if possible.
_______________________________________________
Rancid-discuss mailing list
Rancid-***@shrubbery.net
http://www.shrubbery.net/mailman/listinfo.cgi/rancid-discuss

------------------------------------------------------------------------
------
Save Paper - Do you really need to print this e-mail?

Visit www.virginmedia.com for more information, and more fun.

This email and any attachments are or may be confidential and legally
privileged
and are sent solely for the attention of the addressee(s). If you have
received this
email in error, please delete it from your system: its use, disclosure
or copying is
unauthorised. Statements and opinions expressed in this email may not
represent
those of Virgin Media. Any representations or commitments in this email
are
subject to contract. Please note that we are migrating our email
addresses to a
company wide address of "@virginmedia.co.uk". If you are sending to a
Telewest or
ntl email address your email will be re-directed.

Registered office: 160 Great Portland Street, London W1W 5QA.
Registered in England and Wales with number 2591237
========================================================================
======
john heasley
2008-11-14 00:32:13 UTC
Permalink
Post by A***@HydroOne.com
Mike,
Thanks for the help here. This is the exact solution I was looking for.
Are you confirming that this works reliably?
Post by A***@HydroOne.com
Atif
-----Original Message-----
Sent: Wednesday, November 12, 2008 5:37 AM
Cc: john heasley; SIDDIQUI Atif
Subject: RE: [rancid] Re: Netscreen: nlogin file 'set console page 0'
It is possible for rancid to deal with the pager on netscreens. In my
infrastructure rancid has read only accounts on devices, so has no
ability to edit the console page, it gets on fine... admittedly I had to
hack the code a bit, as the build in read-only support was broken.
http://www.shrubbery.net/pipermail/rancid-discuss/2007-May/002224.html
Paul Zimmerman took the trouble to tidy this up further, details at
bottom of email
There is no reason this method couldn't be used for read/write accounts.
Mike
------- nrancid -------
*** - Mon Jul 23 09:20:57 2007
--- nrancid Mon Jul 23 09:17:18 2007
***************
*** 141,160 ****
}
# This routine parses "get system"
sub GetSystem {
print STDERR " In GetSystem: $_" if ($debug);
while (<INPUT>) {
tr/\015//d;
next if /^\s*$/;
last if(/$prompt/);
- # throw away the pager lines
- next if /^--- more ---/;
/^Serial Number: (\d+), Control Number: \d+$/ &&
ProcessHistory("SYSTEM","","", "!SN: $1\n") && next;
/^Product Name: (\S+)$/ &&
ProcessHistory("SYSTEM","","", "!Product: $1\n") &&
next;
/^Hardware Version: (\S+), / &&
ProcessHistory("SYSTEM","","", "!HW: $1\n") && next;
/^Software Version: (\S+), Type: (\S+)$/ &&
--- 141,160 ----
}
# This routine parses "get system"
sub GetSystem {
print STDERR " In GetSystem: $_" if ($debug);
while (<INPUT>) {
tr/\015//d;
+ # throw away the pager text
+ s/^--- more ---( \x08|\x08)*//;
next if /^\s*$/;
last if(/$prompt/);
/^Serial Number: (\d+), Control Number: \d+$/ &&
ProcessHistory("SYSTEM","","", "!SN: $1\n") && next;
/^Product Name: (\S+)$/ &&
ProcessHistory("SYSTEM","","", "!Product: $1\n") &&
next;
/^Hardware Version: (\S+), / &&
ProcessHistory("SYSTEM","","", "!HW: $1\n") && next;
/^Software Version: (\S+), Type: (\S+)$/ &&
***************
*** 179,199 ****
ProcessHistory("FILE","","","!\n");
return(0);
}
sub GetConf {
print STDERR " In GetConf: $_" if ($debug);
while (<INPUT>) {
tr/\015//d;
next if /^\s*$/;
next if /^Total Config.+$/i;
last if(/$prompt/);
- # throw away the pager lines
- next if /^--- more ---/;
if (/^set admin name "(\S+)"$/ && $filter_pwds >= 1) {
ProcessHistory("ADMIN","","","!set admin name <removed>
\n");
next;
}
if (/^set admin password (\S+)$/ && $filter_pwds >= 1) {
ProcessHistory("ADMIN","","","!set admin password
<removed>\n");
next;
--- 179,199 ----
ProcessHistory("FILE","","","!\n");
return(0);
}
sub GetConf {
print STDERR " In GetConf: $_" if ($debug);
while (<INPUT>) {
tr/\015//d;
+ # throw away the pager text
+ s/^--- more ---( \x08|\x08)*//;
next if /^\s*$/;
next if /^Total Config.+$/i;
last if(/$prompt/);
if (/^set admin name "(\S+)"$/ && $filter_pwds >= 1) {
ProcessHistory("ADMIN","","","!set admin name <removed>
\n");
next;
}
if (/^set admin password (\S+)$/ && $filter_pwds >= 1) {
ProcessHistory("ADMIN","","","!set admin password
<removed>\n");
next;
-----Original Message-----
Sent: 12 November 2008 02:01
Subject: [rancid] Re: Netscreen: nlogin file 'set console page 0'
Post by A***@HydroOne.com
I found this patch: config change;
but we should be able to put in the page only for that vty sessionnot
affecting all the users and config;
As RANCID does not save the config after doing the following steps;
other users always get a message to save the config or not; even
though they have not change anything; it was because RANCID added "set
console 0" then unset it cause the config changes. Can we have a
workaround.
That does not seem to be a very good fix. If another user happens to be
logged-in when rancid runs, the pager will be disabled AND if another
user re-enables the pager it will confuse nlogin, possibly causing it to
hang (thus more emails about problems collecting...).
A better fix, assuming this is still a global knob, is to deal with the
pager, if possible.
_______________________________________________
Rancid-discuss mailing list
http://www.shrubbery.net/mailman/listinfo.cgi/rancid-discuss
------------------------------------------------------------------------
------
Save Paper - Do you really need to print this e-mail?
Visit www.virginmedia.com for more information, and more fun.
This email and any attachments are or may be confidential and legally privileged
and are sent solely for the attention of the addressee(s). If you have received this
email in error, please delete it from your system: its use, disclosure or copying is
unauthorised. Statements and opinions expressed in this email may not represent
those of Virgin Media. Any representations or commitments in this email are
subject to contract. Please note that we are migrating our email addresses to a
ntl email address your email will be re-directed.
Registered office: 160 Great Portland Street, London W1W 5QA.
Registered in England and Wales with number 2591237
========================================================================
======
A***@HydroOne.com
2008-11-14 03:13:04 UTC
Permalink
Yes. Atleast ths issue I was having is resolved.

RANCID is making changes to the config and does not save it.
It sets page console to '0' exits without saving.

2 problems:

- console settings do not have page limit
- Other user logs in and out of NS gets a config save confirmation
message; even though no change has been made

The modified 'nrancid' and 'nlogin' provided by Mike does not change
configs by setting soncole to page 0 hence no config save message
appear. RO user account can be used by RANCID to back up the config.




-----Original Message-----
From: john heasley [mailto:***@shrubbery.net]
Sent: Thursday, November 13, 2008 7:32 PM
To: SIDDIQUI Atif
Cc: ***@virginmedia.co.uk; rancid-***@shrubbery.net
Subject: Re: [rancid] Re: Netscreen: nlogin file 'set console page 0'
Post by A***@HydroOne.com
Mike,
Thanks for the help here. This is the exact solution I was looking for.
Are you confirming that this works reliably?
Post by A***@HydroOne.com
Atif
-----Original Message-----
Sent: Wednesday, November 12, 2008 5:37 AM
Cc: john heasley; SIDDIQUI Atif
Subject: RE: [rancid] Re: Netscreen: nlogin file 'set console page 0'
It is possible for rancid to deal with the pager on netscreens. In my
infrastructure rancid has read only accounts on devices, so has no
ability to edit the console page, it gets on fine... admittedly I had to
hack the code a bit, as the build in read-only support was broken.
http://www.shrubbery.net/pipermail/rancid-discuss/2007-May/002224.html
Paul Zimmerman took the trouble to tidy this up further, details at
bottom of email
There is no reason this method couldn't be used for read/write
accounts.
Post by A***@HydroOne.com
Mike
------- nrancid -------
*** - Mon Jul 23 09:20:57 2007
--- nrancid Mon Jul 23 09:17:18 2007
***************
*** 141,160 ****
}
# This routine parses "get system"
sub GetSystem {
print STDERR " In GetSystem: $_" if ($debug);
while (<INPUT>) {
tr/\015//d;
next if /^\s*$/;
last if(/$prompt/);
- # throw away the pager lines
- next if /^--- more ---/;
/^Serial Number: (\d+), Control Number: \d+$/ &&
ProcessHistory("SYSTEM","","", "!SN: $1\n") && next;
/^Product Name: (\S+)$/ &&
ProcessHistory("SYSTEM","","", "!Product: $1\n") &&
next;
/^Hardware Version: (\S+), / &&
ProcessHistory("SYSTEM","","", "!HW: $1\n") && next;
/^Software Version: (\S+), Type: (\S+)$/ &&
--- 141,160 ----
}
# This routine parses "get system"
sub GetSystem {
print STDERR " In GetSystem: $_" if ($debug);
while (<INPUT>) {
tr/\015//d;
+ # throw away the pager text
+ s/^--- more ---( \x08|\x08)*//;
next if /^\s*$/;
last if(/$prompt/);
/^Serial Number: (\d+), Control Number: \d+$/ &&
ProcessHistory("SYSTEM","","", "!SN: $1\n") && next;
/^Product Name: (\S+)$/ &&
ProcessHistory("SYSTEM","","", "!Product: $1\n") &&
next;
/^Hardware Version: (\S+), / &&
ProcessHistory("SYSTEM","","", "!HW: $1\n") && next;
/^Software Version: (\S+), Type: (\S+)$/ &&
***************
*** 179,199 ****
ProcessHistory("FILE","","","!\n");
return(0);
}
sub GetConf {
print STDERR " In GetConf: $_" if ($debug);
while (<INPUT>) {
tr/\015//d;
next if /^\s*$/;
next if /^Total Config.+$/i;
last if(/$prompt/);
- # throw away the pager lines
- next if /^--- more ---/;
if (/^set admin name "(\S+)"$/ && $filter_pwds >= 1) {
ProcessHistory("ADMIN","","","!set admin name <removed>
\n");
next;
}
if (/^set admin password (\S+)$/ && $filter_pwds >= 1) {
ProcessHistory("ADMIN","","","!set admin password
<removed>\n");
next;
--- 179,199 ----
ProcessHistory("FILE","","","!\n");
return(0);
}
sub GetConf {
print STDERR " In GetConf: $_" if ($debug);
while (<INPUT>) {
tr/\015//d;
+ # throw away the pager text
+ s/^--- more ---( \x08|\x08)*//;
next if /^\s*$/;
next if /^Total Config.+$/i;
last if(/$prompt/);
if (/^set admin name "(\S+)"$/ && $filter_pwds >= 1) {
ProcessHistory("ADMIN","","","!set admin name <removed>
\n");
next;
}
if (/^set admin password (\S+)$/ && $filter_pwds >= 1) {
ProcessHistory("ADMIN","","","!set admin password
<removed>\n");
next;
-----Original Message-----
Sent: 12 November 2008 02:01
Subject: [rancid] Re: Netscreen: nlogin file 'set console page 0'
Post by A***@HydroOne.com
I found this patch: config change;
but we should be able to put in the page only for that vty
sessionnot
Post by A***@HydroOne.com
Post by A***@HydroOne.com
affecting all the users and config;
As RANCID does not save the config after doing the following steps;
other users always get a message to save the config or not; even
though they have not change anything; it was because RANCID added "set
console 0" then unset it cause the config changes. Can we have a
workaround.
That does not seem to be a very good fix. If another user happens to be
logged-in when rancid runs, the pager will be disabled AND if another
user re-enables the pager it will confuse nlogin, possibly causing it to
hang (thus more emails about problems collecting...).
A better fix, assuming this is still a global knob, is to deal with the
pager, if possible.
_______________________________________________
Rancid-discuss mailing list
http://www.shrubbery.net/mailman/listinfo.cgi/rancid-discuss
------------------------------------------------------------------------
Post by A***@HydroOne.com
------
Save Paper - Do you really need to print this e-mail?
Visit www.virginmedia.com for more information, and more fun.
This email and any attachments are or may be confidential and legally privileged
and are sent solely for the attention of the addressee(s). If you have received this
email in error, please delete it from your system: its use, disclosure or copying is
unauthorised. Statements and opinions expressed in this email may not represent
those of Virgin Media. Any representations or commitments in this email
are
subject to contract. Please note that we are migrating our email addresses to a
ntl email address your email will be re-directed.
Registered office: 160 Great Portland Street, London W1W 5QA.
Registered in England and Wales with number 2591237
========================================================================
Post by A***@HydroOne.com
======
Loading...