OS Manuals

struid(3ast)

struid - return user ID number for given user name

STRUID(3ast) STRUID(3ast)

struid - return user ID number for given user name

int struid(const char* name)

struid returns the user ID number for the given user name. struid maintains an internal cache to avoid repeated password database scans by the low level getpwuid(3). On the first error for a given name, struid returns -1. Subsequent errors for the same name will result in struid returning -2 instead.

getpwent(3)

ksh 1.0.10-r36 · os · ingested 2026-09-30