By default, the root user in Ubuntu is disabled as no password is set. Follow these instructions to enable the root user:
- Set a password for the root user:
Enter the following commands in the terminal:
sudo passwd root
Then enter and confirm the new UNIX password when prompted.
- Restrict user access to the root account:
Enter the following commands in the terminal:
vi /etc/pam.d/su
Find the line that reads "#auth required pam_wheel.so" and change it to "auth required pam_wheel.so group=adm".
Then enter:
usermod -G adm customer
- Enable root login for OpenSSH:
Enter the following commands in the terminal:
vi /etc/ssh/sshd_config
Find the line that reads "#PermitRootLogin no" and change it to "PermitRootLogin yes".
Also, find the line that reads "#PasswordAuthentication no" and change it to "PasswordAuthentication yes".
- Restart OpenSSH:
Enter the following commands in the terminal:
/etc/init.d/ssh restart
Check the status of OpenSSH:
/etc/init.d/ssh status
Note: In the above text, red text represents input commands. "customer@ubuntu:~$" is an