[sudo-users] little problem

friiz friiz at dunaweb.hu
Thu Dec 4 10:21:19 EST 2008


Hi!

Somebody cuold explain me why i am asked for the password, when i try to run "check_load"

nagios at www4:/usr/lib/nagios/plugins$ whoami
nagios
nagios at www4:/usr/lib/nagios/plugins$ sudo -l
User nagios may run the following commands on this host:
    (root) NOPASSWD: /usr/lib/nagios/plugins/*
nagios at www4:/usr/lib/nagios/plugins$ ls -la
total 192
drwxrwxrwx 3 root root   4096 2008-12-04 15:31 .
drwxr-xr-x 3 root root   4096 2008-07-22 15:40 ..
-rwxr-xr-x 1 root root 106776 2008-07-23 12:47 check_disk
-rwxr-xr-x 1 root root  23736 2008-12-04 15:31 check_load
-rwxr-xr-x 1 root root  14111 2008-07-23 12:47 check_ntp
drwxr-xr-x 2 root root   4096 2008-09-10 21:09 publishing
-rwxr-xr-x 1 root root   2463 2008-07-23 12:47 utils.pm
nagios at www4:/usr/lib/nagios/plugins$ sudo ./check_disk
check_disk: Could not parse arguments
Usage: check_disk -w limit -c limit [-W limit] [-K limit] {-p path | -x device}
[-C] [-E] [-e] [-g group ] [-k] [-l] [-M] [-m] [-R path ] [-r path ]
[-t timeout] [-u unit] [-v] [-X type]

nagios at www4:/usr/lib/nagios/plugins$ sudo ./check_load
[sudo] password for nagios:
Sorry, user nagios is not allowed to execute './check_load' as root on www4.xxxweb.com.

nagios at www4:/usr/lib/nagios/plugins$ cp ./check_load ./check_disk3
nagios at www4:/usr/lib/nagios/plugins$ ls -la
total 216
drwxrwxrwx 3 root   root     4096 2008-12-04 16:16 .
drwxr-xr-x 3 root   root     4096 2008-07-22 15:40 ..
-rwxr-xr-x 1 root   root   106776 2008-07-23 12:47 check_disk
-rwxr-xr-x 1 nagios nagios  23736 2008-12-04 16:16 check_disk3
-rwxr-xr-x 1 root   root    23736 2008-12-04 15:31 check_load
-rwxr-xr-x 1 root   root    14111 2008-07-23 12:47 check_ntp
drwxr-xr-x 2 root   root     4096 2008-09-10 21:09 publishing
-rwxr-xr-x 1 root   root     2463 2008-07-23 12:47 utils.pm
nagios at www4:/usr/lib/nagios/plugins$ sudo ./check_disk3
check_load: Could not parse arguments
Usage:check_load [-r] -w WLOAD1,WLOAD5,WLOAD15 -c CLOAD1,CLOAD5,CLOAD15
nagios at www4:/usr/lib/nagios/plugins$


thanks
friiz



More information about the sudo-users mailing list