Discussion:
[rancid] rancid issues with IOS XR
Drikus Brits
2010-03-25 17:55:39 UTC
Permalink
HI all,

Hope someone can help on this issue.

I seem to be having an issue logging onto IOS XR routers using clogin, or the xrrancid patch as described by previous forums.

the output i get when using -autoenable or configuring the devices in my .cloginrc file returns the same output.

It seems to skip the initial expect sequence for Username: and then returns with another auth reques, after the second prompt the expect script appear to have died, as i can then type in my own authentication details.

User Access Verification

Username:

User Access Verification

Username:
telnet> quit


Any ideas ?

I have tried this on rancid 2.3.2a7 and the new 2.3.3, but still no luck.

Thanks,

Drikus
�This e-mail is sent on the Terms and Conditions that can be accessed by Clicking on this link http://www.vodacom.co.za/legal/email.jsp "
john heasley
2010-03-25 20:16:53 UTC
Permalink
Post by Drikus Brits
HI all,
Hope someone can help on this issue.
I seem to be having an issue logging onto IOS XR routers using clogin, or the xrrancid patch as described by previous forums.
the output i get when using -autoenable or configuring the devices in my .cloginrc file returns the same output.
It seems to skip the initial expect sequence for Username: and then returns with another auth reques, after the second prompt the expect script appear to have died, as i can then type in my own authentication details.
User Access Verification
User Access Verification
telnet> quit
you'll have to share the o/p of clogin -d hostname with us.
Drikus Brits
2010-03-26 06:36:06 UTC
Permalink
Hi,

Find below the debug section


<snip>
10.117.144.75
spawn telnet 10.117.144.75
parent: waiting for sync byte
parent: telling child to go ahead
parent: now unsynchronized from child
spawn: returns {24151}

expect: does "" (spawn_id exp6) match regular expression "(Connection refused|Secure connection [^\n\r]+ refused)"? no
"(Connection closed by|Connection to [^\n\r]+ closed)"? no

expect: does "" (spawn_id exp6) match glob pattern "unknown host\r"? no

expect: does "" (spawn_id exp6) match glob pattern "Host is unreachable"? no
"No address associated with name"? no
"(Host key not found |The authenticity of host .* be established).*(yes/no)?"? no
"HOST IDENTIFICATION HAS CHANGED.* (yes/no)?"? no
"Offending key for .* (yes/no)?"? no
"(denied|Sorry)"? no
"Login failed"? no
"% (Bad passwords|Authentication failed)"? no
"Press any key to continue"? no
"Enter Selection: "? no
"Last login:"? no
"@[^\r\n]+ ([Pp]assword|passwd):"? no
"(Username|Login|login|user name|User):"? no
"([Pp]assword|passwd):"? no
"(#| \(enable\))"? no
"Login invalid"? no
Trying 10.117.144.75...

expect: does "Trying 10.117.144.75...\r\n" (spawn_id exp6) match regular expression "(Connection refused|Secure connection [^\n\r]+ refused)"? no
"(Connection closed by|Connection to [^\n\r]+ closed)"? no

expect: does "Trying 10.117.144.75...\r\n" (spawn_id exp6) match glob pattern "unknown host\r"? no

expect: does "Trying 10.117.144.75...\r\n" (spawn_id exp6) match glob pattern "Host is unreachable"? no
"No address associated with name"? no
"(Host key not found |The authenticity of host .* be established).*(yes/no)?"? no
"HOST IDENTIFICATION HAS CHANGED.* (yes/no)?"? no
"Offending key for .* (yes/no)?"? no
"(denied|Sorry)"? no
"Login failed"? no
"% (Bad passwords|Authentication failed)"? no
"Press any key to continue"? no
"Enter Selection: "? no
"Last login:"? no
"@[^\r\n]+ ([Pp]assword|passwd):"? no
"(Username|Login|login|user name|User):"? no
"([Pp]assword|passwd):"? no
"(#| \(enable\))"? no
"Login invalid"? no
Connected to 10.117.144.75.
Escape character is '^]'.

expect: does "Trying 10.117.144.75...\r\nConnected to 10.117.144.75.\r\nEscape character is '^]'.\r\n" (spawn_id exp6) match regular expression "(Connection refused|Secure connection [^\n\r]+ refused)"? no
"(Connection closed by|Connection to [^\n\r]+ closed)"? no

expect: does "Trying 10.117.144.75...\r\nConnected to 10.117.144.75.\r\nEscape character is '^]'.\r\n" (spawn_id exp6) match glob pattern "unknown host\r"? no

