3

I really screwed up and did

sudo chmod -R 777 /etc

After searching for hours for an answer I eventually booted into recovery mode and did:

mount -o rw,remount /  # because the file-system was mounted as read-only
chmod 0440 /etc/sudoers
chmod 0440 /etc/sudoers.d/README
chmod 0700 /var/lib/sudo

I am now able to login, but not as my user, but "I have no name!". I also get an error if I try to do anything:

bash: /etc/profile: Permission denied

Ubuntu is installed on a seperate SSD and I have 5 hard drives in RAID 5. I am afraid to not being able to remount the RAID array if i reinstall Ubuntu. And to connect a CD drive I have to disconnect one of the hard drives and I am really afraid of losing data. Is there something I can do?

  • if you did not use sudo, the chmod command did nothing – mchid Dec 25 '14 at 22:36
  • I did use sudo ... – Håvard Anda Estensen Dec 25 '14 at 22:36
  • okay, can you boot up normally? 777 should give permission to everybody and is only a problem because it allows permission too much and is a security risk; it should not prevent access but allow it. – mchid Dec 25 '14 at 22:38
  • No, I have to go via recovery mode and do mount -o rw,remount / – Håvard Anda Estensen Dec 25 '14 at 22:45
  • 1
    I have never remounted a RAID 5 array, but I have remounted RAID 0,1 and 10 arrays without issue. I had one RAID 1 array that I mounted to several different operating systems over a period of years. You just have to do your research ahead of time. On these issues, it's a question of how much time do you want to spend fixing your screwed up OS vs. how much time spent researching remounting a RAID 5. Personally, I'd remount the RAID 5 because what if the OS disk crashed and was completely unrecoverable? Good knowledge to have. – Paul Dec 25 '14 at 23:23
  • So I can reinstall Ubuntu and remount the RAID 5 array without any issue? There is no RAID setup I will screw up by doing that? – Håvard Anda Estensen Dec 26 '14 at 20:13

0 Answers0