root password (sudo techniques)

Paul Sladen sounder at paul.sladen.org
Sat Apr 9 22:55:06 UTC 2005


On Sat, 9 Apr 2005, Chris Cothrun wrote:
> I picked up the habit of using 'sudo su' (I think from knoppix) and
> have continued doing this in Ubuntu. What are the differences between
> doing this and the suggested 'sudo -s' from the Wiki page?

It would be better to use neither of the above ('sudo -s' or 'sudo su') and
to only use 'sudo' for the commands that need it, for example, in the
following example:

  $ cd /etc/defaults
  $ ls -l
  $ sudo emacs /etc/default/acpi-support

Only the last command actually /needs/ running as root.  Additionally you
get a full audit log of which commands were run on the system, from which
directories---this makes it much easier to debug if something goes wrong.

It also avoids the risk of 'accidently' leaving that root shell open in the
background for somebody else to find (or, for you/me to paste 'rm -rf /'
into without thinking).

	-Paul
-- 
I didn't know it snowed here!  Groningen, NL





More information about the ubuntu-users mailing list