expect: does "Trying 10.117.144.75...\r\nConnected to 10.117.144.75.\r\nEscape character is '^]'.\r\n" (spawn_id exp6) match glob pattern "Host is unreachable"? no
"No address associated with name"? no
"(Host key not found |The authenticity of host .* be established).*(yes/no)?"? no
"HOST IDENTIFICATION HAS CHANGED.* (yes/no)?"? no
"Offending key for .* (yes/no)?"? no
"(denied|Sorry)"? no
"Login failed"? no
"% (Bad passwords|Authentication failed)"? no
"Press any key to continue"? no
"Enter Selection: "? no
"Last login:"? no
"@[^\r\n]+ ([Pp]assword|passwd):"? no
"(Username|Login|login|user name|User):"? no
"([Pp]assword|passwd):"? no
"(#| \(enable\))"? no
"Login invalid"? no


expect: does "Trying 10.117.144.75...\r\nConnected to 10.117.144.75.\r\nEscape character is '^]'.\r\n\r\n" (spawn_id exp6) match regular expression "(Connection refused|Secure connection [^\n\r]+ refused)"? no
"(Connection closed by|Connection to [^\n\r]+ closed)"? no

expect: does "Trying 10.117.144.75...\r\nConnected to 10.117.144.75.\r\nEscape character is '^]'.\r\n\r\n" (spawn_id exp6) match glob pattern "unknown host\r"? no

expect: does "Trying 10.117.144.75...\r\nConnected to 10.117.144.75.\r\nEscape character is '^]'.\r\n\r\n" (spawn_id exp6) match glob pattern "Host is unreachable"? no
"No address associated with name"? no
"(Host key not found |The authenticity of host .* be established).*(yes/no)?"? no
"HOST IDENTIFICATION HAS CHANGED.* (yes/no)?"? no
"Offending key for .* (yes/no)?"? no
"(denied|Sorry)"? no
"Login failed"? no
"% (Bad passwords|Authentication failed)"? no
"Press any key to continue"? no
"Enter Selection: "? no
"Last login:"? no
"@[^\r\n]+ ([Pp]assword|passwd):"? no
"(Username|Login|login|user name|User):"? no
"([Pp]assword|passwd):"? no
"(#| \(enable\))"? no
"Login invalid"? no
CCC
####################################################################################
### UNAUTHORISED ACCESS TO THIS NETWORK DEVICE IS PROHIBITED ###
### You must have explicit permission to access or configure this device. All
expect: does "Trying 10.117.144.75...\r\nConnected to 10.117.144.75.\r\nEscape character is '^]'.\r\n\r\nCCC\r\n####################################################################################\r\n### UNAUTHORISED ACCESS TO THIS NETWORK DEVICE IS PROHIBITED ###\r\n### You must have explicit permission to access or configure this device. All " (spawn_id exp6) match regular expression "(Connection refused|Secure connection [^\n\r]+ refused)"? no
"(Connection closed by|Connection to [^\n\r]+ closed)"? no

expect: does "Trying 10.117.144.75...\r\nConnected to 10.117.144.75.\r\nEscape character is '^]'.\r\n\r\nCCC\r\n####################################################################################\r\n### UNAUTHORISED ACCESS TO THIS NETWORK DEVICE IS PROHIBITED ###\r\n### You must have explicit permission to access or configure this device. All " (spawn_id exp6) match glob pattern "unknown host\r"? no

expect: does "Trying 10.117.144.75...\r\nConnected to 10.117.144.75.\r\nEscape character is '^]'.\r\n\r\nCCC\r\n####################################################################################\r\n### UNAUTHORISED ACCESS TO THIS NETWORK DEVICE IS PROHIBITED ###\r\n### You must have explicit permission to access or configure this device. All " (spawn_id exp6) match glob pattern "Host is unreachable"? no
"No address associated with name"? no
"(Host key not found |The authenticity of host .* be established).*(yes/no)?"? no
"HOST IDENTIFICATION HAS CHANGED.* (yes/no)?"? no
"Offending key for .* (yes/no)?"? no
"(denied|Sorry)"? no
"Login failed"? no
"% (Bad passwords|Authentication failed)"? no
"Press any key to continue"? no
"Enter Selection: "? no
"Last login:"? no
"@[^\r\n]+ ([Pp]assword|passwd):"? no
"(Username|Login|login|user name|User):"? no
"([Pp]assword|passwd):"? no
"(#| \(enable\))"? yes
expect: set expect_out(0,string) "#"
expect: set expect_out(1,string) "#"
expect: set expect_out(spawn_id) "exp6"
expect: set expect_out(buffer) "Trying 10.117.144.75...\r\nConnected to 10.117.144.75.\r\nEscape character is '^]'.\r\n\r\nCCC\r\n#"
send: sending "\r" to { exp6 }

