

def info(name):
    "\n    Return user information\n\n    CLI Example:\n\n    .. code-block:: bash\n\n        salt '*' user.info root\n    "
    ret = {
        
    }
    try:
        data = pwd.getpwnam(name)
        data['gid'] = data.pw_gid
        ret['groups'] = list_groups(name)
        ret['home'] = data.pw_dir
        ret['name'] = data.pw_name
        ret['passwd'] = data.pw_passwd
        ret['shell'] = data.pw_shell
        ret['uid'] = data.pw_uid
        gecos_field = data.pw_gecos.split(',', 3)
        while (len(gecos_field) < 4):
            gecos_field.append('')
        ret['fullname'] = gecos_field[0]
        ret['roomnumber'] = gecos_field[1]
        ret['workphone'] = gecos_field[2]
        ret['homephone'] = gecos_field[3]
    except KeyError:
        return {
            
        }
    return ret

dataset/ETHPy150Open saltstack/salt/salt/modules/pw_user.py info/VarMisuse@32/83 `ret`->`data`