When I log in as root from gnome-terminal using the command:
sudo su
it logs me in as the root user.
Isn't this switching a user considered as a log in?
Also, which command can show me all the "switching" I have done?
bashrootsusudo
When I log in as root from gnome-terminal using the command:
sudo su
it logs me in as the root user.
Isn't this switching a user considered as a log in?
Also, which command can show me all the "switching" I have done?
Best Answer
First, let's take a look at
man who
:As you said,
So, it's about you, not about root.
And you are right. This is from
man sudo
:So, again, when you run
sudo su
command, in fact you (not root) are executingsu
command as the superuser.If you want to became root, first you must to enable root account. See here how to do this:
After this you can login with root in tty1-6, via ssh, in GUI at the login screen, etc.
In Ubuntu it seems that there is an alternative to get root logged without to enable his account. The following command will do this:
This will open a root terminal:
Related to the second question, I give you a hint: look in
/var/log
directory for files likeauth.log.*
.