[nylug-talk] Ubuntu's lack of root.
Ron Guerin
Fri Jun 30 19:53:05 EDT 2006
David Rosenstrauch wrote:
> mike at jurney.org wrote:
>> Seriously. You shouldn't ever be root unless you're doing something that
>> absolutely requires it. Doing `sudo vim /etc/hosts` is smarter in every
>> way than doing `ssh root at localhost (log in); vim /etc/hosts; (leave root
>> shell sitting around open in an xterm for the next 3 days in case you
>> need
>> to do something else); logout;`.
>
> FYI (if you weren't aware already), "sudoedit <some-file>" is a nice
> shortcut for "sudo <your-favorite-editor> <some-file>".
I know someone who just got himself into trouble on Ubuntu by screwing
up /etc/sudoers . So my FYI for the evening is this:
visudo
NEVER edit /etc/sudoers directly on a box where root is disabled!
visudo invokes the editor you have defined by the VISUAL or EDITOR
environment variables, and refuses to save your changes to /etc/sudoers
if there are any syntax errors in the file.
ex:
~ export VISUAL="nano"
~ visudo
- Ron
More information about the nylug-talk
mailing list