0

I recently messed up my ownership and read/write rights to very important files which doesnt allow me to log in to ubuntu once past boot. I've tried several chmod and chown commands to revert the files back but have a problem doing so, first off the ownership of the files is wrong, and on top of that some are only read files and I need to convert them. I get the error :

sudo: must be setuid root

as well as another error which says the ownership rights are 100 when they should be 0(root). I really do not want to re-install a fresh copy there are very important files on the system that I need.

Ferdinand
  • 725

1 Answers1

1

Use the ubuntu installation disk and reboot into the 'rescue' mode.

You will then get a limited root shell and can mount the affected disk(s) and use chown/chmod to fix the problem files.

Then remove the ubuntu installation disk and reboot.

mdpc
  • 1,199
  • I dont actually have the disk, would it work in the same fashion if I put the file in a USB and boot from that? Also I can access the whole root through recovery mode, does that not work for this situation? – Ferdinand Jul 23 '12 at 22:03
  • it should if you can boot from it. And yes you would access your disk by mounting your ROOT disk after you get the recovery shell root prompt. – mdpc Jul 23 '12 at 22:06
  • Also, you should be able to get an ISO for Ubuntu on-line if you need to. I don't think that it would matter what version, as long as the drivers and filesystems are relatively standard. What you want is to get to the root rescue shell and be able to mount your root, and make use chmod/chown maybe edit the sudoers file. – mdpc Jul 23 '12 at 22:07
  • I got the iso file on a thumb drive, how do I run it on the machine>? – Ferdinand Jul 24 '12 at 15:16