def user_present(name, uid, password, channel=14, callback=False,
                link_auth=True, ipmi_msg=True, privilege_level='administrator', **kwargs):
    '''
    Ensure IPMI user and user privileges.

    name
        name of user (limit 16 bytes)

    uid
        user id number (1 to 7)

    password
        user password (limit 16 bytes)

    channel
        ipmi channel defaults to 14 for auto

    callback
        User Restricted to Callback

        False = User Privilege Limit is determined by the User Privilege Limit
            parameter privilege_level, for both callback and non-callback connections.

        True  = User Privilege Limit is determined by the privilege_level
            parameter for callback connections, but is restricted to Callback
            level for non-callback connections. Thus, a user can only initiate
            a Callback when they 'call in' to the BMC, but once the callback
            connection has been made, the user could potentially establish a
            session as an Operator.

    link_auth
        User Link authentication
        True/False
        user name and password information will be used for link
        authentication, e.g. PPP CHAP) for the given channel. Link
        authentication itself is a global setting for the channel and is
        enabled/disabled via the serial/modem configuration parameters.

    ipmi_msg
        User IPMI Messaging
        True/False
        user name and password information will be used for IPMI
        Messaging. In this case, 'IPMI Messaging' refers to the ability to
        execute generic IPMI commands that are not associated with a
        particular payload type. For example, if IPMI Messaging is disabled for
        a user, but that user is enabled for activating the SOL
        payload type, then IPMI commands associated with SOL and session
        management, such as Get SOL Configuration Parameters and Close Session
        are available, but generic IPMI commands such as Get SEL Time are
        unavailable.)
        ipmi_msg

    privilege_level
        * callback
        * user
        * operator
        * administrator
        * proprietary
        * no_access

    kwargs
        - api_host=localhost
        - api_user=admin
        - api_pass=
        - api_port=623
        - api_kg=None
    '''
    ret = {'name': name, 'result': False, 'comment': '', 'changes': {}}
    org_user = __salt__['ipmi.get_user'](uid=uid, channel=channel, **kwargs)

    change = False
    if org_user['access']['callback'] != callback:
        change = True
    if org_user['access']['link_auth'] != link_auth:
        change = True
    if org_user['access']['ipmi_msg'] != ipmi_msg:
        change = True
    if org_user['access']['privilege_level'] != privilege_level:
        change = True
    if __salt__['ipmi.set_user_password'](uid, mode='test_password',
                                          password=password, **kwargs) is False:
        change = True

    if change is False:
        ret['result'] = True
        ret['comment'] = 'user already present'
        return ret

    if __opts__['test']:
        ret['comment'] = 'would (re)create user'
        ret['result'] = None
        ret['changes'] = {'old': org_user, 'new': name}
        return ret

    __salt__['ipmi.ensure_user'](uid,
                                 name,
                                 password,
                                 channel,
                                 callback,
                                 link_auth,
                                 ipmi_msg,
                                 privilege_level,
                                 **kwargs)
    current_user = __salt__['ipmi.get_user'](uid=uid, channel=channel, **kwargs)
    ret['comment'] = '(re)created user'
    ret['result'] = True
    ret['changes'] = {'old': org_user, 'new': current_user}
    return ret
Ensure IPMI user and user privileges.

    name
        name of user (limit 16 bytes)

    uid
        user id number (1 to 7)

    password
        user password (limit 16 bytes)

    channel
        ipmi channel defaults to 14 for auto

    callback
        User Restricted to Callback

        False = User Privilege Limit is determined by the User Privilege Limit
            parameter privilege_level, for both callback and non-callback connections.

        True  = User Privilege Limit is determined by the privilege_level
            parameter for callback connections, but is restricted to Callback
            level for non-callback connections. Thus, a user can only initiate
            a Callback when they 'call in' to the BMC, but once the callback
            connection has been made, the user could potentially establish a
            session as an Operator.

    link_auth
        User Link authentication
        True/False
        user name and password information will be used for link
        authentication, e.g. PPP CHAP) for the given channel. Link
        authentication itself is a global setting for the channel and is
        enabled/disabled via the serial/modem configuration parameters.

    ipmi_msg
        User IPMI Messaging
        True/False
        user name and password information will be used for IPMI
        Messaging. In this case, 'IPMI Messaging' refers to the ability to
        execute generic IPMI commands that are not associated with a
        particular payload type. For example, if IPMI Messaging is disabled for
        a user, but that user is enabled for activating the SOL
        payload type, then IPMI commands associated with SOL and session
        management, such as Get SOL Configuration Parameters and Close Session
        are available, but generic IPMI commands such as Get SEL Time are
        unavailable.)
        ipmi_msg

    privilege_level
        * callback
        * user
        * operator
        * administrator
        * proprietary
        * no_access

    kwargs
        - api_host=localhost
        - api_user=admin
        - api_pass=
        - api_port=623
        - api_kg=None