allowing sudo to delete certain files
Posted
by
chandank
on Server Fault
See other posts from Server Fault
or by chandank
Published on 2012-10-24T15:55:49Z
Indexed on
2012/10/26
5:05 UTC
Read the original article
Hit count: 477
I would like to allow to delete certain files in /tmp directory to sudo users. I have added the Allow_Cmnd /usr/sbin/userdel
for sudo users but this does not delete all /tmp files associated with the user.
So how shall I tweak the sudoers to allow them to delete certain files in /tmp directory only. I googled a bit but learned that regex may be be application at this. I tried couple of tweaks but its not working for me.
I would like the users to have ability to execute command such as
find /tmp -uid 10002 | grep joeuser | xargs rm -rf
© Server Fault or respective owner