I have a problem that I've been trying to fix for the last few days. Each time I resolve an issue, a new one pops up.

Let me outline what has happened.

  1. I foolishly deleted all sub dirs in the /usr folder.
  2. I booted from the LiveCD with the same version (14.04.5 LTS Server) and chrooted the /usr/bin and copied the directories back using this guide deleted all the files in usr/bin typing in rm -rf *
  3. I tried running sudo to restart a service and was presented with the "sudo: /usr/bin/sudo must be owned by uid 0 and have the setuid bit set"
  4. From that same guide above, I executed the following commands after entering recovery mode mount -o remount,rw / chown -R root:root /usr/bin chmod a=rx,u+ws /usr/bin/sudo chmod a=rx,u+ws /usr/bin/pkexec

  5. on reboot SUDO now throws the following error "Segmentation fault (core dumped)"

I've been looking around and I can find several solutions that are similar to my issue, but nothing actually covering this particular circumstance.

I'm not sure what information you need but here is what I have.

ls -l /sur/bin/sudo outputs

-rwsr-xr-x 1 root root 155008 Sep 23 16:50 /usr/bin/sudo

strace sudo is quite long so i have posted it here https://paste.ubuntu.com/23230057/

I've looked up the ""sudo: effective uid is not 0, is"...," but again, although the symptoms are similar, the solutions seem to be unrelated and don't work.

Another thing that has started to happen since the Segmentation fault has started to occur is only being able to log into the system via SSH, from the console at the system itself, anything typed in at the login prompt is ignored.

My shared drives are no longer accessible from other pc's but are still mounted locally and accessbile (in /media/)

Thank you for your time.


You will never get this right by trying to put files back. You will learn a lot by trying. Launch a reinstall and let it go.

| improve this answer | |
  • Hi Paul, I suspected so, I have been putting off doing a reinstall because I don't know how destructive it is. I have a mdadm raid array and my drives are lvm configured. will a reinstall just "repair" files? or will it have an adverse affect on other areas? – Ozhound Sep 26 '16 at 3:44

I didn't actually solve this by way of employing a recovery solution, I took pauljohn32's advice and installed from scratch.

Both my MDADM raid and my Secondary VG's where picked up by the new install and where available to mount.


| improve this answer | |

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.