You are viewing the article How to Get Full Privileges (Root) in Linux at Tnhelearning.edu.vn you can quickly access the necessary information in the table of contents of the article below.
This article is co-authored by a team of editors and trained researchers who confirm the accuracy and completeness of the article.
The wikiHow Content Management team carefully monitors the work of editors to ensure that every article is up to a high standard of quality.
This article has been viewed 55,016 times.
The “root” account on a Linux computer is an account with full permissions. To manipulate commands on Linux, especially those that affect system files, often we need root or privileged access. With great power, unlike normal user rights, root access should be requested only when necessary. As a result, important system files can be protected from unwanted damage.
Steps
Gain root access with terminal
- If you receive an “authentication error” message, your root account is most likely locked. Read the next section to learn how to unlock it.
- Type sudo command and press ↵ Enter (such as sudo ifconfig ). When prompted, type your user password, do not type the preferred account password.
- sudo is the preferred method with versions like Ubuntu: it works even when the root account is locked.
- This command is only for users with administrative rights. Users can be added or removed from /etc/sudoers .
Unlock root account (Ubuntu)
- sudo passwd -dl root
Log in with full control
- Using sudo or su instead of logging in with full access helps prevent unwanted damage during login. These commands give the user the opportunity to consider the command before serious harm is incurred.
- Some versions, such as Ubuntu, lock the root account until you open it yourself. This not only prevents users from accidentally doing too much harm using the root account, but also protects the system from hackers: the root account is often their first target. When locked, hackers will not be able to gain access with the root account. You can refer to the instructions on unlocking the root account on Ubuntu in the previous section.
- If you need root access to execute a certain command, use the method above.
- In many cases, the root password can just be “password”.
- If you don’t know or forget your root password, see instructions for resetting the password below.
- In Ubuntu, the root account is locked and unusable until opened.
Reset root password and admin password
- Pressing and holding the key at the right time is quite difficult, so you may have to try many times.
- mount -rw -o remount /
- Type passwd accountName and press ↵ Enter . If you want to change the root account password, type passwd root .
- Enter the new password twice when prompted.
Warning
- Use the root account only when necessary and exit as soon as you’re done.
- Only share the root account password with people A) trust, and B) need to know.
This article is co-authored by a team of editors and trained researchers who confirm the accuracy and completeness of the article.
The wikiHow Content Management team carefully monitors the work of editors to ensure that every article is up to a high standard of quality.
This article has been viewed 55,016 times.
The “root” account on a Linux computer is an account with full permissions. To manipulate commands on Linux, especially those that affect system files, we usually need root or privileged access. With great power, unlike normal usage rights, root access should be requested only when necessary. As a result, important system files can be protected from unwanted damage.
Thank you for reading this post How to Get Full Privileges (Root) in Linux at Tnhelearning.edu.vn You can comment, see more related articles below and hope to help you with interesting information.
Related Search: