Get user account details

    login : string
        login name
    hashes : boolean
        include NTHASH and LMHASH in verbose output

    CLI Example:

    .. code-block:: bash

        salt '*' pdbedit.get kaylee
971362
def get_user(login, hashes=False):
    '''
    
    '''
    users = list_users(verbose=True, hashes=hashes)
    return users[login] if login in users else {}
1337028
def get_user(self, login):
        
        return youtrack.User(self._get("/admin/user/" + urlquote(login.encode('utf8'))), self)
1028824
def ParsePasswdEntry(self, line):
    """"""
    fields = ("uname", "passwd", "uid", "gid", "fullname", "homedir", "shell")
    if line:
      rslt = dict(zip(fields, line.split(":")))
      user = self.entry.setdefault(rslt["uname"], rdf_client.User())
      user.username = rslt["uname"]
      user.pw_entry.store = self.GetPwStore(rslt["passwd"])
      if user.pw_entry.store == self.base_store:
        user.pw_entry.hash_type = self.GetHashType(rslt["passwd"])
      # If the passwd file contains NIS entries they may not have uid/gid set.
      if rslt["uid"]:
        user.uid = int(rslt["uid"])
      if rslt["gid"]:
        user.gid = int(rslt["gid"])
      user.homedir = rslt["homedir"]
      user.shell = rslt["shell"]
      user.full_name = rslt["fullname"]
      # Map uid numbers to detect duplicates.
      uids = self.uids.setdefault(user.uid, set())
      uids.add(user.username)
      # Map primary group memberships to populate memberships.
      gid = self.gids.setdefault(user.gid, set())
      gid.add(user.username)
425647
def hash(self):
        '''
        
        '''
        hashed = super(_LibraryBitField, self).hash()
        return khash(hashed, self._length, self._signed, self._min_value, self._max_value)
144125
def get_login_credentials(args):
  
  if not args.username:
    args.username = raw_input("Enter Username: ")
  if not args.password:
    args.password = getpass.getpass("Enter Password: ")
1309971
def get_user_information():
    
    try:
        import pwd
        _username = pwd.getpwuid(os.getuid())[0]
        _userid = os.getuid()
        _uname = os.uname()[1]
    except ImportError:
        import getpass
        _username = getpass.getuser()
        _userid = 0
        import platform
        _uname = platform.node()

    return _username, _userid, _uname
1047086
def get_accounts(data_dir, **geth_kwargs):
    
    command, proc = spawn_geth(dict(
        data_dir=data_dir,
        suffix_args=['account', 'list'],
        **geth_kwargs
    ))
    stdoutdata, stderrdata = proc.communicate()

    if proc.returncode:
        if "no keys in store" in stderrdata.decode("utf-8"):
            return tuple()
        else:
            raise ValueError(format_error_message(
                "Error trying to list accounts",
                command,
                proc.returncode,
                stdoutdata,
                stderrdata,
            ))
    accounts = parse_geth_accounts(stdoutdata)
    return accounts
503164
def get_uid(username)
      Etc.passwd { |u| return u.uid if u.name == username }
    end
457913
def parse_userinfo(cls, userinfo):
        ''''''
        username, sep, password = userinfo.partition(':')

        return username, password
71276
def API_GET(self):  # pylint: disable=arguments-differ
        
        if self.user_manager.session_logged_in():
            return 200, {"authenticated": True, "username": self.user_manager.session_username()}
        else:
            return 200, {"authenticated": False}
277759
def get_profile(sqshrc="~/.sqshrc", connector='Sybase',
                hostname=None, username=None, password=None):
    
    if connector == 'Sybase':
        shost, suser, spass = None, None, None
        _ = lambda x: x.split("=")[-1].translate(None, "\"'").strip()
        sqshrc = op.expanduser(sqshrc)
        if op.exists(sqshrc):
            for row in open(sqshrc):
                row = row.strip()
                if not row.startswith("\\set") or "prompt" in row:
                    continue
                if "password" in row:
                    spass = _(row)
                if "hostname" in row:
                    shost = _(row)
                if "username" in row:
                    suser = _(row)
        else:
            print("[warning] file `{0}` not found".format(sqshrc), file=sys.stderr)

        if suser and spass:
            username, password = suser, spass
        if shost:
            hostname = shost

    dhost, duser, dpass = db_defaults(connector=connector)
    if not password:
        username, password = duser, dpass
    elif not username:
        username = getusername()

    if not hostname:
        hostname = dhost

    return hostname, username, password
676347
def get_user_creds(username, password):
    
    username = utils.first_true(
        [username, config["bel_api"]["servers"]["arangodb_username"]], default=""
    )
    password = utils.first_true(
        [password, config["secrets"]["bel_api"]["servers"].get("arangodb_password")],
        default="",
    )

    return username, password
700240
def _get_user_info(user=None):
    '''
    
    '''
    if not user:
        # Get user Salt runnining as
        user = __salt__['config.option']('user')

    userinfo = __salt__['user.info'](user)

    if not userinfo:
        if user == 'salt':
            # Special case with `salt` user:
            # if it doesn't exist then fall back to user Salt running as
            userinfo = _get_user_info()
        else:
            raise SaltInvocationError('User {0} does not exist'.format(user))

    return userinfo
451665
def get_password(self, service, username):
        
        result = self._get_entry(self._keyring, service, username)
        if result:
            result = self._decrypt(result)
        return result
1314587
def _get_user_hash(self):
        """"""
        if request:
            user_hash = '{ip}-{ua}'.format(ip=request.remote_addr,
                                           ua=self._get_user_agent())
            alg = hashlib.md5()
            alg.update(user_hash.encode('utf8'))
            return alg.hexdigest()
        return None
398317
def load_name(self, load):
        '''
        
        '''
        if 'eauth' not in load:
            return ''
        fstr = '{0}.auth'.format(load['eauth'])
        if fstr not in self.auth:
            return ''
        try:
            pname_arg = salt.utils.args.arg_lookup(self.auth[fstr])['args'][0]
            return load[pname_arg]
        except IndexError:
            return ''
750777
def chloginclass(name, loginclass, root=None):
    '''
    
    '''
    if loginclass == get_loginclass(name):
        return True

    cmd = ['pw', 'usermod', '-L', '{0}'.format(loginclass),
           '-n', '{0}'.format(name)]

    __salt__['cmd.run'](cmd, python_shell=False)

    return get_loginclass(name) == loginclass