[rancid] Re: lrancid / llogin

Ron Whitney ron.whitney at doitbest.com
Tue May 4 20:48:06 UTC 2010


Thanks for the reply.  I agree, it doesn't like the prompt.  The Linux host in question is a RedHat box.  The prompts given are as follows:

groucho 16:18:46 rwhitney >			(Regular user)
groucho 16:17:08 SU >				(root user)

(The machine running RANCID is Fedora which has a "[rancid at harpo bin]$ " prompt.)

As a test, I made some very crude changes to llogin and got past the prompt issue.  However, I'm now receiving the following:

[rancid at harpo bin]$ lrancid -d groucho
executing llogin -t 90 -c"BackupFiles" groucho
bad option "-nocase": must be -exact, -glob, -regexp, or --
    while executing
"switch -glob -nocase [subst -nocommands [lindex $commands $i]] {
         backupfiles {
           set files [find backupfile $host]
           if { [info exists f..."
    (procedure "run_commands" line 26)
    invoked from within
"run_commands $router $prompt $command"
    ("foreach" body line 151)
    invoked from within
"foreach router [lrange $argv $i end] {
    set router [string tolower $router]
    # attempt at platform switching.
    set platform ""
    send_user ..."
    (file "/usr/local/rancid/bin/llogin" line 789)
groucho: missed cmd(s): BackupFiles
groucho: missed cmd(s): BackupFiles
groucho: End of run not found
groucho: End of run not found
#

I suspect I'm running into differences between flavors of linux (Mine are mostly RedHat or Fedora based) which is breaking llogin.  Everything else (users, permissions, etc.) check out.  Since my ability to code is non-existent, I think I'll abandon this up for now.  Thanks for trying to assist.

Ron


> -----Original Message-----
> From: rancid-discuss-bounces at shrubbery.net 
> [mailto:rancid-discuss-bounces at shrubbery.net] On Behalf Of 
> Diego Ercolani
> Sent: Tuesday, May 04, 2010 03:14
> To: rancid-discuss at shrubbery.net
> Subject: [rancid] Re: lrancid / llogin
> 
> 
> You have to verify that:
> 1. the user has a regular shell: ssh whitney at groucho give you 
> a regular shell? 2. can you read the FILE you are trying to 
> read ? (cat 
> /var/named/p/mydoitbest.com)
> 3. my script waits for the root prompt (#) so the timeout is 
> related to this 
> issue. If you want to use a normal user you have to modify 
> the script (llogin) 
> to accomplish this....  
> I use it in a production environment connecting to root user 
> of debian/suse 
> workstations..... so It should work as is.  If you need more 
> functionality you 
> should implement it and release to the community.
> This is opensource.
> 
> Hope This Help
> Diego
> In data lunedì 3 maggio 2010 22:21:12, Ron Whitney ha scritto:
> : > I've tried to use the lrancid scripts as well without 
> luck.  Eventually, I
> > gave up.  Pekka's question prompted me to try again.  Here are my 
> > details:
> > 
> > Relevant portion of .clogon:
> > 
> > add method      groucho         {ssh}
> > add user        groucho         {rwhitney}
> > add password    groucho         {password}        {password}
> > add autoenable  groucho         1
> > add backupfile  groucho         /var/named/p/mydoitbest.com
> > 
> > Added to rancid-fe:
> > 
> >         "linux" => "lrancid llogin",
> > 
> > Finally, router.db:
> > 
> > Groucho:linux:up
> > 
> > When I try to test, it logs on but issues no commands.  
> Eventually (10 
> > seconds in this case), it times out:
> > 
> > [rancid at harpo ~]$ llogin -t 10 -c"BackupFiles" groucho groucho
> > spawn ssh -c 3des -x -l rwhitney groucho
> > rwhitney at groucho's password:
> > Last login: Mon May  3 16:07:33 2010 from 12-162-57-170.doitbest.com
> > groucho 16:14:19 rwhitney >
> > Error: TIMEOUT reached
> > 
> > I get similar results testing lrancid:
> > 
> > [rancid at harpo ~]$ lrancid -d groucho
> > executing llogin -t 90 -c"BackupFiles" groucho
> > groucho llogin error: Error: TIMEOUT reached
> > groucho llogin error: Error: TIMEOUT reached
> > groucho: missed cmd(s): BackupFiles
> > groucho: missed cmd(s): BackupFiles
> > groucho: End of run not found
> > groucho: End of run not found
> > #
> > 
> > Can anyone point me in the right direction?  RANCID is working on 
> > several Cisco switches and routers and a couple of Dell 
> switches.  So 
> > I know the base functionality is working.  Thanks in advnace.
> > 
> > 
> > Ron
> > 
> _______________________________________________
> Rancid-discuss mailing list
> Rancid-discuss at shrubbery.net 
> http://www.shrubbery.net/mailman/listinfo.cgi/rancid-discuss
> 


More information about the Rancid-discuss mailing list