I have a Nagios, and Gammu installed.
When I use gammu as root, like the following :
/usr/bin/gammu identify (or else)
It works, but when I do it as nagios user, i got this answer :
Can't open specified file. Read only?
I even put nagios in the root group, I used visudo with :
nagios ALL=(ALL) ALL
But no ... I can't find any solution with google. So if someone got an idea, it would be great !
I don't have any error in logs...
This was solved using this link.
So I added :
ALL=(root) NOPASSWD: /usr/sbin/smartctl
And in the plugin :
my $smart_command = '/usr/bin/sudo /usr/sbin/smartctl'