←back to thread

217 points tanelpoder | 7 comments | | HN request time: 0.942s | source | bottom
Show context
theamk ◴[] No.26492113[source]
Agree with the author, "do not run as root" is a great point. Prefix the required commands with sudo instead!

And even with "sudo", limit the exposure -- sometimes you can sudo to specific user/group instead of more general root.

replies(1): >>26493004 #
jimmaswell ◴[] No.26493004[source]
I've run as root whenever possible for over a decade with 0 problems. I'm not going to relegate myself to constantly asking my own computer for permission to do anything. Same for UAC turned off in Windows, just don't run viruses.
replies(1): >>26494029 #
1. aidenn0 ◴[] No.26494029[source]
Have you never accidentally bumped the middle mouse button while your mouse cursor was over a terminal?
replies(3): >>26494231 #>>26494717 #>>26496748 #
2. Aransentin ◴[] No.26494231[source]
I'm unsure if "protection against accidents" is that relevant for deciding to have a root terminal open or not. Even if the clipboard contained some destructive "delete everything" command plus an newline character, all the files I actually care about is in my home directory and can easily be wiped by my regular non-root user.
replies(1): >>26494827 #
3. lstodd ◴[] No.26494717[source]
I did it, and the additional pain of all those bandaids proposed here it not worth it. I did crash servers, deleted clusters, botched up firewalls and routing by misclicks.

But any damage caused by this does not approach the pain caused by misguided attempts to avoid it.

replies(1): >>26494841 #
4. aidenn0 ◴[] No.26494827[source]
What about all the files other people using the machine care about?
replies(1): >>26495351 #
5. aidenn0 ◴[] No.26494841[source]
typing 4 characters in front of a command and not using a '>' character in your prompt is pain?
6. Aransentin ◴[] No.26495351{3}[source]
Yeah, my reply naturally only works for personal computers, e.g. my laptop/desktop system where it's very unlikely anybody else but me will use it. For corporate servers where you have traceability requirements and such it's an entirely different question.
7. jimmaswell ◴[] No.26496748[source]
Most commands I'd run would need sudo anyway so a mis-paste would probably run with sudo if I used it. Never had a mishap from a mispaste like that though, no.