Why root password exist if I can be root with sudo -s or sudo -i, it need only sudo password so?

sudo -i makes me root with sudo password

sudo -s, sudo su the same

su and su root need root password so it doesn't make sense to me, I can be root with only sudo password so why root password exist?

Answers 1

  • The answer to your question is quite simple. On Ubuntu, the root password does not exist. The root account is not enabled. Thus, the root user cannot login on a standard Ubuntu system.

    Instead there is the sudo system where selected "normal" users can assume administrator priviledges. So if you want a terminal with root privileges, su will not work, because root is not active. However, you still can obtain such prompt with sudo -i, where you act as a privileged normal user, thus provide your own user password.

    See here for a more elaborate discussion of sudo versus logging in to the root account. You will learn you can activate the root account. If you then ask "Why root password exist if I can be root with sudo -s or sudo -i, it need only sudo password so?", well, in this case it is you who created the contradictory situation. By default, that situation is not there.


Related Questions