Hacker News new | past | comments | ask | show | jobs | submit login

Wait, since when is sudo considered dangerous? Forget the GUI for editing the hostname file, we have much more important things to worry about if that's the case.



He's not saying that sudo is dangerous but that a GUI program running in X11 as root is dangerous. This is because most GUI toolkits aren't hardened against attackes (buffer overflows, badly formed events, etc.) that can all be sent as a non-privileged user/program under X11 to one that's running as root. This means that if someone had an exploit in your browser that let them see X11 events or send them to another window then they could potentially use that to gain root access the moment you went into ANYTHING that ran as root under you X session.


Yes, exactly. I should have been more clear.

"sudo vim /etc/whatever.conf" is perfectly fine.

"sudo gedit /etc/whatever.conf" might give an attacker already on your system a way to gain root.


Then why use a GUI to edit the hostname in the first place? Either use sudo or fix the security issues with Xorg.


> Either use sudo

Yes, just keep doing that. I run several Linux boxes with systemd, all of them without hostnamed.

Forcing all your users to use the One True Way on a complicated system usually just means you're ignoring many legitimate use cases. Microsoft still does that on Windows (APIs and ugly registry entries over everything) - and while I cringe everytime I see it, I still recognize that the approach has value for some situations.

Many of the daemons for systemd on the other hand are optional, which I personally find to be great. I can use the ones I need and leave the ones I don't.

As for the GUI: Why use a text file? That might be a good use case for you and me, but a terrible one for someone not used to administrate *NIX systems. Why not allow both? As long as the file-based approach is not neglected, I'm perfectly fine with that.


If you tell users to edit the file, they will do something stupid like using LibreOffice. Ubuntu wants to be useable without using a terminal.




Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: