[SOLVED] Running Cacti as root

Post support questions that directly relate to Linux/Unix operating systems.

Moderators: Developers, Moderators

Post Reply
ar1
Posts: 18
Joined: Mon Mar 13, 2006 4:33 pm
Location: Bloomington, IL

[SOLVED] Running Cacti as root

Post by ar1 »

The below works.

Hi

I would like to run Cacti as root, as opposed to as cactiuser. I changed the following:

1. All the directory/file permissions to root
2. The crontab entry
3. shell> mysql --user=root mysql
mysql> GRANT ALL ON cacti.* TO root@localhost IDENTIFIED BY 'somepassword';
mysql> flush privileges;

Is there anything else I need to do? Thanks.

Note: The reason why I need to run as root is that I have created a new Data Input Method, which uses an ssh command to get data from the remote host, and the ssh keys are configured for root. Adding them for cactiuser to all the hosts is not feasible right now.
Last edited by ar1 on Wed Apr 05, 2006 4:03 pm, edited 2 times in total.
User avatar
fmangeant
Cacti Guru User
Posts: 2345
Joined: Fri Sep 19, 2003 8:36 am
Location: Sophia-Antipolis, France
Contact:

Re: Running Cacti as root

Post by fmangeant »

ar1 wrote:Note: The reason why I need to run as root is that I have created a new Data Input Method, which uses an ssh command to get data from the remote host, and the ssh keys are configured for root. Adding them for cactiuser to all the hosts is not feasible right now.
Hi

can't you use sudo to run SSH as root ?
Something like this in /etc/sudoers should do it :

Code: Select all

cactiuser ALL = NOPASSWD: /usr/bin/ssh
Modity then your data input method to run "sudo /usr/bin/ssh" instead of "/usr/bin/ssh".

If it's not an option, running Cacti as root should work without any trick.
[size=84]
[color=green]HOWTOs[/color] :
[list][*][url=http://forums.cacti.net/viewtopic.php?t=15353]Install and configure the Net-SNMP agent for Unix[/url]
[*][url=http://forums.cacti.net/viewtopic.php?t=26151]Install and configure the Net-SNMP agent for Windows[/url]
[*][url=http://forums.cacti.net/viewtopic.php?t=28175]Graph multiple servers using an SNMP proxy[/url][/list]
[color=green]Templates[/color] :
[list][*][url=http://forums.cacti.net/viewtopic.php?t=15412]Multiple CPU usage for Linux[/url]
[*][url=http://forums.cacti.net/viewtopic.php?p=125152]Memory & swap usage for Unix[/url][/list][/size]
eyechart
Posts: 49
Joined: Thu Apr 25, 2002 11:48 pm

Post by eyechart »

running as root is a pretty bad idea.
Post Reply

Who is online

Users browsing this forum: No registered users and 2 guests