O.K., another 12₵ worth…
First of all, when I was first introduced to sudo I didn't like it. After all, when I first started using computers, the terminal was a real teletype machine.
But I've learned to go with the flow, and there were some very good reasons to use sudo, a good synopsis is here. Basically for the inexperienced user it helps prevent unintended consequences when superusing (or super like using).
But the protection of sudo can be breached by shell escapes (i.e. http://docstore.mik.ua/orelly/unix/upt/ch30_26.htm), notably vi, which allows a user run commands in a subshell, as an superuser.
A senario is an inexperienced user finds out that he can change sudo while mucking about on the Internet(i.e. diddling with /etc/sudoers
) to, for example, use sudo without requiring a password . He does this and then discovers all the other cool things he can do. The unintended consequence here is that the inexperienced user may not grasp all the implications of sudo visudo
. Abstraction e.g. sudoedit and sudo visudo
contribute to unintended consequences.
- Of course trying to protect users from these things is like hearding cats.
nano is a great choice for inexperienced users (and for me who likes to eschew the command-line when practical) in that it is most like GUI editors. I'm confident that's why Ubuntu selected it as the default editor of sudoedit.
But my thinking is to avoid abstraction unless it has obvious benefits, hence sudo nano -B vice sudoedit and occasionally gksu gedit $file
(or gksu jEdit $file
if I'm amped up).
- The nub of the discussion is how far to go herding cats.