Return the list of all info for all users

    refresh
        Force a refresh of user information

    root
        Directory to chroot into

    CLI Example:

    .. code-block:: bash

        salt '*' user.getent

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

    refresh
        Force a refresh of user information

    root
        Directory to chroot into

    CLI Example:

    .. code-block:: bash

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

    ret = []
    if root is not None and __grains__['kernel'] != 'AIX':
        getpwall = functools.partial(_getpwall, root=root)
    else:
        getpwall = functools.partial(pwd.getpwall)

    for data in getpwall():
        ret.append(_format_info(data))
    __context__['user.getent'] = ret
    return ret