chrpinedo / rancid-cisco-sb

rancid-cisco-sb
26 stars 25 forks source link

Problem to login on SG300 #20

Open Processeur opened 7 years ago

Processeur commented 7 years ago

May be the bug is between the chair and the keyboard, But I don't know what's going wrong.

I install Rancid 2.3.6 on an Ubuntu 14.04, I had your 2 files csblogin and csbrancid in /var/lib/rancid/bin/

make them runnable

when I launch this command:

/var/lib/rancid/bin/csblogin 10.50.127.253

I have this output:

Trying 10.50.127.253... Connected to 10.50.127.253. Escape character is '^]'.

User Name:rancid Password:**

User Name:rancid Password:**

User Name:rancid Password:** authentication failed

Connection closed by foreign host. spawn ssh -c 3des -x -l rancid 10.50.127.253 rancid@10.50.127.253's password: Permission denied, please try again. Error: Check your password for 10.50.127.253

I don't know why the app try authenticate with username rancid whereas in my config I configured the app to use : globality

This is my .cloginrc config:

blablabla... add password 10.33.125.253 Security92 F-Fsecure_S add password 10.33.126.253 Security92 F-Fsecure_S add user 10.50.127.253 {globality} add password 10.50.127.253 {Security EnSecure} add method 10.50.127.253 telnet add autoenable 10.50.127.253 1 add userprompt 10.50.127.253 {"User Name:"}

But I also tried with :

add user 10.50.127.253 globality add password 10.50.127.253 Security EnSecure add method 10.50.127.253 telnet add autoenable 10.50.127.253 1 add userprompt 10.50.127.253 "User Name:"

this is my router.db:

blablabla... 10.50.125.253:cisco:up 10.50.126.253:cisco:up 10.50.127.253:cisco-sb:up**

This is my rancid-fe:

%vendortable = ( 'cisco-sb' => 'csbrancid', 'agm' => 'agmrancid', 'alteon' => 'arancid', etc.

Thanks by advance for your help.

Proc.

chrpinedo commented 7 years ago

The issue is that nowadays I don't have a switch to test it so I can only apply patches provided/verified by users. I hope that one user will provide the patch to solve the login problem. :-(

chrpinedo commented 7 years ago

Duplicate of #19

Processeur commented 7 years ago

arrg too bad for me.

May you'll have an idea, I created a user call rancid on the switch, this way I was able to login with csblogin. but then the prompt type endlessly lcli+[return]

So If you have an idea of what going wrong, else nevermind, i'll keep searching and thank you for having answered me.

Processeur commented 7 years ago

Found a work around:

I removed line from 424 to 428:

        ">"     {
                  send "lcli\r"
                  exp_continue
                }

And put the enable password instead of $passwd on line 433

Not very clean but did the trick.

Hopefully for me all edge switch on my net have the same enable pass.

chrpinedo commented 7 years ago

If you want, you could send me a pull-request with the changes that you have verified and I would integrate them in the repo. So, other people might benefit from your solution!