How To Enable Root Account in Ubuntu?: Download PDF
How To Enable Root Account in Ubuntu?: Download PDF
0
How to enable the root account in Ubuntu? Find out this and much more in today's article.
Download
PDF
14 Dec, 21
5 min Read Tutorials
Server
1. Temporary Method
3. Command-line method
4. Conclusion
If you are a newbie, you may be scratching your head about how to enable your root account in Ubuntu! Well, for
several security purposes, the root user account is kept disabled. Before we begin, here is some preface.
When you install Ubuntu, a root account is created. The catcher here is that you do not have the provision to set the
password for the account.
Let us assist you in enabling the user account in Ubuntu! This tutorial will help you to understand several other
factors too, including how to disable the account and set up a password for your root account. Read on!
Follow the commands mentioned below to find out the root user account password details:
Output:
Output:
Here, ! signifies that the password is locked. What does this mean? Well, this means that the user does not have
This is an issue, isn’t it? Here is a solution. Following are a few steps that you must follow in order to enable the
Temporary Method
Command-Line Method
Temporary Method
You use this method when you want to temporarily enable a root account. Follow the command mentioned below:
sudo -i
Output:
Now, if you want to disable an account, just log out of the session and type the following command:
exit
Output:
Output:
Secondly, here is how you can access the root account through the graphical user interface.
As soon as you type the password, you encounter an error message. The reason is that there is a security layer in
the graphical interface that stops any login until and unless several other configuration files are configured.
This basically provides extra security. In order to log in through the graphical user interface, follow these steps and
edit the following files:
/etc/gdm3/custom.conf
/etc/pam.d/gdm-password
After editing these files, next up is to back up the following configuration files:
sudo vi /etc/gdm3/custom.conf
Moving on, write the following mentioned line under the ‘security’ textbox.
AllowRoot=true
Output:
As soon as you hunt down the following line, add ‘#’ at the beginning of that line, just as shown below.
sudo reboot -f
As you have rebooted your system, login into the root account now.
Additionally, if you want to disable the root account, simply use the following command:
Output:
Reverse whatever changes you made in the two configuration files earlier.
Command-line method
Using the command-line method, you can easily enable or disable the root account through the command line.
Here, you cannot log in through a graphical interface.
Output:
The screenshot shows that you can access the root account. Along with that, you can set the password for the root
account as well. Now, you can go to your root account by typing the following command:
su – root
Output:
Output:
To be one hundred percent sure, switch to the root account and see if the process is successful.
If you see the same message like the above image, then yes, you have successfully disabled the account as now
Conclusion
These were few methods to help you enable or disable the root account in Ubuntu
These were few methods to help you enable or disable the root account in Ubuntu.
We hope that the article solved your queries and provided you with a better understanding of the topic. If you have
any questions or suggestions, please leave them in the comment section below.
Linux
Tags:
Category: Tutorials
Server
Antoniy Yushkevych
Master of word when it comes to technology, internet and privacy. I'm also your usual guy that always aims for the best
result and takes a skateboard to work. If you need me, you will find me at the office's Counter-Strike championships on
Fridays or at a.yushkevych@monovm.com
Name (required)
Email (required)
Website
Comment ...
POST COMMENT
Dedicated server
E3-1240 V3 From $180/Monthly
Latest posts
Buy VPS
Cheap Linux VPS
Cheap Windows VPS
Address: MonoVM
Networks
Lithuania :
+370 5 205 5502
Support
Knowledgebase
About us
Contact us
FAQ
Payment Method