0

I'm using the Ruby Version Manager (RVM) which strongly recommends to never run the rvm command on linux prefaced by 'sudo'. How can I allow myself to run the command without sudo as I am supposed to, but either prohibit or warn before prefacing it with 'sudo'?

1 Answer 1

1

in the file /etc/sudoers change the %wheel entry:

%wheel ALL=ALL,!/usr/bin/rvm

using the correct absolute path for rvm. This will allow members of the wheel group to use sudo with any command except rvm

attempting to do so will give you a message:

Sorry, user *username* is not allowed to execute '/usr/bin/rvm' as root on *hostname*.

Edit: on my system, the sudo group is "wheel", but you could specify any group to have specific sudo privileges.

2
  • So, I think I have succeeded, but by substituting %wheel with %sudo, the %sudo group being, I presume, the one that needs to be addressed for anyone wanting to use the sudo command? Commented Jun 5, 2016 at 1:41
  • On most Linux systems, the group that allows one to use sudo is named wheel. Commented Jun 5, 2016 at 1:44

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .