Instructions to disable Root account on Linux

If you're a Linux user, you've probably heard the phrase 'root'. Basically root is the account that has complete control of the entire Linux system, which means that when using a root account you can change any settings on the system. This can cause extremely dangerous problems for system security, and advice if you are a 'high-end' user should use root.

Instructions to disable Root account on Linux Picture 1

For most settings on Linux, users do not have access to root accounts. On some major Linux distributions (mostly Ubuntu), even users do not have permission to set up root passwords. In fact, the manufacturer will not tell you the password. Linux users can bypass passwords using the sudo command. This temporary command allows the user to run system management tasks without a root account.

1. Why delete Root account password?

Root account deletion is a secure system security solution. Suppose a Linux computer set up a complicated user password, but a weak root password would make it easier for unauthorized people to access it and be vulnerable.

Instructions to disable Root account on Linux Picture 2

However, if the root user account has no password, it is an advantage. Without a root password means no one can login and hackers will no longer have the opportunity to gain unauthorized access to your computer.

In addition, users can still do anything on the root account with the sudo command by entering sudo -s or sudo su .

2. Delete Root password

The process of erasing Root passwords is quite simple. First open the Terminal window and assign Root access. To do this you use sudo -s . The command will allow users to access Root without having to log in to the Root account.

To delete the root password, use the following command:

passwd --lock root

Instructions to disable Root account on Linux Picture 3

The command will completely disable root login. From now on there will not be any user accounts accessible.

Alternatively, you can delete your current password and no one will know what your password is:

passwd -d root

Instructions to disable Root account on Linux Picture 4

To reactivate the root account, use the command:

sudo passwd root

Instructions to disable Root account on Linux Picture 5

The system will ask you to enter a new password in your root account that will be reactivated on the system with a new password.

Refer to some of the following articles:

  1. Anyone should know these basic Linux commands
  1. How to use Zsh (or other Shells) on Windows 10?
  1. Certain deadly commands never run on Linux

Good luck!

4.3 ★ | 6 Vote

May be interested

  • Learn the file system and folders on Linux operating systemsLearn the file system and folders on Linux operating systems
    linux and unix file systems are organized in a hierarchy similar to the structure of a hierarchical tree. the highest level of the file system is the root directory, denoted by a slash '/' (root directory).
  • How to disable USB ports on Windows, Mac and LinuxHow to disable USB ports on Windows, Mac and Linux
    now, you know that using a usb storage device on your computer has many potential security risks. if you fear the risk of being infected with malware, such as trojian, keyloggers or ransomware, you should completely disable the usb storage device if the system has a lot of sensitive data.
  • 8 ways to secure SSH server connections on Linux8 ways to secure SSH server connections on Linux
    the server root account with open ssh access may be at risk. and especially if you are using a public ip address, it will be a lot easier to hack the root password.
  • Immediately patch CWP vulnerability that allows code execution as root on Linux serversImmediately patch CWP vulnerability that allows code execution as root on Linux servers
    security researchers have discovered two new vulnerabilities affecting control web panel (cwp) software. hackers could chain these two vulnerabilities to gain remote code execution (rce) privileges as root on vulnerable linux servers.
  • How to Change the Root Password in LinuxHow to Change the Root Password in Linux
    this wikihow teaches you how to change the linux root password if you have the current password or if you don't have access to the current root password. open a terminal window. to do so, press ,https://help.ubuntu.com/community/usingthe...
  • What is the root directory?What is the root directory?
    the root directory, also called the root directory or sometimes is simply a root, of any partition is the highest directory in the hierarchy.
  • How to check if Android device is rooted or not?How to check if Android device is rooted or not?
    root checker is an application to check android devices, from the smartphone to the tablet has been rooted or not? or does root process succeed and work effectively?
  • How to switch users on the Linux command lineHow to switch users on the Linux command line
    suppose for some reason you want to switch to another user account, such as the root account to execute specific commands, the article below tipsmake will guide you how to switch users on the linux command line.
  • How to install Linux on Android doesn't need rootHow to install Linux on Android doesn't need root
    want to install linux desktop environment on android phone? read the following article to learn how to do it!
  • A comprehensive guide to root the Samsung Galaxy S7 or S7 EdgeA comprehensive guide to root the Samsung Galaxy S7 or S7 Edge
    you can use the method below to root galaxy s7 or galaxy s7 edge. however, this method does not allow you to flash custom recovery or custom roms like the root process on the exynos version, but it allows you to manipulate some other interesting experiences such as xposed installation to customize the stock rom. and even run some scripts to optimize and remove bloatware from your galaxy s7.