Yes! Here was the problem.
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
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
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"}';