Linux: Enabling sudo function for non-root users

Posted on February 14, 2011. Filed under: Linux, Utilities |

Fedora Linux (and possibly others) can enable other users to run commands with root powers:

  1. Load Terminal
  2. type su – to change to root, and enter the root password
  3. type visudo to open the /etc/sudoers file using the vi text editor
  4. scroll down (down arrow or mouse scroll) to the # line %wheel  ALL=(ALL)   ALL
  5. delete the commenting # marks at the start and move the line over so the % is on the far left starting the line
  6. type ZZ to save and exit

This still requires entering a password.  To avoid that, instead go to the line saying ## %wheel  ALL=(ALL)   NOPASSED: ALL and remove the # marks, and bring the % flush with the left side.  Save and exit the same way.  This does, however, make the system slightly more vulnerable.

After that, in a single command line or in the Terminal, precede all commands with sudo followed by a space and the command, and it should allow any users to get results without having to become root.

Advice based on Fedora 10 and Red Hat Enterprise Linux by Negus and Foster-Johnson (isbn 9780470413395).


Make a Comment

Leave a Reply

Please log in using one of these methods to post your comment: Logo

You are commenting using your account. Log Out /  Change )

Google+ photo

You are commenting using your Google+ account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )


Connecting to %s

Liked it here?
Why not try sites on the blogroll...

%d bloggers like this: