Strange Stuff with sudo

Benjamin.Cuthbert at ft.com Benjamin.Cuthbert at ft.com
Thu Jun 20 04:02:00 EDT 2002


Strange Happenings with Sudo

Settings for /etc/sudoers

ROOT_CMDS=\
                /usr/bin/sh,\
                /usr/bin/truss,\
                /usr/sbin/snoop,\
                /usr/bin/chown * /opt/customer/*,\
                /usr/bin/chmod * /opt/customer/*,\
                /usr/bin/rm /opt/*

# User privilege specification
ADMIN         ROOT_CMDS

so as root i touch a file called /etc/eatme, then login as myself and then try and delete that file.

[testuser at netra]$ cd /opt
[testuser at netra]$ ls -l eatme
-rw-r--r--   1 root     other          0 Jun 20 07:30 /opt/eatme
[testuser at netra]$ sudo rm eatme
Password:
Sorry, user testuser is not allowed to execute '/usr/bin/rm eatme' as root on netra.
[testuser at netra]$ sudo rm /opt/eatme
[testuser at netra]$

So why is it that when i put in the sudo rm /opt everything is cool, but when i do cd /opt and then
sudo rm eatme it does not work.



**********************************************************************************
Our network may monitor outgoing and incoming e-mail messages for
security and customer service purposes, but this e-mail is confidential.
Please notify the sender immediately if you receive it in error, and then delete it.
Thank you.



More information about the sudo-users mailing list