I was thinking, maybe I'd like to disable passwords for the root user and only use keys to log in. If I need to log in without keys, I’d have a 2nd user that is like root in every way, except it has a different name.
Is there a way to have a 2nd root user? Is this impossible? Is it a bad idea to disable passwords?
Best Answer
Instead of creating a "second root user", just give another user account privileges to use
sudo
. That way if the root account is hosed, you can just dosudo bash
or such to have root access to the system again. Although it is better to just usesudo
for individual commands...Some distro's such as Ubuntu are actually configured this way out-of-the-box, as a security measure.