The Linux used by the Raspberry Pi is the Debian system, so the Raspberry Pi enable root and Debian are the same.
The root account in Debian does not have a default password, but the account is locked.
When root permission is required,
Direct execution
sudo su
You can switch to the root user.
The Raspberry Pi Default user is pi and the password is raspberry.
Re-open the root account, can be logged by the Pi user, the command line execution
sudo passwd root
Change the root password.
After executing this command, you will be prompted to enter the root password two times, enter the password you want to set, and then perform the
Open the root account.
If "Password expiry information changed" appears after execution. The Tips
is because the new version of SSH by default to turn off the root login, you can modify the SSH configuration file
sudo nano/etc/ssh/sshd_config
"Ctrl+w" shortcut key, search "Permitrootlogin Without-password", modify "Permitrootlogin Without-password" to "Permitrootlogin yes".
"Ctrl+o" shortcut key, save.
Press the carriage return again, then the "ctrl+x" shortcut key exits.
Finally with
The command restarts so that the root account can be unlocked.
Raspberry Pi Enable root account