def getent(refresh=False):
    '''
    Return the list of all info for all users

    :param bool refresh:
        Refresh the cached user information. Default is False. Useful when used from
        within a state function.

    :return:
        A dictionary containing information about all users on the system
    :rtype: dict

    CLI Example:

    .. code-block:: bash

        salt '*' user.getent
    '''
    if 'user.getent' in __context__ and not refresh:
        return __context__['user.getent']

    ret = []
    for user in __salt__['user.list_users']():
        stuff = {}
        user_info = __salt__['user.info'](user)

        stuff['gid'] = ''
        stuff['groups'] = user_info['groups']
        stuff['home'] = user_info['home']
        stuff['name'] = user_info['name']
        stuff['passwd'] = user_info['passwd']
        stuff['shell'] = ''
        stuff['uid'] = user_info['uid']

        ret.append(stuff)

    __context__['user.getent'] = ret
    return ret
dataset/ETHPy150Open saltstack/salt/salt/modules/win_useradd.py/getent/original