Ähm, I do not see the double write:

        # write the root password
        UsersSimple.Write

        other_users = setup_all_users
        Users.Write if other_users

And  UsersSimple.Write will be called only here. Or do I oversee something ? BTH it should be named to UsersSimple.WriteRootPassword :-)