Hi All,

I've been working with sudo thing awhile ago but haven't got it
any luck.

In sudoers file, I have an entry for this user:

test host.domain.com = NOPASSWD: /bin/cat

user test can execute cat command without having a root password,
right? This works well in user shell.
[test@host]$ sudo cat /etc/ftpaccess

In a perl cgi script, i want to use this user to execute cat command,
the script is something like this:

system('sudo', '-u', 'test', 'cat', '/etc/ftpaccess');

My question is, is it possible for a web user (www/nodody/apache) to
execute this command? I tried it awhile ago but it doesn't work, it will
work if i replace the user to www  and add an entry to sudoers file
but i dont like that idea since coz it will open up security hole in
the system.

Any idea how to make this thing work?


TIA
glynn









_
Philippine Linux Users Group. Web site and archives at http://plug.linux.org.ph
To leave: send "unsubscribe" in the body to [EMAIL PROTECTED]

Fully Searchable Archives With Friendly Web Interface at http://marc.free.net.ph

To subscribe to the Linux Newbies' List: send "subscribe" in the body to 
[EMAIL PROTECTED]

Reply via email to