The “root” user is the name of the user who can control everything on the entire computer. We call this the “super user” but this is not connected with the “su” (switch user) command. Here we will describe the proper way to escalate a normal users privileges to the root user on the system.
Applicable to Centos Versions:
- Centos 4.x
- Centos 5.x
Requirements
Requirements including prerequisite reading or packages
Doing the work
- To become root, first you must right click and open a terminal on your desktop or conmtrol+alt+F2. Then, you type:
- Special note:
1 |
<strong>su --login</strong> or: <strong>su -l</strong> or: <strong>su -</strong> |
1 2 3 |
<em>Note</em>: the "<strong>--login</strong>" "<strong>-l</strong>" or the "<strong>-</strong>" is very important, this sets the environment and path of the user you're trying t switch to (man su). Then, you have to type in your root password. You set this when you installed Centos. Also see <a title="Sudo - An advanced howto" class="internal-link" href="../security/sudo-an-advanced-howto">sudo</a> |
Troubleshooting
How to test
Common problems and fixes
If you’re using the control+alt+F2 option, you’ll need to enter the username “root” (without quotes) then your root password.
More Information
Disclaimer
We test this stuff on our own machines, really we do. But you may run into problems, if you do, come to #centos on irc.freenode.net
Last Modified: 22 Apr, 2020 at 16:33:46