Tuesday, August 19, 2008

Ubuntu : UserName is not in the sudoers file. This incident will be reported.

Hello frnds...

I got a problem, dont know how.. but the problem was very serious to me as i root permissions very often. so lets go..
The problem was... I was getting a message while using sudo
"ravi is not in the sudoers file. This incident will be reported."

solution to this is ...

restart computer with recovery mode
one who dont know about how to go to recovery mode:
It is in the grub boot loader menu.. sometimes u need to press Esc to go to that menu. select recovery mode and press enter.

select "drop me to root prompt" or some message like this... so that u can go to the root prompt.
type visudo and press enter
this will open /etc/sudoers
add one line...
ravi ALL = (ALL) ALL

replace ravi with ur username... and save the file
save file : press Esc and then type :wq and press enter.

now reboot pc...
type exit
select normal startup... for UBUNTU

or type
shutdown -r now

problem solved...
enjoy

--
Ravi Kr. Gupta
http://techdc.blogspot.com

7 comments:

  1. Thank you very much

    I was in a very critical situation. The Solution really helps me out

    ReplyDelete
  2. A quick way ,

    - sudo visudo
    - add the user /group in the format ,
    %ravi ALL = (ALL) ALL
    -press "ctrl+X" and answer 'Yes' to save

    Hope that helps,
    Regards,

    ReplyDelete
  3. can u tell me where is it reported(file location)

    ReplyDelete
  4. What you want to ask Manish, file location where you can modify this line?
    That's /etc/sudoers

    ReplyDelete
  5. @SheryJanuary 22, 2012 4:43 AM

    "- sudo visudo"...
    haha, nice try, but he CANNOT 'sudo', that is his problem!

    ReplyDelete
  6. Its says that /etc/sudoer is a read only file. so i was not able to make any changes in that file. How can i overcome this problem???

    ReplyDelete
  7. Priyank.. if u are in recovery mode.. it should work. Try to save with :wq! and see.

    ReplyDelete

Note: Only a member of this blog may post a comment.