RSS

Configuring sudo in Fedora

13 Oct

Edit: Rob writes to say  that visudo can be found in /usr/sbin. My process will still work but it isn’t needed.

Awhile ago I talked about fedora and I complaind that visudo was no where to be found. I still haven’t figured out why this is or if there is another program that is supossed to take it place but my feeling is that they just want us to leave it alone. I’m not really one to just leave stuff alone.

Visudo is not required to configure sudo it just makes it safer. Visudo has build in syntax checking and other safety features that make it the best choice for configuring sudo. I’ve been getting a few hits from people searching for visudo+fedora so I have to assume that they are looking for something to tell them how to configure it. Well, its really pretty simple.

So lets get started.

Warrning: Do this at your own risk. I’m not responsible if you magically screw up you system. this shouldn’t happen I just want to cover myself.

  1. Open a terminal window.
  2. type “su cp /etc/sudoers /etc/sudoers.bak” (this makes a backup in case you mess up).
  3. type “su emacs /etc/sudoers”
  4. add “usernameALL=(ALL)ALL” to the end of the file (replacing username with your username and with a tab).
  5. save the file (C-x C-s) (If it won’t let you have it due to permission problems just save it in your user file and change the permissions using chmod (i.e. su chmod 440 path/to/file) and then move it to /etc).
  6. test it. If you get an error check to make sure that the permissions are right.

.
that should be it. Of course, you don’t need to use Emacs to do this but I like emacs. If you have any problems or a better way to do it leave a comment and I will see what I can do.

Advertisements
 
Leave a comment

Posted by on October 13, 2007 in linux

 

Tags: , ,

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com 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 )

Google+ photo

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

Connecting to %s

 
%d bloggers like this: