[Cialug] Prevent a command from being used w/ sudo

Matthew Nuzum newz at bearfruit.org
Tue May 17 16:40:18 CDT 2011


Thanks!

On Tue, May 17, 2011 at 4:18 PM, Zachary Kotlarek <zach at kotlarek.com> wrote:

>
> On May 17, 2011, at 4:10 PM, Matthew Nuzum wrote:
>
> > Is there a way to prevent a command from being run with sudo? (in Ubuntu
> specifically) Would be awesome if I could spit out a user-friendly error
> message so I can remember why I chose not to allow that command to be run.
>
>
> This should allow the group foo to run all commands except
> /full/path/to/cmd:
>        %foo    ALL = ALL, !/full/path/to/cmd
>
>
> You can even do it with specific arguments. For example, to allow changes
> to any password except root:
>        %foo    ALL = /usr/bin/passwd [A-z]*, !/usr/bin/passwd root
>
>
>        Zach
>
>
> _______________________________________________
> Cialug mailing list
> Cialug at cialug.org
> http://cialug.org/mailman/listinfo/cialug
>
>


-- 
Matthew Nuzum
newz2000 on freenode, skype, linkedin and twitter

"Opportunity is missed by most people because it is dressed in overalls and
looks like work." -Thomas Edison
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://cialug.org/pipermail/cialug/attachments/20110517/01368191/attachment.html>


More information about the Cialug mailing list