What is a Root User Account? How to Root Phones? (2023)

This page is about the root superuser account in Linux, about rooting phones and other devices, and briefly explains how to manage root access and other privileged access.

Contents

What is a Root User? Privileged Access Management Related Privileged Accounts Using SUDO and Other Tools to Eliminate Need for Root Accounts Root Access Root Privileges SELinux and Other Ways to Limit Root Privileges Root User on Mac SSH Access To Root Account Set-user-id Flags on Executable Files Single User Mode and Recovering Lost Root Passwords Rooted Devices How to Root iPhone/iPad? How to Root Android?

What is a Root User Account? How to Root Phones? (1)

What is a Root User?

Root is the superuser account in Unix and Linux. It is a user account for administrative purposes, and typically has the highest access rights on the system.

Usually, the root user account is called root. However, in Unix and Linux, any account with user id 0 is a root account, regardless of the name. It is fairly common for certain system administrators to have their own root accounts on a system, with their own passwords.

Privileged Access Management

Privileged account management refers to managing access to privileged accounts, including root accounts. Deploying privileged access management tools is important for organizations, because root accounts are so powerful. Most cybercrime is perpetrated by internal actors, such as system administrators. Gaining accountability into what they do is important for deterring insider crime and fraud. Furthermore, many cybersecurity regulations and best practice requires deploying privileged access management tools.

Privileged access management tools provide logging and monitoring of access. Typically every root login and every command executed as root is logged.

The passwords for privileged accounts should never be shared. Shared passwords are much more likely to misused, their passwords tend to remain unchanged for extended periods, and often leak when employees change jobs. Also, since they are nobody's personal responsibility and sort fo common knowledge among peers, they tend to not get the same amount of diligence as personal accounts, and are often emailed or written down in notes, files, and password managers.

A root user account is a kind of privileged account. Other privileged accounts include service accounts and system accounts.

Windows has Local Administrator and Domain Administrator accounts instead of root accounts.

A superuser account is a generic term for root accounts, Windows administrator accounts, and other similar accounts with generally unlimited privileges on systems.

(Video) What is Root Access on Android? +How To Root

Using SUDO and Other Tools to Eliminate Need for Root Accounts

Tools such as sudo can be used to grant selected users the ability to run selected commands as root. All privileged access management tools also provide this capability. All of these tools can also log the commands performed as root to give accountability into what is done as root.

Root Access

Root access means performing something using root privileges. In Linux-based systems, this means being able to do something using the user id 0, i.e., as root.

Having root access generally means being able to log into some root account on the server, or being able to run commands as root on the server, for example by using some privilege escalation tool such as sudo.

Root Privileges

The root account has root privileges. This means it can read and write any files on the system, perform operations as any user, change system configuration, install and remove software, and upgrade the operating system and/or firmware. In essence, it can do pretty much anything on the system.

It is usually preferable to use dedicated service accounts for running applications and for managing various operating system subsystems. Access to the root account should be limited to the absolute minimum number of people and uses.

SELinux and Other Ways to Limit Root Privileges

Root accounts are very powerful, and can do almost anything on a computer. Various operating systems have mechanisms for limiting what root accounts can do. Such systems are primarily used in security-sensitive enterprises with dedicated security teams and in certain military and government organizations.

SELinux is a popular tool for limiting what processes running as root can do. It is primarily targeted for limiting exposure to vulnerabilities in server processes (such as web servers). However, the administrator's shell is just a normal program, and SELinux can also be used to limit what can be done from the shell.

SELinux is also frequently used to make escaping from containers more difficult.

SELinux is included and enabled by default in Red Hat Enterprise Linux and CentOS Linux. On these systems, if root cannot access a file or perform an operation, the most common reason is that SELinux policy prevents the operation.

Apparmor is another tool similar to SELinux.

Systems utilizing multilevel security don't necessarily have a root account or its access rights may be severely limited. However, such systems are rarely used outside classified military environments.

The FreeBSD operating system has file flags, set using the chflags command, which can be used to prevent even root from performing certain operations on files.

(Video) How To Root (Almost) Any Phone in 2020!

Root User on Mac

