A bug that lets anyone log in as the root user has been discovered in macOS High Sierra. To fix this, you have to change or set the root password, which you can do with an easy Terminal command. Open Terminal in
/Applications/Utilities and run:
sudo passwd -u root
First type your admin password, to run the program as root. The Terminal will output
Changing password for root. Type the password you want and press enter, then retype it and press enter again.