PDA

View Full Version : [SOLVED] fedora: use sudo command


melrokz
November 25th, 2008, 12:42 PM
I am a Ubuntu user for more than a year, and I have recently installed fedora also (multi-boot).
I've tried sudo but always gives this error:
'user is not in the sudoers file. This incident will be reported.'
I then used 'new login' to login as root and tried 'visudo' to edit the sudoers file.
Please tell me how to edit this file and how to save it as it opens for editing in the terminal.

taurus
November 25th, 2008, 12:46 PM
With Fedora, you have a password for root (created when you installed it) so if you need to become root, just open a terminal and run

su -
<Enter root password>

__Ryan__
November 25th, 2008, 12:47 PM
I have a writeup on that here (http://www.wiredrevolution.com/commands/submit-commands-as-root-with-sudo):

LowSky
November 25th, 2008, 12:57 PM
I like how you included the commmand for running as another user for sudo, very helpfull for people who want to use multiple accounts with no sudo access.

melrokz
November 25th, 2008, 01:30 PM
How to use the editor that opens the sudoers file when we type visudo?

__Ryan__
November 25th, 2008, 01:43 PM
The editor is nano. Just type in the changes and press Ctrl+x to exit and save the changes.

sisco311
November 25th, 2008, 01:46 PM
you can change the default editor:

kde:
VISUAL=kate visudo
gnome:
VISUAL=gedit visudo
xfce:
VISUAL=mousepad visudo

terminal:
EDITOR=nano visudo
in nano press Ctrl+o Enter to save the file and Ctrl+x to exit.