pwd.getpwnam()

pwd.getpwnam(name) → (pw_name,pw_passwd,pw_uid,

pw_gid,pw_gecos,pw_dir,pw_shell) Return the password database entry for the given user name. See help(pwd) for more on password database entries.