How to Enable root on Ubuntu
Posted on In LinuxFor UNIX users/developers, having the power of the user 0 (root’s UID) on our hands is essential. It also allows us to have complete control over the system. And one more thing we all have in common is that we hate Windows. Thus, we set out in search of an operating system for our own personal use…
Normally we’ll end up with one of these: Fedora, Ubuntu, RHEL,..
But one of them stands out prominently – Ubuntu! It is the most publicized linux operating system out there and they claim that it is usable by even laymen without any trouble. To actually support such a wide spectrum of audience, folks who develop Ubuntu have disabled the root user on the system so that everyday users don’t mess with the critical system settings by accident. But a direct consequence of this to us, power users is that we’ve always got to authenticate ourselves one more time, keep using ‘sudo’ on every command, remember to use sudo on when editing files which belong to the system.
By doing the following steps we can be rid of that restriction that’s placed on our shoulders:
sudo -i
And set the password for root using
sudo passwd root
Now you’re good to go!
And for some reason you want to disable being root again
sudo passwd -dl root
You can experiment more with the sudo stuff to have a middle ground solution by looking at the command’s man page, but beware you could mess up the system. Oh! one last thing – One thing we, UNIX developers and users hate is to re-install the system because it’s not coming up.