1

I was trying to make an adjustment to the /etc/sudoers file, and I accidentally corrupted it. I restored it via the grub and using the Ubuntu 14.04 default.

But now it seems I can change ownership or permissions when trying to run sudo chown and sudo chmod. I cant even sudo sh.

I just get the following error:

sudo: chown: command not found

Is there anything that I might have lost in the sudoers file that was allowing me to run these commands?

This is my output of $PATH

/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/usr/games:/usr/local/games

This is the output from: whereis sudo chown

sudo: /usr/bin/sudo /usr/lib/sudo /usr/bin/X11/sudo /usr/share/man/man8/sudo.8.gz chown: /bin/chown /usr/share/man/man2/chown.2.gz /usr/share/man/man1/chown.1.gz

Also.. This is where I got the Generic Ubuntu 14.04 sudoers file from. http://heggel4.wordpress.com/2012/10/25/repair-sudoers-file-on-ubuntu-12-04-lts/

Please help. I'm in over my head :/ Thanks all :)

14
  • 2
    Post output of echo "$PATH" Aug 14, 2014 at 17:18
  • @user68186 I already saw this other thread and was able to use it to fix my sudoers file, but I still cannot run any of the following commands: chown, chmod, sh. Maybe I'm missing something?
    – Mark
    Aug 14, 2014 at 18:29
  • 1
    Hmm... Post output of whereis sudo chown Aug 14, 2014 at 19:17
  • 1
    Can you use chown without using sudo? Test on a file you own or just type chown Aug 14, 2014 at 20:10
  • 1
    Make sure your secure_path in sudoers matches what is on the page you linked to. Aug 14, 2014 at 20:23

0

You must log in to answer this question.

Browse other questions tagged .