Answer the question
In order to leave comments, you need to log in
How to enter superuser mode?
Good afternoon. My Kubuntu system has a user " alex " with superuser rights. And user " dom " with user rights. That is, he is not allowed to execute commands by entering sudo. Because of which I ran into a number of problems. If I need to become a superuser from alex, I type sudo -s, or sudo -i and I'm root, but in order to become root in the terminal from " dom " I need to first become alex and only then root. (su - alex "password" followed by sudo -s "password"). Please tell me if there is a way to immediately become root from under " dom ".
I mean something like (su - alex "password" | sudo -s "password)
Answer the question
In order to leave comments, you need to log in
There are at least two ways.
1. The su
command asks for the root password and requires being in the wheel group (yes, oddly enough, in Linux it's the same as in FreeBSD). If you know - type the password and welcome. This will create a root environment (the home directory is /root, and configuration scripts will run from there)
2. The sudo command asks for the user
's
password and requires a properly configured /etc/sudoers. In this case, there will be a user environment. This matters when there are several admins on the machine with different environment settings.
the su command changes to root
su
and you are root. This prompts for the root password
. The sudo command allows you to execute other commands as root, while prompting for the user's password.
Those.
su -
enter the root password
and become root from under any user
if there is no root password or it is unknown - configure sudo
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question