def set_password(name, password):
    cmd = "dscl . -passwd /Users/{0} '{1}'".format(name, password)
    try:
        salt.utils.mac_utils.execute_return_success(cmd)
    except CommandExecutionError as exc:
        if 'eDSUnknownNodeName' in exc.strerror:
            raise CommandExecutionError('User not found: {0}'.format(name))
        raise CommandExecutionError('Unknown error: {0}'.format(exc.strerror))

    return True
Set the password for a named user (insecure, the password will be in the
dataset/ETHPy150Open saltstack/salt/salt/modules/mac_shadow.py/set_password