Results 1 to 7 of 7

Thread: removed myself from sudoers list

  1. #1
    Join Date
    Apr 2009
    Beans
    44

    removed myself from sudoers list

    Hi,

    This does not seem to be my day. For some reason (mostly experimenting) I used sudo visudo and removed my name (the whole line) from there. Now, of course, I cannot use sudo any more. I cannot even use "sudo su" to be root. The whole system is unaccessible to me now.

    Any solution(s) to this issue?

  2. #2
    Join Date
    Apr 2009
    Beans
    44

    Re: removed myself from sudoers list

    I followed this link:
    http://www.psychocats.net/ubuntu/sudo
    but I could not use sudo visudo from the root command line. It said root is not in the sudoers file. This incident will be reported.

    I don't get this, how can root be not in the sudoers list?

  3. #3
    Join Date
    Jun 2011
    Location
    The Shadow Gallery
    Beans
    6,744

    Re: removed myself from sudoers list

    Quote Originally Posted by d0.higgs View Post
    I followed this link:
    http://www.psychocats.net/ubuntu/sudo
    but I could not use sudo visudo from the root command line. It said root is not in the sudoers file. This incident will be reported.

    I don't get this, how can root be not in the sudoers list?
    you cant sudo su if you are not in the sudo group.

    And root doesnt need to use sudo

    see here to repair sudo

    http://www.psychocats.net/ubuntu/fixsudo
    Backtrack - Giving machine guns to monkeys since 2006
    Kali-Linux - Adding a grenade launcher to the machine guns since 2013

  4. #4
    Join Date
    Apr 2009
    Beans
    44

    Re: removed myself from sudoers list

    It did not work. sudo visudo did not work

  5. #5
    Join Date
    Nov 2009
    Beans
    919
    Distro
    Ubuntu 12.04 Precise Pangolin

    Re: removed myself from sudoers list

    If you're in a root shell you shouldn't need to use sudo because you're already root.

  6. #6
    Join Date
    Dec 2010
    Beans
    573
    Distro
    Ubuntu 12.04 Precise Pangolin

    Re: removed myself from sudoers list

    If you boot from CD into recovery mode and directly edit the sudoers file you should be able to fix the issue. In recovery mode you are root and do not need to use sudo or su to edit the sudoers file.

  7. #7
    Join Date
    Apr 2009
    Beans
    44

    Re: removed myself from sudoers list

    Solved.

    I found an old live-CD (10.04) and out of nothing else to do to save my system, I used it (after all, it should give me some way to mount my system partition) following some windows I asked for a root command which I used to "vi" my file.

    All seems fine now.

    Thanks guys.

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •