[Linux] Ubuntu 7.10 and su or sudo
Robert Citek
linux@flux.org
Sat, 12 Jan 2008 22:42:06 -0600
On 1/12/08, lou <lou@lous-stuff.com> wrote:
> You don't say what you tried or if it ever worked but Ubuntu is a "little
> different" in this area. When you do a sudo, it wants YOUR password, not the
> root password (there isn't one by default). If you wan to use su to switch
> to root, you have to set a password. You can do this by:
> sudo passwd root
> It will ask for your password and then ask you to enter a root password
> twice. After that, you can use su, just like the big kids :)
Many of the "big kids" as moving to using sudo. Two of many reasons:
1) finer grain control of rights versus su
2) logging of who did what using sudo
> Many of the Ubuntu gurus see doing that as a security exposure. Dummies
> like me see it as overcoming an inconvenience.
Alternatively, add this to your ~/.bashrc:
alias su="sudo su"
and supply your password when prompted.
BTW, now that root has a password, you may want to lock down all the
services where root could log in. For example, the default sshd
install:
$ grep -i root /etc/ssh/sshd_config
PermitRootLogin yes
Do the same for any subsequent services you install.
Regards,
- Robert