Apple Mac also has a root account. By default, it is only used internally. To enable the root account for logins, follow these instructions.

SSH Access To Root Account

SSH (Secure Shell) is often used for logging into remote servers as root. However, the default configuration in OpenSSH prevents root login using passwords. To enable root login, change the value of the PermitRootLogin configuration option in /ssh/sshd_config.

Set-user-id Flags on Executable Files

One thing system administrators and auditors should know is that in Linux and Unix, programs can be run using a particular user id by changing the owner of the executable to that user, and setting the setuid bit in the file permissions. For example, chown root executable && chmod 4755 executable sets the executable to execute as root, regardless of who runs it. It is common for (novice) hackers to hide backdoors into systems by creating a suitable executable with the setuid bit set. This is something that is often scanned for in basic security scans.

Single User Mode and Recovering Lost Root Passwords

Single user mode is a special mode into which Linux, Unix, and Mac computers can be booted. Booting into single user mode normally requires physical access to the computer, and is typically used for recovering the root password if it has been lost or fixing the operating system or restoring data in case of some catastropic failure or corruption.

Beware that the Intel AMT firmware vulnerability may be used by attackers for booting systems into single user mode. Therefore, it is important to make sure the BIOS firmware has been upgraded on any Intel servers that have Intel Active Management Technology (AMT) enabled.

Some operating systems can be configured to require the root password in order to boot into single user mode. With those systems, it is particularly important to have the password for the root account securely stored, for example in a safe.

As long as disk encryption is not used, it is generally possible to recover a system where the root password has been lost by removing the disk from the computer, connecting it to another computer as a second disk, mounting it there, and then editing the password file on the mounted disk to clear the root password (e.g., edit /mnt/etc/shadow and copy the encrypted password for root from some other account, possibly from another computer with the same operating system).

If disk encryption is used and the disk encryption password is known, it may still be possible to mount the disk in another computer (by supplying the password using suitable tools, such as cryptsetup).

If the disk encryption key has been lost, it may be impossible to recover the system. The best option in that case is probably to reinstall the operating system and restore its data from a backup.

Rooted Devices

Rooting can also refer to escaping the privileges normally permitted for applications running on restricted devices, such as iPhones, iPads, Android phones, and tablets. The basic idea is to give you root access on your phone, so that you can install arbitrary applications, change the device's configuration, or install your own operating system.

Note that rooting your device is not supported by the manufacturer, usually exploits undocumented vulnerabilities in the operating systems, and there is no guarantee about the quality of the rooting tools or motivations of the people behind them. USE THEM AT YOUR OWN RISK! They may void your warranty, render your device inoperable, or put your data at risk.

Vendors often patch security vulnerabilities that the rooting tools exploit. Thus, the tools are very version specific. When a new version of the device or its operating system comes out, old tools may stop working. Consequently, the state of the art changes rapidly, and old articles about rooting may be out of date.

(Video) How To Root Android Phone | How to Root any Android phone | One click ROOT Easy Tutorial

Each rooting toolkit is different. Some rooting systems require a the phone to be connected to a computers; others are applications run on the device. Some may even operate wirelessly, exploiting vulnerabilities on phones. However, the vulnerabilities needed by the last method can also be used to plant malware, and such vulnerabilities are patched by manufactures as quickly as possible.

There is also a Wikipedia article on rooting that explains what it is about.

Rooting may also help free up storage space on the device. See Top Six Ways to Free Up Storage Space of Android Device.

Malware may also use the same techniques as rooting software. See 10 million Android phones infected by all-powerful auto-rooting apps.

While rooting is legal in most countries, it could be illegal in others. The US Digital Millenium Copyright Act (DMCA) apparently has an exemption allowing it. The European Copyright Directive apparently allows rooting for the purpose of installing alternative software. You should seek your own legal counsel if legality is an issue in your country.

How to Root iPhone/iPad?

In the Apple world, rooting the IOS operating system on iPhones, iPads, and other devices is usually called jailbreaking.

How to Root Android?

Tools for rooting an Android device include:

These articles may provide background information:

