To set the root password under a Yocto build you need to add the following code to the local.conf file located in the build/conf directory.
INHERIT += "extrausers"
EXTRA_USERS_PARAMS = "usermod -p Rbna8drt0yYLk root;"
Where the Rbna8drt0yYLk value is generated via the command
$ openssl passwd <password>