How do I login as root when root login disabled?

In some Linux systems Be aware that the root account is not active by default.

You will need to do: sudo passwd root

Then go ahead to set password.

Use the root user using su root

In some Linux systems root login via SSH also disabled in /etc/ssh/sshd_config file

To enable ssh root logging, open the file /etc/ssh/sshd_config.


vi /etc/ssh/sshd_config

Search for the following line and delet the ‘#‘ at the beginning and save the file.

Port 22
PermitRootLogin yes 
PasswordAuthentication yes

To save the file

:wq

Restart

  • 1 Benutzer fanden dies hilfreich
War diese Antwort hilfreich?

Verwandte Artikel

How do I bind my additional IPs?

These instructions are for CentOS / Fedora specifically.By default, we only binds your first...

How do I run a traceroute?

Both Windows and Linux have the ability of diagnosing the health of a connection between a source...

How do I schedule FSCK to run automatically?

Using cron to schedule an FSCKBy default, a fsck is forced after 30 reboots or 180 days.To avoid...

Why is cPanel/WHM not loading?

There are two main reasons why cPanel/WHM isn't loading that we've seen.Brand New ServerIf you...

How to install cPanel on CentOS

Installation Notes A CentOS or Red Hat server that is going to have cPanel installed needs a...