Hardisk Temperature

Templates, scripts for templates, scripts and requests for templates.

Moderators: Developers, Moderators

mandrk
Posts: 21
Joined: Thu May 12, 2005 1:32 am
Location: Romania
Contact:

Post by mandrk »


mandrk, can you identify under which user cacti cron job is running and try to execute it under this identity? Mine is running under www-data as specified in /etc/cron.d/cacti.

Code: Select all

su - www-data
cd /var/www/html/cacti/scripts
./hdtemp.sh
Yes! Here was the problem.
My user don't have sufficent rights to execute command.
I resolve the problem with /etc/sudoers
I add in sudoers line

Code: Select all

myuser ALL=NOPASSWD: /usr/sbin/smartctl
Until put this linie when i try to execute the ./hdtemp.sh with cactiuser i don't receive output value.

So' streaker69 i think ower friend koocotte have right. Is frightening.
You sistem security is very low.
Check the sudoers file.

10x. I see the values now.
Step 2 try dynamic script:

Code: Select all

/usr/sbin/smartctl -a /dev/$1 | grep -i emperature | awk '{printf $10"\n"}'; 
Post Reply

Who is online

Users browsing this forum: No registered users and 3 guests