Evanescent Thoughts

sudo in Fedora 8

Posted in Linux, computers, general by Sathya Narayanan on March 9, 2008

Most of u who have worked in ubuntu must be familiar with th sudo command which i really liked a lot :-) when i switched to fedora 8 i had to login as root using su each and every time to execute small commands.. so i set out to search for a solution for sudo .. Fedora has sudo by default but u need to cinfigure it a bit to make it work like sudo in ubuntu..

when u do a sudo in fedora and give ur accnt passwd it wud give a message saying ” users is not in sudoers list “

So wht we do is add our user account to sudoers list which maps the privelges tht a user get by executing sudo command.

open sudoers which is in /etc/sudoers using the command visudo.. if it says command not found, then execute it from /usr/sbin/visudo ( u can add this permanantly to ur path varible using the previous post in my blog )

in the last line add the following line

user ALL=(ALL) ALL

where user is ur user name.. suppose my user name is sathya i wud do

sathya ALL=(ALL) ALL

sudo has an expiry time of 5 minutes by default to change tht add timestamp_timeout=0 to timestamp_timeout=0 to Defaults env_reset line….

now press esc and :wq and now sudo is ready for u !!!

4 Responses

Subscribe to comments with RSS.

  1. [...] yum -y install cpio rpm ( for configuring sudo on fedora refer here or use su -c or login as root [...]

  2. MPG said, on June 24, 2009 at 10:25 am

    I cannot run visudo because I AM NOT ON THE SUDOERS LIST!

    • Sathya Narayanan said, on June 24, 2009 at 2:29 pm

      to give ur self the sudo permission u obviously need a root access.. open visudo as root and u can grant sudo privileges to any user u want … if visudo doesnt require root access , doesnt it mean tht any body can get root access :P

  3. MPG said, on June 25, 2009 at 5:02 am

    visudo required root access, and when I type in sudo visudo it said the same thing it always did about me not being on the sudoers list.

    http://www.mjmwired.net/resources/mjm-fedora-f10.html
    Thanks to that page I found out I can type “su” to drop to a root terminal.

    su is like sudo -i except it uses the root password and anyone who knows the root password can uses it instead of using the password of a logged on user on the sudoers list.


Leave a Reply