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.
- Open a terminal window.
- type “su cp /etc/sudoers /etc/sudoers.bak” (this makes a backup in case you mess up).
- type “su emacs /etc/sudoers”
- add “usernameALL=(ALL)ALL” to the end of the file (replacing username with your username and with a tab).
- 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).
- 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.