Root passwords that start with $ are assumed to already be hashed
The current method to "detect" whether a root_pass has been hashed is that it starts with a "$" .. If you happen to have a root password that starts with a "$" it will store it in plain text instead of hashing it, and then it will not be set correctly. The "detection" of whether a root password is hashed or not should be a bit more advanced.
fixes #9124 - fixes detection of hashed root passwords
A root password that started with "$" would not be hashed, and therefore
would end up being stored in clear text and inserted in clear text to the
/etc/shadow file, which just won't work. This adds a bit more to the match
to ensure it starts with a $, then has a number, then another $, then
any characters (salt), then another $, then some more characters. It has
been tested both ways and seems to work well.