[sudo-users] little problem

friiz friiz at dunaweb.hu
Fri Dec 5 04:07:50 EST 2008


>
> what about    sudo /usr/lib/nagios/plugins/check_load
>
>
>
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.hu.

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

nagios at www4:/usr/lib/nagios/plugins$ sudo /usr/lib/nagios/plugins/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$ dpkg -la |grep sudo
ii  sudo                                                 1.6.9p10-1ubuntu3.3                 Provide limited super user privileges to spe

nagios at www4:/usr/lib/nagios/plugins$ sudo -V
Sudo version 1.6.9p10



another interesting thing

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.hu.
nagios at www4:/usr/lib/nagios/plugins$ ls -la
total 216
drwxrwxrwx 3 root   root     4096 2008-12-05 10:03 .
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-07-23 12:47 check_disk2
-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$ cp check_load check_load_bug

nagios at www4:/usr/lib/nagios/plugins$ ls -la
total 240
drwxrwxrwx 3 root   root     4096 2008-12-05 10:04 .
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-07-23 12:47 check_disk2
-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 nagios nagios  23736 2008-12-05 10:04 check_load_bug
-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_load
check_load: Could not parse arguments
Usage:check_load [-r] -w WLOAD1,WLOAD5,WLOAD15 -c CLOAD1,CLOAD5,CLOAD15

and it's working, but if i delete check_load_bug

nagios at www4:/usr/lib/nagios/plugins$ rm check_load_bug
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.hu.


this is an ubuntu hardy 8.04

thanks





More information about the sudo-users mailing list