expect: does "###################################################################################\r\n### UNAUTHORISED ACCESS TO THIS NETWORK DEVICE IS PROHIBITED ###\r\n### You must have explicit permission to access or configure this device. All " (spawn_id exp6) match regular expression "[\r\n]+"? yes
expect: set expect_out(0,string) "\r\n"
expect: set expect_out(spawn_id) "exp6"
expect: set expect_out(buffer) "###################################################################################\r\n"
expect: continuing expect

expect: does "### UNAUTHORISED ACCESS TO THIS NETWORK DEVICE IS PROHIBITED ###\r\n### You must have explicit permission to access or configure this device. All " (spawn_id exp6) match regular expression "[\r\n]+"? yes
expect: set expect_out(0,string) "\r\n"
expect: set expect_out(spawn_id) "exp6"
expect: set expect_out(buffer) "### UNAUTHORISED ACCESS TO THIS NETWORK DEVICE IS PROHIBITED ###\r\n"
expect: continuing expect

expect: does "### You must have explicit permission to access or configure this device. All " (spawn_id exp6) match regular expression "[\r\n]+"? no
"^(.+[:.])1 ((#| \(enable\)))"? no
"^.+(#| \(enable\))"? yes
expect: set expect_out(0,string) "###"
expect: set expect_out(1,string) "#"
expect: set expect_out(spawn_id) "exp6"
expect: set expect_out(buffer) "###"
tty_raw_noecho: was raw = 0 echo = 1
spawn id exp6 sent < ###\r\n### activities performed on this device may be logged and violations of this ###\r\n### policy may result in disciplinary action and may be reported to law ###\r\n### enforcement agencies. There is no right to privacy on this device. ###\r\n####################################################################################\r\n\r\n MMNM\r\n MMMM\r\n MMNM\r\n MMNNM\r\n MMMM\r\n MMNM\r\n MMMMM\r\n MNMM\r\n MMMMM MMMMM MMMM\r\n MM>
###
### activities performed on this device may be logged and violations of this ###
### policy may result in disciplinary action and may be reported to law ###
### enforcement agencies. There is no right to privacy on this device. ###
####################################################################################

