Update: Apple fixed the issue.
But, as a System Administrator for hunderds of Macs, doing it automatically is better. So: a quick guide for JAMF Pro.
Could be useful for others:
Find Empty Root
Create an extension attribute that looks for users with empty root passwords. (Source)
RESULT=$(sudo dscl . -read /Users/root Password)
if [[ $RESULT == “Password: ********” ]]; then
elif [[ $RESULT == “Password: *” ]]; then
echo “<result>nopassword set</result>”
Scope all vulnerable devices
Create a Smart group that targets devices with nopassword or Unknown + High Sierra
Setting a password for root
This package runs a script that sets a random password to the root user + sets its environment to /usr/bin/false
Create a policy that runs the package + does an inventory update for all devices within the smart group.