Nono, I meant use sudo/root to become the rancid user.
If you try to use su as a normal user, it'll ask for that users password.
Adam.
Sent with AquaMail for Android
http://www.aqua-mail.com
On 16 September 2015 14:51:30 Robbie Wright <robbie@siuslawbroadband.com> wrote:
Thanks for the feedback Ron. A rancid user was created by the install of the program.rancid:x:106:114::/var/lib/rancid:/bin/bashBade directory in the existing config is this: BASEDIR=/var/lib/rancid; export BASEDIRTrying to run su - rancid /var/lib/rancid/bin/mtlogin myrouter asks for the rancid password, which we don't have since the user was automatically installed. Not sure if I should try and update the password and run it manually because I have a sinking suspicion something else would break.Adam's original instruction to install the script with sudo made the install go through and set perms for root to the rancid folder. I did manually change the perms to .cloginrc to the rancid user/group this morning for more testing based on feedback from another user but still no joy.lrwxrwxrwx 1 root root 19 Oct 22 2013 bin -> /usr/lib/rancid/bin
-rwxr-xr-x 1 root root 3731 Oct 22 2013 downreport
-rwxr-xr-x 1 root root 5185 Oct 22 2013 getipacctg
lrwxrwxrwx 1 root root 16 Oct 22 2013 logs -> ../../log/rancid
drwxr-x--- 4 root root 4096 Sep 15 17:14 observium
-rwxr-xr-x 1 root root 3235 Oct 22 2013 rancid-cvspurge
-rwxr-xr-x 1 root root 5866 Oct 22 2013 rtrfilter
drwxr-x--- 6 root root 4096 Sep 15 17:14 SVN-rw-r----- 1 rancid rancid 121 Sep 15 20:56 .cloginrc_______________________________________________On Wed, Sep 16, 2015 at 5:32 AM, Ron Culler <Ron.Culler@securedesigns.com> wrote: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.
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.comOn 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
_______________________________________________
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