sudo doesn't work
i have a little problem with my sudo here on debian v.3.
what i would like to do:
a php-based web-interface should be able to run some special system commands in the name of another user, i.e. 'apache' needs to 'makemaildir /some/path' as 'exim'.
how i tried this:
installed the sudo package and edited the sudoers file with visudo:
Host_Alias LOCAL = localhost, debian2
apache LOCAL=(exim) /usr/courier/bin/maildirmake
now i should be able to do something like
> sudo -u exim maildirmake /some/path
as 'apache', right?
what happened then:
"Sorry, user apache is not allowed to execute '/usr/local/bin/maildirmake /tmp/xx' as exim on debian2."
that's not what it's supposed to do :/
now where's the bug? for testing purposes, i switched to the apache user from root with 'su apache', since that user can't log in to the shell. but a call to 'id' gave me the correct uid/gid.
i've found some postings like "sudo is bad - no, sudo is good" today. i don't know whether it's good or bad, atm it's simply not suitable for my needs, though i'm convinced there must be a solution to this. anyway, i'm open for totally different approaches to get my maildir with another uid... only it must be fully automatable (no interactive questions or passwords!).