fixes #8498 - fixes detection of encrypted 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.

~tommy