In any case, if you really care, just enable pam_wheel.so in your pam configuration for su (usually /etc/pam.d/su) and be sure to add yourself to the appropriate group.
In any case, if you really care, just enable pam_wheel.so in your pam configuration for su (usually /etc/pam.d/su) and be sure to add yourself to the appropriate group.
My recollection is that when OSX came on the scene without a root password and administration through sudo, Linux distributions were still tied to root and su and many Linux users were both disapproving and condescending about it.
Years ago a friend of mine asked my help in securing a Unix system with sudo. I bascially told him it was nearly impossible because there were (and still are) too many ways to escape back to a root shell with sudo, so, in my humble opinion, gives a false sense of security.
If you need a longer session with uid 0, use sudo -i. Having a separate root login is pretty much pointless. I doubt having separate passwords helps security either, since local privilege escalation vulnerabilities are common anyway.
I've used sudo to restrict root access to specific command line invocations for certain users. With due care (ie. no access to software with shell escapes) it is secure.
In any case, distributions seem to be moving towards eliminating the superuser altogether in common use cases. I think advocating sudo was just the beginning.
I also color code the hostname so that I can tell at a glance what machine I'm on.
For example,
export PS1='[\[\033[1;34m\]\u\[\033[0m\]@\[\033[1;30m\]\h\[\033[0m\] $newPWD]\$ '
where $newPWD is a friendly, shortened $PWD.On that same machine, the root prompt is identical except that the color is set to 1;31m instead of 1;34m, which makes it bright red.
alias ssu='sudo /bin/bash -login'Also -i does more stuff to simulate a login like setting $HOME and cd'ing there.
Usually you might want to use sudo -i or 'su -' which both simulate a login. But sudo su - really isn't needed any more since -i has been added
Though certainly it's safer to do some tasks as non-root as well, such as compiling software, then switch to root/sudo to install it. Just remember to double/triple check each command you type in a root shell or after the sudo command. Particularly when using commands such as rm with arguments such as -rf!
Sudo also does provide some extra flexibility when you are delegating tasks to someone who doesn't necessarily need full root access.