Robbie,

Rancid normally runs as the rancid user. Depending on your distro and package if not installing from the source you should have a rancid user created.

Check that you have a rancid user in /etc/passwd and note it’s home directory.  It’s that home directory that the .cloginrc needs to be placed/created.

You should also check /etc/rancid/rancid.conf for the BASEDIR= value as it is normally the rancid users home dir.

 

All the rancid commands are run as the rancid user so you would use the su – rancid to change to that user (when you do it should put you in that users home directory, if not cd ~ will).

 

Check the version of rancid your using and if it’s 3.x or higher check the router.db that you created to make sure it has the correct delimiter between the variables. If it’s wrong rancid-run will not pull your configs.  If your running rancid version 3.x or higher and the router.db has colons : vs semi-colons ; you will need to put $config['rancid_version'] = 3;

In  the config.php and rerun the command to generate your router.db again

 

From rancid version 3.x and up you have to use a ; vs :

Pre 3.x router.db Example:

<device_name>:<device_type>;<state>[;comments]

Post 3.x router.db Example:

                <device_name>;<device_type>;<state>[;comments]

 

 

Ron Culler

CTO

Secure Designs Inc

 

From: observium [mailto:observium-bounces@observium.org] On Behalf Of Robbie Wright
Sent: Wednesday, September 16, 2015 12:34 AM
To: Observium Network Observation System
Subject: Re: [Observium] RANCID integration

 

Thanks Adam, that seemed to get me past that step. I think it messed up the perms on something else though. I've got everything else pretty much done and I'm at this point now: trying to run

 

/var/lib/rancid/bin/mtlogin myrouter

 

throws this error: Error: /home/myloggedinuser/.cloginrc must not be world readable/writable

 

Its like rancid is looking for .cloginrc at the home folder of the user that installed it and not in /var/lib/rancid. Note this command works perfectly and logs into the router successfully.

 

/usr/lib/rancid/bin/clogin -f /var/lib/rancid/.cloginrc myrouter

 

The generate script works great, but we're also unable to execute this command to write the php results to the router.db file:

 

php /opt/observium/scripts/generate-rancid.php > /var/lib/rancid/observium/router.db

 

It just throws: -bash: /var/lib/rancid/observium/router.db: Permission denied

And you can't read it with sudo although it is set to root owner and group with 750.

 

Any insight is greatly appreciated, thank you for all of your help.

 

 


 

Robbie Wright

541-902-5101

 

On Tue, Sep 15, 2015 at 4:18 PM, Adam Armstrong <adama@observium.org> wrote:

Run that as root, and it won't ask a password.

Adam.

Sent with AquaMail for Android
http://www.aqua-mail.com

On 16 September 2015 12:02:33 am Robbie Wright <robbie@siuslawbroadband.com> wrote:

Been hacking around with rancid for a bit and stuck on this step:

 

Run this command to create the folder structure:

su - rancid
/var/lib/rancid/bin/rancid-cvs

It is asking for a password, presumably for rancid, which we don't have. Again presuming here, that it was created by the installer. Trying hard to follow the instructions (exactly) and this is where I'm getting hung up. Thanks ahead of time for the help.

 

_______________________________________________
observium mailing list
observium@observium.org
http:/​/​postman​.​memetic​.​org/​cgi-bin/​mailman/​listinfo/​observium


_______________________________________________
observium mailing list
observium@observium.org
http://postman.memetic.org/cgi-bin/mailman/listinfo/observium