![](https://secure.gravatar.com/avatar/e192f72c51ba40b63c67ad9e32cc6164.jpg?s=120&d=mm&r=g)
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.
Robbie Wright Siuslaw Broadband https://siuslawbroadband.com 541-902-5101
![](https://secure.gravatar.com/avatar/11b54b3dd25b712395dab9818c67596f.jpg?s=120&d=mm&r=g)
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.
Robbie Wright Siuslaw Broadband https://siuslawbroadband.com 541-902-5101
observium mailing list observium@observium.org http://postman.memetic.org/cgi-bin/mailman/listinfo/observium
![](https://secure.gravatar.com/avatar/e192f72c51ba40b63c67ad9e32cc6164.jpg?s=120&d=mm&r=g)
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 Siuslaw Broadband https://siuslawbroadband.com 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.
Robbie Wright Siuslaw Broadband https://siuslawbroadband.com 541-902-5101 _______________________________________________ observium mailing list observium@observium.org http://postman.memetic.org/cgi-bin/mailman/listinfo/observium http://postman.memetic.org/cgi-bin/mailman/listinfo/observium
observium mailing list observium@observium.org http://postman.memetic.org/cgi-bin/mailman/listinfo/observium
![](https://secure.gravatar.com/avatar/f1bc0ad0130c06a63583cc1327513f9a.jpg?s=120&d=mm&r=g)
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 Siuslaw Broadbandhttps://siuslawbroadband.com 541-902-5101
On Tue, Sep 15, 2015 at 4:18 PM, Adam Armstrong <adama@observium.orgmailto: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.commailto: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.
Robbie Wright Siuslaw Broadbandhttps://siuslawbroadband.com 541-902-5101tel:541-902-5101 _______________________________________________ observium mailing list observium@observium.orgmailto:observium%40observium.org http://postman.memetic.org/cgi-bin/mailman/listinfo/observiumhttp://postman.memetic.org/cgi-bin/mailman/listinfo/observium
_______________________________________________ observium mailing list observium@observium.orgmailto:observium@observium.org http://postman.memetic.org/cgi-bin/mailman/listinfo/observium
![](https://secure.gravatar.com/avatar/e192f72c51ba40b63c67ad9e32cc6164.jpg?s=120&d=mm&r=g)
Thanks for the feedback Ron. A rancid user was created by the install of the program.
rancid:x:106:114::/var/lib/rancid:/bin/bash
Bade directory in the existing config is this: BASEDIR=/var/lib/rancid; export BASEDIR
Trying 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
Robbie Wright Siuslaw Broadband https://siuslawbroadband.com 541-902-5101
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.
Robbie Wright
Siuslaw Broadband https://siuslawbroadband.com
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.
Robbie Wright
Siuslaw Broadband https://siuslawbroadband.com
541-902-5101
observium mailing list observium@observium.org http://postman.memetic.org/cgi-bin/mailman/listinfo/observium 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
![](https://secure.gravatar.com/avatar/e192f72c51ba40b63c67ad9e32cc6164.jpg?s=120&d=mm&r=g)
Not sure if these even works, but just tried this and received the following error.
robbie@pud-observium1:/var/lib/rancid$ sudo su - rancid /var/lib/rancid/bin/mtlogin hostname /var/lib/rancid/bin/mtlogin: line 61: syntax error near unexpected token `(' /var/lib/rancid/bin/mtlogin: line 61: `set password_file $env(HOME)/.cloginrc'
dpkg -s rancid Package: rancid Status: install ok installed Priority: optional Section: net Installed-Size: 1157 Maintainer: Ubuntu Developers ubuntu-devel-discuss@lists.ubuntu.com Architecture: amd64 Version: 2.3.8-6 Replaces: rancid-core (<< 2.3.2-1), rancid-util (<< 2.3.2-1) Provides: rancid-core, rancid-util Depends: libc6 (>= 2.4), debconf (>= 0.5) | debconf-2.0, perl, expect, cvs | subversion, passwd, openssh-client | ssh, inetutils-ping | ping, adduser, libperl4-corelibs-perl | perl (<< 5.12.3-7) Suggests: diffstat Breaks: rancid-core (<< 2.3.2-1), rancid-util (<< 2.3.2-1) Conffiles: /etc/cron.d/rancid 41b764ec2a8633c83bf2fa6c642bccb3 /etc/rancid/rancid.conf 65c6bd64df3b40b3c0e4a2a07db4ef6d
Robbie Wright Siuslaw Broadband https://siuslawbroadband.com 541-902-5101
On Wed, Sep 16, 2015 at 6:50 AM, 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/bash
Bade directory in the existing config is this: BASEDIR=/var/lib/rancid; export BASEDIR
Trying 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
Robbie Wright Siuslaw Broadband https://siuslawbroadband.com 541-902-5101
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.
Robbie Wright
Siuslaw Broadband https://siuslawbroadband.com
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.
Robbie Wright
Siuslaw Broadband https://siuslawbroadband.com
541-902-5101
observium mailing list observium@observium.org http://postman.memetic.org/cgi-bin/mailman/listinfo/observium 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
![](https://secure.gravatar.com/avatar/11b54b3dd25b712395dab9818c67596f.jpg?s=120&d=mm&r=g)
Don't put both commands on the same line? :>
Adam.
Sent with AquaMail for Android http://www.aqua-mail.com
On 16 September 2015 14:55:49 Robbie Wright robbie@siuslawbroadband.com wrote:
Not sure if these even works, but just tried this and received the following error.
robbie@pud-observium1:/var/lib/rancid$ sudo su - rancid /var/lib/rancid/bin/mtlogin hostname /var/lib/rancid/bin/mtlogin: line 61: syntax error near unexpected token `(' /var/lib/rancid/bin/mtlogin: line 61: `set password_file $env(HOME)/.cloginrc'
dpkg -s rancid Package: rancid Status: install ok installed Priority: optional Section: net Installed-Size: 1157 Maintainer: Ubuntu Developers ubuntu-devel-discuss@lists.ubuntu.com Architecture: amd64 Version: 2.3.8-6 Replaces: rancid-core (<< 2.3.2-1), rancid-util (<< 2.3.2-1) Provides: rancid-core, rancid-util Depends: libc6 (>= 2.4), debconf (>= 0.5) | debconf-2.0, perl, expect, cvs | subversion, passwd, openssh-client | ssh, inetutils-ping | ping, adduser, libperl4-corelibs-perl | perl (<< 5.12.3-7) Suggests: diffstat Breaks: rancid-core (<< 2.3.2-1), rancid-util (<< 2.3.2-1) Conffiles: /etc/cron.d/rancid 41b764ec2a8633c83bf2fa6c642bccb3 /etc/rancid/rancid.conf 65c6bd64df3b40b3c0e4a2a07db4ef6d
Robbie Wright Siuslaw Broadband https://siuslawbroadband.com 541-902-5101
On Wed, Sep 16, 2015 at 6:50 AM, 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/bash
Bade directory in the existing config is this: BASEDIR=/var/lib/rancid; export BASEDIR
Trying 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
Robbie Wright Siuslaw Broadband https://siuslawbroadband.com 541-902-5101
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.
Robbie Wright
Siuslaw Broadband https://siuslawbroadband.com
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.
Robbie Wright
Siuslaw Broadband https://siuslawbroadband.com
541-902-5101
observium mailing list observium@observium.org http://postman.memetic.org/cgi-bin/mailman/listinfo/observium 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
![](https://secure.gravatar.com/avatar/f1bc0ad0130c06a63583cc1327513f9a.jpg?s=120&d=mm&r=g)
Robbie, Login as root Run the command su – rancid That command will make you the rancid user, you can type the command whoami to verify it. Once your running as the rancid user you can then run the command.
Also you need to set the ownership to the rancid user/group for rancid home dir /var/lib/rancid.
Ron Culler CTO Secure Designs Inc
From: observium [mailto:observium-bounces@observium.org] On Behalf Of Robbie Wright Sent: Wednesday, September 16, 2015 9:55 AM To: Observium Network Observation System Subject: Re: [Observium] RANCID integration
Not sure if these even works, but just tried this and received the following error.
robbie@pud-observium1:/var/lib/rancid$ sudo su - rancid /var/lib/rancid/bin/mtlogin hostname /var/lib/rancid/bin/mtlogin: line 61: syntax error near unexpected token `(' /var/lib/rancid/bin/mtlogin: line 61: `set password_file $env(HOME)/.cloginrc'
dpkg -s rancid Package: rancid Status: install ok installed Priority: optional Section: net Installed-Size: 1157 Maintainer: Ubuntu Developers <ubuntu-devel-discuss@lists.ubuntu.commailto:ubuntu-devel-discuss@lists.ubuntu.com> Architecture: amd64 Version: 2.3.8-6 Replaces: rancid-core (<< 2.3.2-1), rancid-util (<< 2.3.2-1) Provides: rancid-core, rancid-util Depends: libc6 (>= 2.4), debconf (>= 0.5) | debconf-2.0, perl, expect, cvs | subversion, passwd, openssh-client | ssh, inetutils-ping | ping, adduser, libperl4-corelibs-perl | perl (<< 5.12.3-7) Suggests: diffstat Breaks: rancid-core (<< 2.3.2-1), rancid-util (<< 2.3.2-1) Conffiles: /etc/cron.d/rancid 41b764ec2a8633c83bf2fa6c642bccb3 /etc/rancid/rancid.conf 65c6bd64df3b40b3c0e4a2a07db4ef6d
Robbie Wright Siuslaw Broadbandhttps://siuslawbroadband.com 541-902-5101
On Wed, Sep 16, 2015 at 6:50 AM, Robbie Wright <robbie@siuslawbroadband.commailto: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/bash
Bade directory in the existing config is this: BASEDIR=/var/lib/rancid; export BASEDIR
Trying 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
Robbie Wright Siuslaw Broadbandhttps://siuslawbroadband.com 541-902-5101tel:541-902-5101
On Wed, Sep 16, 2015 at 5:32 AM, Ron Culler <Ron.Culler@securedesigns.commailto: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.orgmailto: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 Siuslaw Broadbandhttps://siuslawbroadband.com 541-902-5101tel:541-902-5101
On Tue, Sep 15, 2015 at 4:18 PM, Adam Armstrong <adama@observium.orgmailto: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.commailto: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.
Robbie Wright Siuslaw Broadbandhttps://siuslawbroadband.com 541-902-5101tel:541-902-5101 _______________________________________________ observium mailing list observium@observium.orgmailto:observium%40observium.org http://postman.memetic.org/cgi-bin/mailman/listinfo/observiumhttp://postman.memetic.org/cgi-bin/mailman/listinfo/observium
_______________________________________________ observium mailing list observium@observium.orgmailto:observium@observium.org http://postman.memetic.org/cgi-bin/mailman/listinfo/observium
_______________________________________________ observium mailing list observium@observium.orgmailto:observium@observium.org http://postman.memetic.org/cgi-bin/mailman/listinfo/observium
![](https://secure.gravatar.com/avatar/e192f72c51ba40b63c67ad9e32cc6164.jpg?s=120&d=mm&r=g)
That did it, thanks Ron. Setting the /var/lib/rancid directory (recursively) to be owned by the rancid user and group fixed the problem. Thanks Ron and Adam! You guys are a huge help.
And on a side note, could you put the generate-rancid.php to router.db into the cron somehow so you wouldn't have to manually update that?
Robbie Wright Siuslaw Broadband https://siuslawbroadband.com 541-902-5101
On Wed, Sep 16, 2015 at 7:40 AM, Ron Culler Ron.Culler@securedesigns.com wrote:
Robbie,
Login as root
Run the command su – rancid
That command will make you the rancid user, you can type the command whoami to verify it.
Once your running as the rancid user you can then run the command.
Also you need to set the ownership to the rancid user/group for rancid home dir /var/lib/rancid.
Ron Culler
CTO
Secure Designs Inc
*From:* observium [mailto:observium-bounces@observium.org] *On Behalf Of *Robbie Wright *Sent:* Wednesday, September 16, 2015 9:55 AM
*To:* Observium Network Observation System *Subject:* Re: [Observium] RANCID integration
Not sure if these even works, but just tried this and received the following error.
robbie@pud-observium1:/var/lib/rancid$ sudo su - rancid /var/lib/rancid/bin/mtlogin hostname /var/lib/rancid/bin/mtlogin: line 61: syntax error near unexpected token `(' /var/lib/rancid/bin/mtlogin: line 61: `set password_file $env(HOME)/.cloginrc'
dpkg -s rancid Package: rancid Status: install ok installed Priority: optional Section: net Installed-Size: 1157 Maintainer: Ubuntu Developers ubuntu-devel-discuss@lists.ubuntu.com Architecture: amd64 Version: 2.3.8-6 Replaces: rancid-core (<< 2.3.2-1), rancid-util (<< 2.3.2-1) Provides: rancid-core, rancid-util Depends: libc6 (>= 2.4), debconf (>= 0.5) | debconf-2.0, perl, expect, cvs | subversion, passwd, openssh-client | ssh, inetutils-ping | ping, adduser, libperl4-corelibs-perl | perl (<< 5.12.3-7) Suggests: diffstat Breaks: rancid-core (<< 2.3.2-1), rancid-util (<< 2.3.2-1) Conffiles: /etc/cron.d/rancid 41b764ec2a8633c83bf2fa6c642bccb3 /etc/rancid/rancid.conf 65c6bd64df3b40b3c0e4a2a07db4ef6d
Robbie Wright
Siuslaw Broadband https://siuslawbroadband.com
541-902-5101
On Wed, Sep 16, 2015 at 6:50 AM, 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/bash
Bade directory in the existing config is this: BASEDIR=/var/lib/rancid; export BASEDIR
Trying 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
Robbie Wright
Siuslaw Broadband https://siuslawbroadband.com
541-902-5101
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.
Robbie Wright
Siuslaw Broadband https://siuslawbroadband.com
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.
Robbie Wright
Siuslaw Broadband https://siuslawbroadband.com
541-902-5101
observium mailing list observium@observium.org http://postman.memetic.org/cgi-bin/mailman/listinfo/observium 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
![](https://secure.gravatar.com/avatar/11b54b3dd25b712395dab9818c67596f.jpg?s=120&d=mm&r=g)
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/bash
Bade directory in the existing config is this: BASEDIR=/var/lib/rancid; export BASEDIR
Trying 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
Robbie Wright Siuslaw Broadband https://siuslawbroadband.com 541-902-5101
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.
Robbie Wright
Siuslaw Broadband https://siuslawbroadband.com
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.
Robbie Wright
Siuslaw Broadband https://siuslawbroadband.com
541-902-5101
observium mailing list observium@observium.org http://postman.memetic.org/cgi-bin/mailman/listinfo/observium 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
participants (3)
-
Adam Armstrong
-
Robbie Wright
-
Ron Culler