×


Methods to disable root account in Ubuntu 20.04 LTS Linux system

This article covers the different ways of disabling the root login in Linux. In fact, You should disable the root account and use sudo for administrative tasks because it's more secure than using su. This way, you only have to remember one password on your Linux system.

Enable and Disable Root User Account on Ubuntu 20.04 - Do it Now ?

This article covers how to enable and disable root user account in Ubuntu system. Considered the most privileged account on a Unix system, root can perform any tasks needed for system administration.

Navigating a specific folder, killing any process or deleting a directory, root is so powerful that it has to be managed properly.


In order to change the root password, you have to use the "passwd" and specify the root account:

$ sudo passwd root

After changing your password, the account will be automatically unlocked.

In order to switch to the root account, you can use the well-known "su" command without any arguments (the default account is root):

$ su - 


To restart your SSH server for the modifications to be taken into account:

$ sudo systemctl restart sshd

Complete Steps to take in order to disable ssh password login on Ubuntu to enhance security

In this article, you will learn how to disable password authentication for SSH including the root user. This will enable the server to only accept key based login and the root user can not login with password.