For the complete Mojo documentation index, see llms.txt. Markdown versions of all pages are available by appending .md to any URL (e.g. /docs/manual/basics.md).
getpwuid
def getpwuid(uid: Int) -> Passwd
Retrieve the password database entry for a given user ID.
Constraints:
This function is constrained to run on Linux or macOS operating systems only.
Args:
- uid (
Int): The user ID for which to retrieve the password database entry.
Returns:
Passwd: An object containing the user's account information, including login
name, encrypted password, user ID, group ID, real name, home directory,
and shell program.
Raises:
If the user ID does not exist or there is an error retrieving the information.