A few manufacturers, such LG, HTC, and Motorola have published official rooting instructions for some of their models. Google Nexus phones have a document rooting process using the fastboot oem unlock command.


FAQs

How do I make myself a root user? ›

How to get root access on Linux operating system?
  1. Please click on the lower left corner of the icon (start button).
  2. Click Terminal menu item to open the terminal.
  3. Input the command below: % sudo su –
  4. Press Enter.
  5. Your terminal prompt will become #.
  6. You now have root privleges on all operations in the terminal window.

How do I access root user on Android? ›

Guide to getting root permission without PC
  1. Grab your Android device, launch your browser, and head to the official website of iRoot. ...
  2. Get into your File Explorer, locate the downloaded iRoot apk file, and open it.
  3. Install the app and touch “Open” when the installation completes.

How do I use root account? ›

The root account is similar to any other account in that it has a username ("root") and a password. If you know root's password, you can use it to log into the root account from the command line. Enter the password once prompted for the password.

What app can root your phone? ›

There are many rooting app for android phones, and here are 5 best root apps you can use:
  • AirDroid Personal. AirDroid Personal is a highly advanced android app that allows you to remotely access and control android without root. ...
  • OneClickRoot. ...
  • Magisk manager. ...
  • SuperSU. ...
  • Fone.
Dec 13, 2022

What app do I use to root my phone? ›

Fone-Root is the best app for rooting and unrooting your device without voiding the warranty. If you want systemless rooting that allows apps that rely on Android SafetNet to continue working, consider Magisk Manager. In case you want to install a custom ROM after rooting, try Odin.

What is the default password for root user? ›

The system automatically creates a superuser named root. The root password interface provides the ability to maintain system security by changing the default password for the root user of the Unitrends system. The default password is “unitrends1”.

How do I unlock my root account? ›

In order to unlock the root account, you have to use the “usermod” command with the “-U” and specify the root account.

What is the password for root user? ›

Short answer – none. The root account is locked in Ubuntu Linux. There is no Ubuntu Linux root password set by default and you don't need one.

How to root Android phone manually without computer? ›

Step 1: Download the King Root apk on your phone and install it by following the on-screen instructions. Step 2: Launch the app and hit the One Click Root button to trigger the rooting action. Wait until the rooting progresses on the phone.

How do I know who is a root user? ›

Pure root is user id "0". Those who are root have "0" as the user id, which is the 3rd column. Those with "0" as the group (4th column) may also have some root privileges. Users listed in those groups could have some root privileges, especially via the "sudo" command.

Is root user same as admin? ›

The root account is actually the more powerful account. The administrator account is there to assist users operating in a Microsoft environment.

Can I root my device? ›

Android rooting is the ideal way to get more control over your smartphone, opening up a world of unknown possibilities, but it's important to approach it with caution. Rooting isn't without its risks — and if something goes wrong, it can void your warranty, leave you with a broken smartphone or tablet, or worse.

Why login as a root user? ›

The root user can do many things an ordinary user cannot, such as changing the ownership of files, mounting disk, formatting & restating a new file system, starting/stopping services, and binding to ports numbered below 1024 and more.

Can you root a phone using another phone? ›

The biggest hurdle to rooting is that it usually requires a computer. Things get complicated when you're trying to use a desktop operating system to exploit a mobile OS, and the connection isn't always reliable. But with the help of Magisk, you can now use one Android phone to root another.

What happens if you factory reset a rooted phone? ›

A factory data reset erases your data from the phone. While data stored in your Google Account can be restored, all apps and their data will be uninstalled. To be ready to restore your data, make sure that it's in your Google Account. Learn how to back up your data.

What does it mean to root a phone? ›

Rooting is sometimes called “jailbreaking,” as it lets the user break out of the constraints of the operating system. In the Android ecosystem, since the platform is based upon Linux permissions and file-system ownership, rooting means gaining “superuser” access.

How do I find my current root password? ›

In order to recover the password, you simply have to follow these steps:
  1. Stop the MySQL server process with the command sudo service mysql stop.
  2. Start the MySQL server with the command sudo mysqld_safe –skip-grant-tables –skip-networking &
  3. Connect to the MySQL server as the root user with the command mysql -u root.
