Ubuntu – Broken sudo: can’t open /etc/sudoers: No such file or directory

filesystemlive-usbsudo

I have a live USB persistent version of Ubuntu 11.04 installed with Unetbootin.

After some time I experienced some bugs while upgrading the kernel and trying to use my second screen on my laptop. Later then I noticed a strange, apparently unrelated problem: each time i tried to sudosomething i got the same response :

sudo: can't open /etc/sudoers: No such file or directory
sudo: no valid sudoers sources found, quitting

Unable to do anything requiring root privileges, I rebooted using the single boot option and was able to access the root console.

I noticed the following behavior :

# ll /etc/sudoers
-r--r----- 0 root root 1014 2011-05-31 16:23 /etc/sudoers
# cat /etc/sudoers
cat: /etc/sudoers: No such file or directory

Is there something wrong with the hard link count being zero ? How can i change it ? The hard link count is 1 on my other computer which work correctly.

The live session user still belongs to the admin group if it matters.

Best Answer

A hard link count of zero means that the directory entry doesn't belong to any file. That sounds like a damaged file system.