std.os.users [core] std.os.users.User pub struct User { name: str, uid: int, gid: int, comment: str, home: str, shell: str, } — One user: a line of passwd(5), less its password field. std.os.users.Group pub struct Group { name: str, gid: int, members: List[str], } — One group: a line of group(5), less its password field. std.os.users.parse_user pub fn parse_user(line: str) -> User ! {parse} — One user line, parsed. std.os.users.parse_group pub fn parse_group(line: str) -> Group ! {parse} — One group line, parsed. std.os.users.users pub fn users(text: str) -> List[User] — Every user in text — the text of a passwd(5) file — in the file's order. std.os.users.groups pub fn groups(text: str) -> List[Group] — Every group in text — the text of a group(5) file — in the file's order. std.os.users.user_named pub fn user_named(text: str, name: str) -> User ! {none} — The FIRST user in text named name — what su name looks up. std.os.users.user_by_id pub fn user_by_id(text: str, uid: int) -> User ! {none} — The FIRST user in text whose id is uid — the name ls -l and id print for a number. std.os.users.group_named pub fn group_named(text: str, name: str) -> Group ! {none} — The FIRST group in text named name — what chgrp name looks up. std.os.users.group_by_id pub fn group_by_id(text: str, gid: int) -> Group ! {none} — The FIRST group in text whose id is gid. std.os.users.groups_of pub fn groups_of(text: str, name: str, gid: int) -> List[int] — The groups user name belongs to, by the group file's text: gid — the user's own group, from their User.gid — first, then the id of every group that lists name as a member, in the file's order, each id once.