Nov 17, 2022

How can I access root without password? ›

How to to run sudo command without a password:
  1. Gain root access: $ su - ...
  2. Backup your /etc/sudoers file by typing the following command: # cp /etc/sudoers /root/sudoers.bak.
  3. Edit the /etc/sudoers file by typing the visudo command: # visudo.
Jun 20, 2022

How do you bypass a root password? ›

Linux Guide/Reset a forgotten root password
  1. Shut down the device.
  2. Start it again. ...
  3. In the GRUB boot options, scroll down and locate the line that begins with 'linux'. ...
  4. Press Ctrl+X, or F10, to boot.
  5. You will see a root prompt. ...
  6. Set the password of any user(s) whom it is forgotten for. ...
  7. Press Ctrl+D or Ctrl+Alt+Del to exit.

Can you unlock rooted phone SIM? ›

However---and this key---unlocking the SIM does not root your phone or mobile internet-equipped tablet. Rooting your phone unlocks the bootloader, which is a different thing entirely. Rooting a phone will not carrier-unlock it, but it will let you customize the operating system or install a new one.

How do I enable root login? ›

Enable or disable remote root login
  1. To enable remote root login, enter the following command: /etc/ssh/sshd_config: PermitRootLogin yes #enabled.
  2. To disable remote root login, enter the following command: /etc/ssh/sshd_config: PermitRootLogin no #disabled.

Can you delete root account? ›

The simplest method to disable root user login is to change its shell from /bin/bash or /bin/bash (or any other shell that permits user login) to /sbin/nologin , in the /etc/passwd file, which you can open for editing using any of your favorite command line editors as shown. Save the file and close it.

What is root user number? ›

The root account is the special user in the /etc/passwd file with the user ID (UID) of 0 and is commonly given the user name, root. It is not the user name that makes the root account so special, but the UID value of 0 . This means that any user that has a UID of 0 also has the same privileges as the root user.

Can I root my phone myself? ›

Step 1: Download the King Root apk on your phone and install it by following the on-screen instructions. Step 2: Launch the app and hit the One Click Root button to trigger the rooting action. Wait until the rooting progresses on the phone.

Is it OK to root your phone? ›

The Risks of Rooting

The security model of Android is also compromised when you have root. Some malware specifically looks for root access, which allows it to really run amok. For this reason, most Android phones are not designed to be rooted.

Is it good to root your phone? ›

Rooting your Android phone brings numerous benefits that most people are unaware of. Not only does it improve your mobile phone's functioning, but it also gives you a wide variety of new features that were not available before. These advantages have been explained in this article, so do not miss out on them anymore.

Can I root my phone manually? ›

In fact, the easiest method is usually to use a simple root app. These apps let you root Android with a single tap, with some popular examples being KingRoot, KingoRoot, and OneClickRoot. Download your app of choice or access the website for more instructions.

Videos

1. What is root - Gary Explains
(Android Authority)
2. 10 Reasons To Root + How To Use Android Root (2020 WORKS)
(The Android Guy)
3. Why You SHOULDN'T Root Your Phone in 2021!
(Sam Beckman)
4. How To ROOT And UNROOT Any Android Phone | ONE TAP METHOD
(TheSilvJEFF)
5. 10 Reasons to Root Your Phone in 2022!
(Sam Beckman)
6. Root Any Android Phone.Beginner's Guide To Root (2020 WORKS)
(The Android Guy)
Top Articles
Latest Posts
Article information

Author: Patricia Veum II

Last Updated: 02/25/2023

Views: 6655

Rating: 4.3 / 5 (64 voted)

Reviews: 87% of readers found this page helpful

Author information

Name: Patricia Veum II

Birthday: 1994-12-16

Address: 2064 Little Summit, Goldieton, MS 97651-0862

Phone: +6873952696715

Job: Principal Officer

Hobby: Rafting, Cabaret, Candle making, Jigsaw puzzles, Inline skating, Magic, Graffiti

Introduction: My name is Patricia Veum II, I am a vast, combative, smiling, famous, inexpensive, zealous, sparkling person who loves writing and wants to share my knowledge and understanding with you.