I was trying to install a package using the command:

sudo apt-get install ruby-rvm

But I'm prompted with

nish is not in the sudoers file.  This incident will be reported.

I tried to add myself to sudoers list in /etc/sudoers. But to do that I need to be logged in as root user.

using the command "sudo su" again prompts "nish is not in the sudoers file. This incident will be reported." Please cold someone help me out here. Thanks

  • 3
    So, do you have another account that can sudo? If not, you'll have to ask your system administrator.
    – slhck
    Sep 3, 2013 at 6:45
  • Another way..Try su and enter root's password (of course, if you're an admin). But that only works on some distributions by default as the root password is locked. Try using sudo with a user you created during the installation, it should have the permissions by default to run sudo
    – Ashtray
    Sep 3, 2013 at 7:10
  • @slhck : Thanks, I logged in to another account and it worked out.
    – naka
    Sep 3, 2013 at 7:55

1 Answer 1


Actually this is the intended behavior. If you are not in the sudoers list, you should not be able to add yourself to, because on a multiuser system restricted users should not be able to gain full access. If you have the root password you could do

su root

to switch user to root and then add yourself to the sudoers list.

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .