Stupid things you've done that broke your Linux installation - eviltoast

Follow-up from “Dumbest Thing you have done distro-hopping?”.

Here’s mine - the laptop from which I’m typing right now has a broken touchpad that keeps jumping and clicking randomly, and does not work. Well, I can’t afford to fix it, but at the moment, I was so pissed off I punched the touchpad really hard, and the machine panicked with all the lights blinking. A few more revival abuses, and the machine was back to life, but since I was running a nixos-rebuild switch --upgrade in the background, I blew off my boot partition. I think I just broke the unbreakable distro.

  • mrchampion@lemmy.world
    link
    fedilink
    arrow-up
    6
    ·
    1 year ago

    I’m pretty sure there’s only been one time I broke my install, which was on an Ubuntu distro. This was on my old laptop, and it’s partitions are interesting because I have 1 main partition and 2 others (the first was my windows partition, before it stopped working for whatever reason and I thought it couldn’t be fixed. The second was the install that I broke).

    Anyways, I remember I was trying to run some command, I can’t remember what, but I knew it kept eventually saying “Permission Denied” at some point. This was like 4-5 years ago, so again I don’t remember the details, but I’m certain I would’ve known to try sudo, but that didn’t work for whatever reason. I remember trying really hard to get this command to work, but it wouldn’t, so I got so frustrated that I just went to /usr and ran chmod -R 777 ./. I honestly didn’t think this would break anything. Why would it? Surely relaxing the permissions on some files won’t break anything? I mean, the only time an error could occur is if I restricted the permissions, so relaxing them shouldn’t do anything.

    At the time, I didn’t know about setuid, which is a permission flag that is important for allowing one user to run a command as a privileged user (like root, for example). So, what probably happened was I removed the setuid on /usr/bin/sudo, effectively breaking sudo. At the time I didn’t know what I had done, though, so hence I didn’t know how to fix it, so I just reinstalled Ubuntu.