MMNM
MMMM
MMNM
MMNNM
MMMM
MMNM
MMMMM
MNMM
MMMMM MMMMM MMMM
MMspawn id exp6 sent <MM MM MM MMMMM MMMM\r\n MMNM MM MMM NMNMN MMMM\r\n MMMMMMMMMMMMNMM MNM MMM MMMMN MMMMM\r\n MMMMM MMM MMMN MMMM MMMM MMMM\r\n MMMM MMMM MMMM MMMM MNMMMM>
MM MM MM MMMMM MMMM
MMNM MM MMM NMNMN MMMM
MMMMMMMMMMMMNMM MNM MMM MMMMN MMMMM
MMMMM MMM MMMN MMMM MMMM MMMM
MMMM MMMM MMMM MMMM MNMMMMspawn id exp6 sent <MMMM MMM\r\n MMMM NMMM MMMM MMNM MMMMM MMMMMM MMM\r\n MMMNMM MMMM MMMM MNMM MMNMM MMMMMM\r\n MMMMMMMMM MMM MMM MMMMM MMMM\r\n MNMMMMMM MMM MNM MMMMM\r\n MMMM MM MM MMMMM\r\n MNMMM MM M MNMM\r\n MDMM M M NMM\r\n MMMM MMMM\r\n__ __ _ ____ _\r\n\ \ / / | | | _ \ (_)\r\n \ \ / /__ __| | __ _ ___ ___ _ __ ___ | |_) |_ _ ___ _ _ __ ___ ___ ___\r\n \ \/ / _ \ / _` |/ _` |/ __/ _ \| '_ ` _ \ | _ <| | | / __| | '_ \ / _ \/ __/ __|\r\n \ / (_) | (_| | (_| | (_| (_) | | | | | | | |_) | |_| \__ \ | | | | __/\__ \__ \\r\n \/ \___/ \__,_|\__,_|\___\___/|_| |_| |_| |____/ \__,_|___/_|_| |_|\___||___/___/\r\n\r\n#####################################################################################\r\n### Device Hostname ###\r\n### my-ios-xr ###\r\n#####################################################################################\r\n\r\n>
MMMM MMM
MMMM NMMM MMMM MMNM MMMMM MMMMMM MMM
MMMNMM MMMM MMMM MNMM MMNMM MMMMMM
MMMMMMMMM MMM MMM MMMMM MMMM
MNMMMMMM MMM MNM MMMMM
MMMM MM MM MMMMM
MNMMM MM M MNMM
MDMM M M NMM
MMMM MMMM

#####################################################################################
### Device Hostname ###
### my-ios-xr ###
#####################################################################################

spawn id exp6 sent <\r\nUser Access Verification\r\n\r\nUsername: >

User Access Verification

Username: spawn id exp6 sent <\r\n>

spawn id exp6 sent <\r\nUser Access Verification\r\n\r\nUsername: >

User Access Verification

Username: spawn id exp0 sent <d> ----- at this point I sent a couple of d's
spawn id exp0 sent <d>
spawn id exp6 sent <d>
dspawn id exp6 sent <d>
dspawn id exp0 sent <\u001d> ----- and quit the telnet session
spawn id exp6 sent <\r\ntelnet> >

telnet> spawn id exp0 sent <q>
spawn id exp6 sent <q>
qspawn id exp0 sent <u>
spawn id exp6 sent <u>
uspawn id exp0 sent <i>
spawn id exp6 sent <i>
ispawn id exp0 sent <t>
spawn id exp6 sent <t>
tspawn id exp0 sent <\r>
spawn id exp6 sent <\r\nConnection closed.\r\n>

Connection closed.
interact: received eof from spawn_id exp6
write() failed to write anything - will sleep(1) and retry...
tty_set: raw = 0, echo = 1
tty_set: raw = 5, echo = 0
</snip>



-----Original Message-----
From: john heasley [mailto:***@shrubbery.net]
Sent: Thursday, March 25, 2010 10:17 PM
To: Drikus Brits
Cc: Rancid-***@shrubbery.net
Subject: Re: [rancid] rancid issues with IOS XR
Post by Drikus Brits
HI all,
Hope someone can help on this issue.
I seem to be having an issue logging onto IOS XR routers using clogin, or the xrrancid patch as described by previous forums.
the output i get when using -autoenable or configuring the devices in my .cloginrc file returns the same output.
It seems to skip the initial expect sequence for Username: and then returns with another auth reques, after the second prompt the expect script appear to have died, as i can then type in my own authentication details.
User Access Verification
User Access Verification
telnet> quit
you'll have to share the o/p of clogin -d hostname with us.
�This e-mail is sent on the Terms and Conditions that can be accessed by Clicking on this link http://www.vodacom.co.za/legal/email.jsp "
John Jetmore
2010-03-26 12:05:10 UTC
Permalink
This looks similar to a problem we had where the '#' symbols in our
banner were being mistaken for the '#' in the enable prompt and
confusing rancid. One of my colleagues applied this patch before I
was involved in our rancid install:

423a428,435
-re ".+##########.+Verification" {
# Account for the hosed up banner via telnet
exp_continue
}
-re ".+##########.+" {
# Account for the hosed up banner via ssh
exp_continue
}
This may be a silly patch but it's worked for us and I've never had to
reevaluate it. If you used something like this you might have to
change the number of contiguous hashes based on the output you sent.

--John
Hi,
Find below the debug section
<snip>
10.117.144.75
spawn telnet 10.117.144.75
parent: waiting for sync byte
parent: telling child to go ahead
parent: now unsynchronized from child
spawn: returns {24151}
expect: does "" (spawn_id exp6) match regular expression "(Connection refused|Secure connection [^\n\r]+ refused)"? no
"(Connection closed by|Connection to [^\n\r]+ closed)"? no
expect: does "" (spawn_id exp6) match glob pattern "unknown host\r"? no
expect: does "" (spawn_id exp6) match glob pattern "Host is unreachable"? no
"No address associated with name"? no
"(Host key not found |The authenticity of host .* be established).*(yes/no)?"? no
"HOST IDENTIFICATION HAS CHANGED.* (yes/no)?"? no
"Offending key for .* (yes/no)?"? no
"(denied|Sorry)"? no
"Login failed"? no
"% (Bad passwords|Authentication failed)"? no
"Press any key to continue"? no
"Enter Selection: "? no
"Last login:"? no
"(Username|Login|login|user name|User):"? no
"([Pp]assword|passwd):"? no
"(#| \(enable\))"? no
"Login invalid"? no
Trying 10.117.144.75...
expect: does "Trying 10.117.144.75...\r\n" (spawn_id exp6) match regular expression "(Connection refused|Secure connection [^\n\r]+ refused)"? no
"(Connection closed by|Connection to [^\n\r]+ closed)"? no
expect: does "Trying 10.117.144.75...\r\n" (spawn_id exp6) match glob pattern "unknown host\r"? no
expect: does "Trying 10.117.144.75...\r\n" (spawn_id exp6) match glob pattern "Host is unreachable"? no
"No address associated with name"? no
"(Host key not found |The authenticity of host .* be established).*(yes/no)?"? no
"HOST IDENTIFICATION HAS CHANGED.* (yes/no)?"? no
"Offending key for .* (yes/no)?"? no
"(denied|Sorry)"? no
"Login failed"? no
"% (Bad passwords|Authentication failed)"? no
"Press any key to continue"? no
"Enter Selection: "? no
"Last login:"? no
"(Username|Login|login|user name|User):"? no
"([Pp]assword|passwd):"? no
"(#| \(enable\))"? no
"Login invalid"? no
Connected to 10.117.144.75.
Escape character is '^]'.
expect: does "Trying 10.117.144.75...\r\nConnected to 10.117.144.75.\r\nEscape character is '^]'.\r\n" (spawn_id exp6) match regular expression "(Connection refused|Secure connection [^\n\r]+ refused)"? no
"(Connection closed by|Connection to [^\n\r]+ closed)"? no
expect: does "Trying 10.117.144.75...\r\nConnected to 10.117.144.75.\r\nEscape character is '^]'.\r\n" (spawn_id exp6) match glob pattern "unknown host\r"? no
expect: does "Trying 10.117.144.75...\r\nConnected to 10.117.144.75.\r\nEscape character is '^]'.\r\n" (spawn_id exp6) match glob pattern "Host is unreachable"? no
"No address associated with name"? no
"(Host key not found |The authenticity of host .* be established).*(yes/no)?"? no
"HOST IDENTIFICATION HAS CHANGED.* (yes/no)?"? no
"Offending key for .* (yes/no)?"? no
"(denied|Sorry)"? no
"Login failed"? no
"% (Bad passwords|Authentication failed)"? no
"Press any key to continue"? no
"Enter Selection: "? no
"Last login:"? no
"(Username|Login|login|user name|User):"? no
"([Pp]assword|passwd):"? no
"(#| \(enable\))"? no
"Login invalid"? no
expect: does "Trying 10.117.144.75...\r\nConnected to 10.117.144.75.\r\nEscape character is '^]'.\r\n\r\n" (spawn_id exp6) match regular expression "(Connection refused|Secure connection [^\n\r]+ refused)"? no
"(Connection closed by|Connection to [^\n\r]+ closed)"? no
expect: does "Trying 10.117.144.75...\r\nConnected to 10.117.144.75.\r\nEscape character is '^]'.\r\n\r\n" (spawn_id exp6) match glob pattern "unknown host\r"? no
expect: does "Trying 10.117.144.75...\r\nConnected to 10.117.144.75.\r\nEscape character is '^]'.\r\n\r\n" (spawn_id exp6) match glob pattern "Host is unreachable"? no
"No address associated with name"? no
"(Host key not found |The authenticity of host .* be established).*(yes/no)?"? no
"HOST IDENTIFICATION HAS CHANGED.* (yes/no)?"? no
"Offending key for .* (yes/no)?"? no
"(denied|Sorry)"? no
"Login failed"? no
"% (Bad passwords|Authentication failed)"? no
"Press any key to continue"? no
"Enter Selection: "? no
"Last login:"? no
"(Username|Login|login|user name|User):"? no
"([Pp]assword|passwd):"? no
"(#| \(enable\))"? no
"Login invalid"? no
CCC
####################################################################################
###            UNAUTHORISED ACCESS TO THIS NETWORK DEVICE IS PROHIBITED          ###
### You must have explicit permission to access or configure this device. All
expect: does "Trying 10.117.144.75...\r\nConnected to 10.117.144.75.\r\nEscape character is '^]'.\r\n\r\nCCC\r\n####################################################################################\r\n###            UNAUTHORISED ACCESS TO THIS NETWORK DEVICE IS PROHIBITED          ###\r\n### You must have explicit permission to access or configure this device. All  " (spawn_id exp6) match regular expression "(Connection refused|Secure connection [^\n\r]+ refused)"? no
"(Connection closed by|Connection to [^\n\r]+ closed)"? no
expect: does "Trying 10.117.144.75...\r\nConnected to 10.117.144.75.\r\nEscape character is '^]'.\r\n\r\nCCC\r\n####################################################################################\r\n###            UNAUTHORISED ACCESS TO THIS NETWORK DEVICE IS PROHIBITED          ###\r\n### You must have explicit permission to access or configure this device. All  " (spawn_id exp6) match glob pattern "unknown host\r"? no
expect: does "Trying 10.117.144.75...\r\nConnected to 10.117.144.75.\r\nEscape character is '^]'.\r\n\r\nCCC\r\n####################################################################################\r\n###            UNAUTHORISED ACCESS TO THIS NETWORK DEVICE IS PROHIBITED          ###\r\n### You must have explicit permission to access or configure this device. All  " (spawn_id exp6) match glob pattern "Host is unreachable"? no
"No address associated with name"? no
"(Host key not found |The authenticity of host .* be established).*(yes/no)?"? no
"HOST IDENTIFICATION HAS CHANGED.* (yes/no)?"? no
"Offending key for .* (yes/no)?"? no
"(denied|Sorry)"? no
"Login failed"? no
"% (Bad passwords|Authentication failed)"? no
"Press any key to continue"? no
"Enter Selection: "? no
"Last login:"? no
"(Username|Login|login|user name|User):"? no
"([Pp]assword|passwd):"? no
"(#| \(enable\))"? yes
expect: set expect_out(0,string) "#"
expect: set expect_out(1,string) "#"
expect: set expect_out(spawn_id) "exp6"
expect: set expect_out(buffer) "Trying 10.117.144.75...\r\nConnected to 10.117.144.75.\r\nEscape character is '^]'.\r\n\r\nCCC\r\n#"
send: sending "\r" to { exp6 }
expect: does "###################################################################################\r\n###            UNAUTHORISED ACCESS TO THIS NETWORK DEVICE IS PROHIBITED          ###\r\n### You must have explicit permission to access or configure this device. All  " (spawn_id exp6) match regular expression "[\r\n]+"? yes
expect: set expect_out(0,string) "\r\n"
expect: set expect_out(spawn_id) "exp6"
expect: set expect_out(buffer) "###################################################################################\r\n"
expect: continuing expect
expect: does "###            UNAUTHORISED ACCESS TO THIS NETWORK DEVICE IS PROHIBITED          ###\r\n### You must have explicit permission to access or configure this device. All  " (spawn_id exp6) match regular expression "[\r\n]+"? yes
expect: set expect_out(0,string) "\r\n"
expect: set expect_out(spawn_id) "exp6"
expect: set expect_out(buffer) "###            UNAUTHORISED ACCESS TO THIS NETWORK DEVICE IS PROHIBITED          ###\r\n"
expect: continuing expect
expect: does "### You must have explicit permission to access or configure this device. All  " (spawn_id exp6) match regular expression "[\r\n]+"? no
"^(.+[:.])1 ((#| \(enable\)))"? no
"^.+(#| \(enable\))"? yes
expect: set expect_out(0,string) "###"
expect: set expect_out(1,string) "#"
expect: set expect_out(spawn_id) "exp6"
expect: set expect_out(buffer) "###"
tty_raw_noecho: was raw = 0  echo = 1
spawn id exp6 sent <  ###\r\n### activities performed on this device may be logged and violations of this     ###\r\n### policy may result in disciplinary action and may be reported to law          ###\r\n### enforcement agencies. There is no right to privacy on this device.           ###\r\n####################################################################################\r\n\r\n                        MMNM\r\n                           MMMM\r\n                               MMNM\r\n                                 MMNNM\r\n                                     MMMM\r\n                                       MMNM\r\n                                          MMMMM\r\n                                             MNMM\r\n                                  MMMMM MMMMM  MMMM\r\n                                MM>
 ###
### activities performed on this device may be logged and violations of this     ###
### policy may result in disciplinary action and may be reported to law          ###
### enforcement agencies. There is no right to privacy on this device.           ###
####################################################################################
                       MMNM
                          MMMM
                              MMNM
                                MMNNM
                                    MMMM
                                      MMNM
                                         MMMMM
                                            MNMM
                                 MMMMM MMMMM  MMMM
                               MMspawn id exp6 sent <MM MM MM MMMMM  MMMM\r\n                               MMNM  MM MMM  NMNMN  MMMM\r\n                   MMMMMMMMMMMMNMM  MNM MMM   MMMMN   MMMMM\r\n                 MMMMM        MMM  MMMN  MMMM  MMMM     MMMM\r\n                 MMMM        MMMM  MMMM  MMMM  MNMMMM>
MM MM MM MMMMM  MMMM
                              MMNM  MM MMM  NMNMN  MMMM
                  MMMMMMMMMMMMNMM  MNM MMM   MMMMN   MMMMM
                MMMMM        MMM  MMMN  MMMM  MMMM     MMMM
                MMMM        MMMM  MMMM  MMMM  MNMMMMspawn id exp6 sent <MMMM   MMM\r\n                   MMMM      NMMM  MMMM  MMNM  MMMMM   MMMMMM MMM\r\n                    MMMNMM   MMMM  MMMM  MNMM  MMNMM         MMMMMM\r\n                        MMMMMMMMM   MMM  MMM  MMMMM              MMMM\r\n                          MNMMMMMM  MMM  MNM  MMMMM\r\n                             MMMM    MM  MM  MMMMM\r\n                               MNMMM MM  M  MNMM\r\n                                 MDMM M  M NMM\r\n                                   MMMM  MMMM\r\n__      __       _                             ____            _\r\n\ \    / /      | |                           |  _ \          (_)\r\n \ \  / /__   __| | __ _  ___ ___  _ __ ___   | |_) |_   _ ___ _ _ __   ___  ___ ___\r\n  \ \/ / _ \ / _` |/ _` |/ __/ _ \| '_ ` _ \  |  _ <| | | / __| | '_ \ / _ \/ __/ __|\r\n   \  / (_) | (_| | (_| | (_| (_) | | | | | | | |_) | |_| \__ \ | | | |  __/\__ \__ \\r\n    \/ \___/ \__,_|\__,_|\___\___/|_| |_| |_| |____/ \__,_|___/_|_| |_|\___||___/___/\r\n\r\n#####################################################################################\r\n###                               Device Hostname                                 ###\r\n###                                  my-ios-xr                                    ###\r\n#####################################################################################\r\n\r\n>
MMMM   MMM
                  MMMM      NMMM  MMMM  MMNM  MMMMM   MMMMMM MMM
                   MMMNMM   MMMM  MMMM  MNMM  MMNMM         MMMMMM
                       MMMMMMMMM   MMM  MMM  MMMMM              MMMM
                         MNMMMMMM  MMM  MNM  MMMMM
                            MMMM    MM  MM  MMMMM
                              MNMMM MM  M  MNMM
                                MDMM M  M NMM
                                  MMMM  MMMM
#####################################################################################
###                               Device Hostname                                 ###
###                                  my-ios-xr                                    ###
#####################################################################################
spawn id exp6 sent <\r\nUser Access Verification\r\n\r\nUsername: >
User Access Verification
Username: spawn id exp6 sent <\r\n>
spawn id exp6 sent <\r\nUser Access Verification\r\n\r\nUsername: >
User Access Verification
Username: spawn id exp0 sent <d>                   ----- at this point I sent a couple of d's
spawn id exp0 sent <d>
spawn id exp6 sent <d>
dspawn id exp6 sent <d>
dspawn id exp0 sent <\u001d>                       ----- and quit the telnet session
spawn id exp6 sent <\r\ntelnet> >
telnet> spawn id exp0 sent <q>
spawn id exp6 sent <q>
qspawn id exp0 sent <u>
spawn id exp6 sent <u>
uspawn id exp0 sent <i>
spawn id exp6 sent <i>
ispawn id exp0 sent <t>
spawn id exp6 sent <t>
tspawn id exp0 sent <\r>
spawn id exp6 sent <\r\nConnection closed.\r\n>
Connection closed.
interact: received eof from spawn_id exp6
write() failed to write anything - will sleep(1) and retry...
                                                            tty_set: raw = 0, echo = 1
tty_set: raw = 5, echo = 0
</snip>
-----Original Message-----
Sent: Thursday, March 25, 2010 10:17 PM
To: Drikus Brits
Subject: Re: [rancid] rancid issues with IOS XR
Post by Drikus Brits
HI all,
Hope someone can help on this issue.
I seem to be having an issue logging onto IOS XR routers using clogin, or the xrrancid patch as described by previous forums.
the output i get when using -autoenable or configuring the devices in my .cloginrc file returns the same output.
It seems to skip the initial expect sequence for Username: and then returns with another auth reques, after the second prompt the expect script appear to have died, as i can then type in my own authentication details.
User Access Verification
User Access Verification
telnet> quit
you'll have to share the o/p of clogin -d hostname with us.
“This e-mail is sent on the Terms and Conditions that can be accessed by Clicking on this link http://www.vodacom.co.za/legal/email.jsp "
_______________________________________________
Rancid-discuss mailing list
http://www.shrubbery.net/mailman/listinfo.cgi/rancid-discuss
john heasley
2010-03-27 01:14:38 UTC
Permalink
Post by John Jetmore
This looks similar to a problem we had where the '#' symbols in our
banner were being mistaken for the '#' in the enable prompt and
confusing rancid. One of my colleagues applied this patch before I
423a428,435
-re ".+##########.+Verification" {
# Account for the hosed up banner via telnet
exp_continue
}
-re ".+##########.+" {
# Account for the hosed up banner via ssh
exp_continue
}
This may be a silly patch but it's worked for us and I've never had to
reevaluate it. If you used something like this you might have to
change the number of contiguous hashes based on the output you sent.
nothing comes to mind thats universal. i thought
# Default prompt.
set prompt "(>|[^#]#| \\(enable\\))"
but that doesnt cover all cases. sorry, just dont use # or > in the
banner; ! perhaps.
john heasley
2010-03-26 17:44:25 UTC
Permalink
Post by Drikus Brits
####################################################################################
remove the #s from the banner.
Drikus Brits
2010-03-26 18:18:22 UTC
Permalink
-----Original Message-----
From: john heasley [mailto:***@shrubbery.net]
Sent: Friday, March 26, 2010 7:44 PM
To: Drikus Brits
Cc: john heasley; Rancid-***@shrubbery.net
Subject: Re: [rancid] rancid issues with IOS XR
Post by Drikus Brits
####################################################################################
remove the #s from the banner.


--------------------------------------

Removing the hashes's seems to work, however , the exact same banner exists on all other IOS routers & switches without issues. It's just with IOS XR routers that I have, that it appears to break



�This e-mail is sent on the Terms and Conditions that can be accessed by Clicking on this link http://www.vodacom.co.za/legal/email.jsp "
john heasley
2010-03-26 18:32:58 UTC
Permalink
Post by Drikus Brits
-----Original Message-----
Sent: Friday, March 26, 2010 7:44 PM
To: Drikus Brits
Subject: Re: [rancid] rancid issues with IOS XR
Post by Drikus Brits
####################################################################################
remove the #s from the banner.
--------------------------------------
Removing the hashes's seems to work, however , the exact same banner exists on all other IOS routers & switches without issues. It's just with IOS XR routers that I have, that it appears to break
i presume that the IOS routers are not auto-enabling, but the XR is.
Drikus Brits
2010-03-29 05:18:42 UTC
Permalink
-----Original Message-----
From: john heasley [mailto:***@shrubbery.net]
Sent: Friday, March 26, 2010 8:33 PM
To: Drikus Brits
Cc: john heasley; Rancid-***@shrubbery.net
Subject: Re: [rancid] rancid issues with IOS XR
Post by Drikus Brits
-----Original Message-----
Sent: Friday, March 26, 2010 7:44 PM
To: Drikus Brits
Subject: Re: [rancid] rancid issues with IOS XR
Post by Drikus Brits
####################################################################################
remove the #s from the banner.
--------------------------------------
Removing the hashes's seems to work, however , the exact same banner exists on all other IOS routers & switches without issues. It's just with IOS XR routers that I have, that it appears to break
i presume that the IOS routers are not auto-enabling, but the XR is.


-----------------------------------

That would be correct, the IOS routers are not auto=enabling. Removing the #'s from my banner works , but would mean that I would need to update at least 200+ core routers to have a set standard across all routers, or go with a slight difference on my IOS XR routers.

d.
�This e-mail is sent on the Terms and Conditions that can be accessed by Clicking on this link http://www.vodacom.co.za/legal/email.jsp "
Per Carlson
2010-03-29 08:26:16 UTC
Permalink
Hi.
Post by Drikus Brits
That would be correct, the IOS routers are not auto=enabling. Removing the #'s from my banner works , but would mean that I would need to update at least 200+ core routers to have a set standard across all routers, or go with a slight difference on my IOS XR routers.
As clogin works today, '#' in a login banner together with -autoenable
won't work.

You are not totally out of luck though: you can easily change the
login banner on the IOS-devices with clogin :-)
--
Pelle

A: Because it messes up the order in which people normally read text.
Q: Why is top-posting such a bad thing?
A: Top-posting.
Q: What is the most annoying thing in e-mail?
john heasley
2010-03-29 16:35:44 UTC
Permalink
Post by Drikus Brits
That would be correct, the IOS routers are not auto=enabling. Removing the #'s from my banner works , but would mean that I would need to update at least 200+ core routers to have a set standard across all routers, or go with a slight difference on my IOS XR routers.
you can use clogin to modify the ones where clogin works and if you hack
clogin for the time being as the other user suggested you can modify all
of them.

Loading...