1

I am using ubuntu 12 and am unable to use sudo anymore (it was working a few days ago) but apparently got corrupted somehow. Below is the error I receive when I try using sudo.

sudo: unable to stat /etc/sudoers: No such file or directory
sudo: no valid sudoers sources found, quitting
sudo: unable to initialize policy plugin

Besides reusing the ubuntu live cd, is there anything else I can possibly look into in order to fix this?

1 Answer 1

6

You can manually create a sudoers file like this one:

# /etc/sudoers
#
# This file MUST be edited with the 'visudo' command as root.
#
# See the man page for details on how to write a sudoers file.
#

Defaults        env_reset

# Host alias specification

# User alias specification

# Cmnd alias specification

# User privilege specification
root    ALL=(ALL) ALL

You can follow this guide on how to edit / create the sudoers file.

Also, check this forum thread.

1
  • 1
    I ended up re-installing Ubuntu. I was not entirely certain if I could place the sudoers file in the correct location without root access (I was getting permission denied errors). Most likely, an oversight on my side - thank you for responding (+1)
    – ali haider
    Nov 8, 2012 at 17:44

You must log in to answer this question.

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