[rancid] Re: clogin enable and password option behavior
john heasley
heas at shrubbery.net
Wed Dec 6 21:16:22 UTC 2006
Wed, Dec 06, 2006 at 04:00:02PM -0500, A Dude:
> Is there some reason that I cannot specify both a password and enable when
> using clogin?
> My idea is to use a web page to pass the username, password, and enable to
> clogin and collect the data from the commands, primarily to automate getting
> show tech and show log info.
> Everything works if I remove either the enable or the password option. Is
> this the expected behavior?
>
> [adudek16 at redbaron ~]$ clogin -u test -e twctest -p testing -x rantest
> 10.82.88.11
> 10.82.88.11
> can't read "passwd": no such variable
> while executing
> "login $router $ruser $userpswd $passwd $enapasswd $cmethod $cyphertype"
> ("foreach" body line 111)
> invoked from within
> "foreach router [lrange $argv $i end] {
> set router [string tolower $router]
> send_user "$router\n"
>
> # Figure out prompt.
> # Since autoena..."
> (file "/usr/sbin/clogin" line 616)
A bug; please try this patch.
Index: clogin.in
===================================================================
RCS file: /home/rancid/.CVS/rancid/bin/clogin.in,v
retrieving revision 1.106
diff -d -u -r1.106 clogin.in
--- clogin.in 6 Dec 2006 02:12:31 -0000 1.106
+++ clogin.in 6 Dec 2006 21:15:30 -0000
@@ -754,6 +754,9 @@
}
set passwd [join [lindex $pswd 0] ""]
set enapasswd [join [lindex $pswd 1] ""]
+ } else {
+ set passwd $userpasswd
+ set enapasswd $enapasswd
}
# Figure out username
More information about the Rancid-discuss
mailing list