Change user's password

    CLI Example:

    .. code-block:: bash

        salt dell dracr.change_password [USERNAME] [PASSWORD] uid=[OPTIONAL]
            host=<remote DRAC> admin_username=<DRAC user>
            admin_password=<DRAC PW>
        salt dell dracr.change_password diana secret

    Note that if only a username is specified then this module will look up
    details for all 16 possible DRAC users.  This is time consuming, but might
    be necessary if one is not sure which user slot contains the one you want.
    Many late-model Dell chassis have 'root' as UID 1, so if you can depend
    on that then setting the password is much quicker.
    Raises an error if the supplied password is greater than 20 chars.

def change_password(username, password, uid=None, host=None,
                    admin_username=None, admin_password=None,
                    module=None):
    '''
    Change user's password

    CLI Example:

    .. code-block:: bash

        salt dell dracr.change_password [USERNAME] [PASSWORD] uid=[OPTIONAL]
            host=<remote DRAC> admin_username=<DRAC user>
            admin_password=<DRAC PW>
        salt dell dracr.change_password diana secret

    Note that if only a username is specified then this module will look up
    details for all 16 possible DRAC users.  This is time consuming, but might
    be necessary if one is not sure which user slot contains the one you want.
    Many late-model Dell chassis have 'root' as UID 1, so if you can depend
    on that then setting the password is much quicker.
    Raises an error if the supplied password is greater than 20 chars.
    '''
    if len(password) > 20:
        raise CommandExecutionError('Supplied password should be 20 characters or less')

    if uid is None:
        user = list_users(host=host, admin_username=admin_username,
                          admin_password=admin_password, module=module)
        uid = user[username]['index']

    if uid:
        return __execute_cmd('config -g cfgUserAdmin -o '
                             'cfgUserAdminPassword -i {0} {1}'
                             .format(uid, password),
                             host=host, admin_username=admin_username,
                             admin_password=admin_password, module=module)
    else:
        log.warning('racadm: user \'%s\' does not exist', username)
        return False