develooper Front page | perl.qa | Postings from October 2007

Re: Running CPAN as a regular user, installing as root

From:
Smylers
Date:
October 18, 2007 14:23
Subject:
Re: Running CPAN as a regular user, installing as root
Message ID:
20071018181719.GA6343@stripey.com
Eric Wilhelm writes:

> Yep.  And if your sudoers file is more restrictive, you might have
> something like this (relative paths aren't allowed in sudoers)
> 
>   ewilhelm ALL=(ALL)      NOPASSWD: /usr/bin/make install

That does of course mean that any user can run any command at all as
root, passwordlessly: all she has to do is create a makefile in the
current directory which has 'install' as a target and the command in
question as the action.

This may be acceptable (it's something you're very likely to do by
accident), but it isn't suitable in environments where the purpose of
the sudoers restrictions is because you don't completely trust all of
your users.

Smylers



nntp.perl.org: Perl Programming lists via nntp and http.
Comments to Ask Bjørn Hansen at ask@perl.org | Group listing | About