[rancid] Re: clogin enable and password option behavior

A Dude adudek16 at gmail.com
Thu Dec 7 15:36:05 UTC 2006


That works. I'm not sure if the same bug is in any other xlogin scripts
since I just use cisco.
Thanks
Aaron

On 12/6/06, john heasley <heas at shrubbery.net> wrote:
>
> 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
>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://www.shrubbery.net/pipermail/rancid-discuss/attachments/20061207/e159bd94/attachment.html 


More information about the Rancid-discuss mailing list