我有一个Nagios和Gammu安装。
当我使用gammu作为根时,如下所示:
/usr/bin/gammu identify (or else)它可以工作,但是当我作为nagios用户这么做时,我得到了这样的答案:
Can't open specified file. Read only?我甚至将nagios放在根组中,我使用visudo和:
nagios ALL=(ALL) ALL但不..。我找不到谷歌的任何解决方案。所以如果有人有了主意,那就太好了!
我在日志中没有任何错误..。
这是用这个链接解决的。
所以我补充道:
ALL=(root) NOPASSWD: /usr/sbin/smartctl在插件中:
my $smart_command = '/usr/bin/sudo /usr/sbin/smartctl'发布于 2013-08-01 09:17:13
您需要将nagios用户放在dialout组中,或者它可以访问连接到GSM调制解调器的串行端口的任何组中。
用这样的方法找出答案:
ls -l /dev/ttyS2
crw-rw---- 1 root dialout 4, 66 May 17 12:19 /dev/ttyS2(但是用正确的设备替换ttyS2 )。
对于由守护进程调用的像sudo这样的程序,使用gammu是错误的。
https://serverfault.com/questions/527888
复制相似问题