Files
kubernetes-the-hard-way/virtual-machines/ubuntu/root.sh
Khalifah Shabazz 59c6fd25a5 fix: Location Skip In User Changes
Updated some places where root was still used and some missing sudo's
needed to be prefixed.
2025-06-11 18:08:36 -04:00

20 lines
504 B
Bash

#!/bin/bash
# Enable root account login
# If sudo with the default vagrant SSH user is acceptable, then we may not do
# this and just update the documentation to use the vagrant user and sudo before
# commands.
# Set the root user password
echo -e "vagrant\nvagrant" | sudo passwd root
# unlock the root user
sudo passwd -u root
# Enable root SSH login
sudo sed -i 's/^#*PermitRootLogin.*/PermitRootLogin yes/' /etc/ssh/sshd_config
sudo systemctl restart sshd
echo "root account setup script done"