[rancid] Alulogin for Alcatel 7750 SR-7

matthieu flye mcmyst at hotmail.fr
Fri Feb 21 11:19:04 UTC 2014


Hello,
In my office we have 8 Alcatel 7750 SR-7.Rancid is doing well backing up the configuration.
We use alulogin/alurancid from this website to do the work:https://code.google.com/p/alurancid/source/browse/alulogin
I would like to use alulogin to send multiple command in order to do some automatic provisioning like:./alulogin -f .cloginrc -c ‘configure; service; bla; bla; bla;’ 
But it hangs after sending the first command:expect alulogin -f /var/lib/rancid/.cloginrc -c "configure;service" 10.0.0.110.0.0.1spawn ssh -c 3des -x -l root 10.0.0.1 Network Device Restricted accessroot at 10.0.0.1's password: 
A:RTR_08_0001# A:RTR_08_0001# environment no more A:RTR_08_0001#  configure 
But whenever I stay out of the « configure » mode, I can run multiple commands like:-c "admin display-config;admin save;admin display-config;"
When I enter in configure mode, the prompt change in:A:RTR_08_0001# configure A:RTR_08_0001>config# 
Here is the debug output when trying to enter in configure mode.
Basically it should be the same on every Alcatel router with SR-OS.
Regards
expect -d alulogin -f /var/lib/rancid/.cloginrc -c "configure;service" 10.0.0.1 expect version 5.44.1.14argv[0] = expect  argv[1] = -d  argv[2] = alulogin  argv[3] = -f  argv[4] = /var/lib/rancid/.cloginrc  argv[5] = -c  argv[6] = configure;service  argv[7] = 10.0.0.1  set argc 5set argv0 "alulogin"set argv "-f /var/lib/rancid/.cloginrc -c {configure;service} 10.0.0.1"executing commands from command file aluloginparent: waiting for sync byteparent: telling child to go aheadparent: now unsynchronized from childspawn: returns {27774}Gate keeper glob pattern for '(Connection refused|Secure connection [^]+ refused)' is ''. Not usable, disabling the performance booster.Gate keeper glob pattern for '(Connection closed by|Connection to [^]+ closed)' is ''. Not usable, disabling the performance booster.Gate keeper glob pattern for '(Host key not found |The authenticity of host .* be established).*(yes/no)?' is ''. Not usable, disabling the performance booster.Gate keeper glob pattern for 'HOST IDENTIFICATION HAS CHANGED.* (yes/no)?' is 'HOST IDENTIFICATION HAS CHANGED* *'. Activating booster.Gate keeper glob pattern for 'Offending key for .* (yes/no)?' is 'Offending key for * *'. Activating booster.Gate keeper glob pattern for '(denied|Sorry)' is ''. Not usable, disabling the performance booster.Gate keeper glob pattern for '% (Bad passwords|Authentication failed)' is ''. Not usable, disabling the performance booster.Gate keeper glob pattern for 'Enter Selection: ' is 'Enter Selection: '. Activating booster.Gate keeper glob pattern for 'Last login:' is 'Last login:'. Activating booster.Gate keeper glob pattern for '@[^]+ ([Pp]assword|passwd):|Mot de passe:' is ''. Not usable, disabling the performance booster.Gate keeper glob pattern for '(Username|Login|login|user name|User):' is ''. Not usable, disabling the performance booster.Gate keeper glob pattern for '([Pp]assword|passwd):|Mot de passe:' is ''. Not usable, disabling the performance booster.Gate keeper glob pattern for '(#| \(enable\))' is ''. Not usable, disabling the performance booster.
expect: does "" (spawn_id exp6) match regular expression "(Connection refused|Secure connection [^\n\r]+ refused)"? (No Gate, RE only) gate=yes re=no"(Connection closed by|Connection to [^\n\r]+ closed)"? (No Gate, RE only) gate=yes re=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 Gate, RE only) gate=yes re=no"HOST IDENTIFICATION HAS CHANGED.* (yes/no)?"? Gate "HOST IDENTIFICATION HAS CHANGED* *"? gate=no"Offending key for .* (yes/no)?"? Gate "Offending key for * *"? gate=no"(denied|Sorry)"? (No Gate, RE only) gate=yes re=no"Login failed"? no"% (Bad passwords|Authentication failed)"? (No Gate, RE only) gate=yes re=no"Press any key to continue"? no"Enter Selection: "? Gate "Enter Selection: "? gate=no"Last login:"? Gate "Last login:"? gate=no"@[^\r\n]+ ([Pp]assword|passwd):|Mot de passe:"? (No Gate, RE only) gate=yes re=no"(Username|Login|login|user name|User):"? (No Gate, RE only) gate=yes re=no"([Pp]assword|passwd):|Mot de passe:"? (No Gate, RE only) gate=yes re=no"(#| \(enable\))"? (No Gate, RE only) gate=yes re=no"Login invalid"? no
expect: does " Network Device Restricted access\r\r\nroot at 10.0.0.1's password: " (spawn_id exp6) match regular expression "(Connection refused|Secure connection [^\n\r]+ refused)"? (No Gate, RE only) gate=yes re=no"(Connection closed by|Connection to [^\n\r]+ closed)"? (No Gate, RE only) gate=yes re=no
expect: does " Network Device Restricted access\r\r\nroot at 10.0.0.1's password: " (spawn_id exp6) match glob pattern "unknown host\r"? no
expect: does " Network Device Restricted access\r\r\nroot at 10.0.0.1's password: " (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 Gate, RE only) gate=yes re=no"HOST IDENTIFICATION HAS CHANGED.* (yes/no)?"? Gate "HOST IDENTIFICATION HAS CHANGED* *"? gate=no"Offending key for .* (yes/no)?"? Gate "Offending key for * *"? gate=no"(denied|Sorry)"? (No Gate, RE only) gate=yes re=no"Login failed"? no"% (Bad passwords|Authentication failed)"? (No Gate, RE only) gate=yes re=no"Press any key to continue"? no"Enter Selection: "? Gate "Enter Selection: "? gate=no"Last login:"? Gate "Last login:"? gate=no"@[^\r\n]+ ([Pp]assword|passwd):|Mot de passe:"? (No Gate, RE only) gate=yes re=yesexpect: set expect_out(0,string) "@10.0.0.1's password:"expect: set expect_out(1,string) "password"expect: set expect_out(spawn_id) "exp6"expect: set expect_out(buffer) " Network Device Restricted access\r\r\nroot at 10.0.0.1's password:"send: sending « pwd\r » to { exp6 }expect: continuing expect
expect: does " " (spawn_id exp6) match regular expression "(Connection refused|Secure connection [^\n\r]+ refused)"? (No Gate, RE only) gate=yes re=no"(Connection closed by|Connection to [^\n\r]+ closed)"? (No Gate, RE only) gate=yes re=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 Gate, RE only) gate=yes re=no"HOST IDENTIFICATION HAS CHANGED.* (yes/no)?"? Gate "HOST IDENTIFICATION HAS CHANGED* *"? gate=no"Offending key for .* (yes/no)?"? Gate "Offending key for * *"? gate=no"(denied|Sorry)"? (No Gate, RE only) gate=yes re=no"Login failed"? no"% (Bad passwords|Authentication failed)"? (No Gate, RE only) gate=yes re=no"Press any key to continue"? no"Enter Selection: "? Gate "Enter Selection: "? gate=no"Last login:"? Gate "Last login:"? gate=no"@[^\r\n]+ ([Pp]assword|passwd):|Mot de passe:"? (No Gate, RE only) gate=yes re=no"(Username|Login|login|user name|User):"? (No Gate, RE only) gate=yes re=no"([Pp]assword|passwd):|Mot de passe:"? (No Gate, RE only) gate=yes re=no"(#| \(enable\))"? (No Gate, RE only) gate=yes re=no"Login invalid"? no
expect: does " \r\n" (spawn_id exp6) match regular expression "(Connection refused|Secure connection [^\n\r]+ refused)"? (No Gate, RE only) gate=yes re=no"(Connection closed by|Connection to [^\n\r]+ closed)"? (No Gate, RE only) gate=yes re=no
expect: does " \r\n" (spawn_id exp6) match glob pattern "unknown host\r"? no
expect: does " \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 Gate, RE only) gate=yes re=no"HOST IDENTIFICATION HAS CHANGED.* (yes/no)?"? Gate "HOST IDENTIFICATION HAS CHANGED* *"? gate=no"Offending key for .* (yes/no)?"? Gate "Offending key for * *"? gate=no"(denied|Sorry)"? (No Gate, RE only) gate=yes re=no"Login failed"? no"% (Bad passwords|Authentication failed)"? (No Gate, RE only) gate=yes re=no"Press any key to continue"? no"Enter Selection: "? Gate "Enter Selection: "? gate=no"Last login:"? Gate "Last login:"? gate=no"@[^\r\n]+ ([Pp]assword|passwd):|Mot de passe:"? (No Gate, RE only) gate=yes re=no"(Username|Login|login|user name|User):"? (No Gate, RE only) gate=yes re=no"([Pp]assword|passwd):|Mot de passe:"? (No Gate, RE only) gate=yes re=no"(#| \(enable\))"? (No Gate, RE only) gate=yes re=no"Login invalid"? no
expect: does " \r\n\r\n" (spawn_id exp6) match regular expression "(Connection refused|Secure connection [^\n\r]+ refused)"? (No Gate, RE only) gate=yes re=no"(Connection closed by|Connection to [^\n\r]+ closed)"? (No Gate, RE only) gate=yes re=no
expect: does " \r\n\r\n" (spawn_id exp6) match glob pattern "unknown host\r"? no
expect: does " \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 Gate, RE only) gate=yes re=no"HOST IDENTIFICATION HAS CHANGED.* (yes/no)?"? Gate "HOST IDENTIFICATION HAS CHANGED* *"? gate=no"Offending key for .* (yes/no)?"? Gate "Offending key for * *"? gate=no"(denied|Sorry)"? (No Gate, RE only) gate=yes re=no"Login failed"? no"% (Bad passwords|Authentication failed)"? (No Gate, RE only) gate=yes re=no"Press any key to continue"? no"Enter Selection: "? Gate "Enter Selection: "? gate=no"Last login:"? Gate "Last login:"? gate=no"@[^\r\n]+ ([Pp]assword|passwd):|Mot de passe:"? (No Gate, RE only) gate=yes re=no"(Username|Login|login|user name|User):"? (No Gate, RE only) gate=yes re=no"([Pp]assword|passwd):|Mot de passe:"? (No Gate, RE only) gate=yes re=no"(#| \(enable\))"? (No Gate, RE only) gate=yes re=no"Login invalid"? no
expect: does " \r\n\r\n\r\n" (spawn_id exp6) match regular expression "(Connection refused|Secure connection [^\n\r]+ refused)"? (No Gate, RE only) gate=yes re=no"(Connection closed by|Connection to [^\n\r]+ closed)"? (No Gate, RE only) gate=yes re=no
expect: does " \r\n\r\n\r\n" (spawn_id exp6) match glob pattern "unknown host\r"? no
expect: does " \r\n\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 Gate, RE only) gate=yes re=no"HOST IDENTIFICATION HAS CHANGED.* (yes/no)?"? Gate "HOST IDENTIFICATION HAS CHANGED* *"? gate=no"Offending key for .* (yes/no)?"? Gate "Offending key for * *"? gate=no"(denied|Sorry)"? (No Gate, RE only) gate=yes re=no"Login failed"? no"% (Bad passwords|Authentication failed)"? (No Gate, RE only) gate=yes re=no"Press any key to continue"? no"Enter Selection: "? Gate "Enter Selection: "? gate=no"Last login:"? Gate "Last login:"? gate=no"@[^\r\n]+ ([Pp]assword|passwd):|Mot de passe:"? (No Gate, RE only) gate=yes re=no"(Username|Login|login|user name|User):"? (No Gate, RE only) gate=yes re=no"([Pp]assword|passwd):|Mot de passe:"? (No Gate, RE only) gate=yes re=no"(#| \(enable\))"? (No Gate, RE only) gate=yes re=no"Login invalid"? no
expect: does " \r\n\r\n\r\nA:RTR_08_0001# " (spawn_id exp6) match regular expression "(Connection refused|Secure connection [^\n\r]+ refused)"? (No Gate, RE only) gate=yes re=no"(Connection closed by|Connection to [^\n\r]+ closed)"? (No Gate, RE only) gate=yes re=no
expect: does " \r\n\r\n\r\nA:RTR_08_0001# " (spawn_id exp6) match glob pattern "unknown host\r"? no
expect: does " \r\n\r\n\r\nA:RTR_08_0001# " (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 Gate, RE only) gate=yes re=no"HOST IDENTIFICATION HAS CHANGED.* (yes/no)?"? Gate "HOST IDENTIFICATION HAS CHANGED* *"? gate=no"Offending key for .* (yes/no)?"? Gate "Offending key for * *"? gate=no"(denied|Sorry)"? (No Gate, RE only) gate=yes re=no"Login failed"? no"% (Bad passwords|Authentication failed)"? (No Gate, RE only) gate=yes re=no"Press any key to continue"? no"Enter Selection: "? Gate "Enter Selection: "? gate=no"Last login:"? Gate "Last login:"? gate=no"@[^\r\n]+ ([Pp]assword|passwd):|Mot de passe:"? (No Gate, RE only) gate=yes re=no"(Username|Login|login|user name|User):"? (No Gate, RE only) gate=yes re=no"([Pp]assword|passwd):|Mot de passe:"? (No Gate, RE only) gate=yes re=no"(#| \(enable\))"? (No Gate, RE only) gate=yes re=yesexpect: set expect_out(0,string) "#"expect: set expect_out(1,string) "#"expect: set expect_out(spawn_id) "exp6"expect: set expect_out(buffer) " \r\n\r\n\r\nA:RTR_08_0001#"send: sending "\r" to { exp6 }Gate keeper glob pattern for '[]+' is ''. Not usable, disabling the performance booster.Gate keeper glob pattern for '^.+(#| \(enable\))' is ''. Not usable, disabling the performance booster.
expect: does " " (spawn_id exp6) match regular expression "[\r\n]+"? (No Gate, RE only) gate=yes re=no"^.+(#| \(enable\))"? (No Gate, RE only) gate=yes re=no
expect: does " \r\n" (spawn_id exp6) match regular expression "[\r\n]+"? (No Gate, RE only) gate=yes re=yesexpect: 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 "" (spawn_id exp6) match regular expression "[\r\n]+"? (No Gate, RE only) gate=yes re=no"^.+(#| \(enable\))"? (No Gate, RE only) gate=yes re=no
expect: does "A:RTR_08_0001# " (spawn_id exp6) match regular expression "[\r\n]+"? (No Gate, RE only) gate=yes re=no"^.+(#| \(enable\))"? (No Gate, RE only) gate=yes re=yesexpect: set expect_out(0,string) "A:RTR_08_0001#"expect: set expect_out(1,string) "#"expect: set expect_out(spawn_id) "exp6"expect: set expect_out(buffer) "A:RTR_08_0001#"send: sending "environment no more\r" to { exp6 }Gate keeper glob pattern for 'A\:RTR_08_0001#' is 'A:RTR_08_0001#'. Activating booster.
expect: does " " (spawn_id exp6) match regular expression "A\:RTR_08_0001#"? Gate "A:RTR_08_0001#"? gate=no
expect: does " environmen" (spawn_id exp6) match regular expression "A\:RTR_08_0001#"? Gate "A:RTR_08_0001#"? gate=no
expect: does " environment no more \r\n" (spawn_id exp6) match regular expression "A\:RTR_08_0001#"? Gate "A:RTR_08_0001#"? gate=no
expect: does " environment no more \r\nA:RTR_08_0001# " (spawn_id exp6) match regular expression "A\:RTR_08_0001#"? Gate "A:RTR_08_0001#"? gate=yes re=yesexpect: set expect_out(0,string) "A:RTR_08_0001#"expect: set expect_out(spawn_id) "exp6"expect: set expect_out(buffer) " environment no more \r\nA:RTR_08_0001#"send: sending "configure\r" to { exp6 }Gate keeper glob pattern for +' is ''. Not usable, disabling the performance booster.Gate keeper glob pattern for '^[^ *]*A\:RTR_08_0001#' is '*A:RTR_08_0001#'. Activating booster.Gate keeper glob pattern for '^[^]*A\:RTR_08_0001#.' is '*A:RTR_08_0001#?'. Activating booster.Gate keeper glob pattern for '^--More--[]+' is '--More--*'. Activating booster.Gate keeper glob pattern for '[]+' is ''. Not usable, disabling the performance booster.Gate keeper glob pattern for '[^]*Press <SPACE> to cont[^]*' is '*Press <SPACE> to cont*'. Activating booster.Gate keeper glob pattern for 'Press any key to continue (Q to quit)[^]*' is 'Press any key to continue Q to quit*'. Activating booster.Gate keeper glob pattern for '^ *--More--[^]*' is '*--More--*'. Activating booster.Gate keeper glob pattern for '^<-+ More -+>[^]*' is '<* More *>*'. Activating booster.
expect: does " " (spawn_id exp6) match regular expression "\u0008+"? (No Gate, RE only) gate=yes re=no"^[^\n\r *]*A\:RTR_08_0001#"? Gate "*A:RTR_08_0001#"? gate=no"^[^\n\r]*A\:RTR_08_0001#."? Gate "*A:RTR_08_0001#?"? gate=no"^--More--[\r\n]+"? Gate "--More--*"? gate=no"[\n\r]+"? (No Gate, RE only) gate=yes re=no"[^\r\n]*Press <SPACE> to cont[^\r\n]*"? Gate "*Press <SPACE> to cont*"? gate=no"Press any key to continue (Q to quit)[^\r\n]*"? Gate "Press any key to continue Q to quit*"? gate=no"^ *--More--[^\n\r]*"? Gate "*--More--*"? gate=no"^<-+ More -+>[^\n\r]*"? Gate "<* More *>*"? gate=no
expect: does " configure" (spawn_id exp6) match regular expression "\u0008+"? (No Gate, RE only) gate=yes re=no"^[^\n\r *]*A\:RTR_08_0001#"? Gate "*A:RTR_08_0001#"? gate=no"^[^\n\r]*A\:RTR_08_0001#."? Gate "*A:RTR_08_0001#?"? gate=no"^--More--[\r\n]+"? Gate "--More--*"? gate=no"[\n\r]+"? (No Gate, RE only) gate=yes re=no"[^\r\n]*Press <SPACE> to cont[^\r\n]*"? Gate "*Press <SPACE> to cont*"? gate=no"Press any key to continue (Q to quit)[^\r\n]*"? Gate "Press any key to continue Q to quit*"? gate=no"^ *--More--[^\n\r]*"? Gate "*--More--*"? gate=no"^<-+ More -+>[^\n\r]*"? Gate "<* More *>*"? gate=no
expect: does " configure \r\n" (spawn_id exp6) match regular expression "\u0008+"? (No Gate, RE only) gate=yes re=no"^[^\n\r *]*A\:RTR_08_0001#"? Gate "*A:RTR_08_0001#"? gate=no"^[^\n\r]*A\:RTR_08_0001#."? Gate "*A:RTR_08_0001#?"? gate=no"^--More--[\r\n]+"? Gate "--More--*"? gate=no"[\n\r]+"? (No Gate, RE only) gate=yes re=yesexpect: set expect_out(0,string) "\r\n"expect: set expect_out(spawn_id) "exp6"expect: set expect_out(buffer) " configure \r\n"expect: continuing expect
expect: does "" (spawn_id exp6) match regular expression "\u0008+"? (No Gate, RE only) gate=yes re=no"^[^\n\r *]*A\:RTR_08_0001#"? Gate "*A:RTR_08_0001#"? gate=no"^[^\n\r]*A\:RTR_08_0001#."? Gate "*A:RTR_08_0001#?"? gate=no"^--More--[\r\n]+"? Gate "--More--*"? gate=no"[\n\r]+"? (No Gate, RE only) gate=yes re=no"[^\r\n]*Press <SPACE> to cont[^\r\n]*"? Gate "*Press <SPACE> to cont*"? gate=no"Press any key to continue (Q to quit)[^\r\n]*"? Gate "Press any key to continue Q to quit*"? gate=no"^ *--More--[^\n\r]*"? Gate "*--More--*"? gate=no"^<-+ More -+>[^\n\r]*"? Gate "<* More *>*"? gate=no
expect: does "A:RTR_08_0001>config# " (spawn_id exp6) match regular expression "\u0008+"? (No Gate, RE only) gate=yes re=no"^[^\n\r *]*A\:RTR_08_0001#"? Gate "*A:RTR_08_0001#"? gate=no"^[^\n\r]*A\:RTR_08_0001#."? Gate "*A:RTR_08_0001#?"? gate=no"^--More--[\r\n]+"? Gate "--More--*"? gate=no"[\n\r]+"? (No Gate, RE only) gate=yes re=no"[^\r\n]*Press <SPACE> to cont[^\r\n]*"? Gate "*Press <SPACE> to cont*"? gate=no"Press any key to continue (Q to quit)[^\r\n]*"? Gate "Press any key to continue Q to quit*"? gate=no"^ *--More--[^\n\r]*"? Gate "*--More--*"? gate=no"^<-+ More -+>[^\n\r]*"? Gate "<* More *>*"? gate=no^Csighandler: handling signal(2)async event handler: Tcl_Eval(exit 130) 		 	   		  
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://www.shrubbery.net/pipermail/rancid-discuss/attachments/20140221/47be3939/attachment.html>


More information about the Rancid-discuss mailing list