home | O'Reilly's CD bookshelfs | FreeBSD | Linux | Cisco | Cisco Exam    

3.2.62 getpwnam



This function does the same thing as getpwnam (3): it translates a username to the corresponding passwd file entry. The return value in list context is:


If you want to do this repeatedly, consider caching the data in a hash (associative array) using getpwent .

In scalar context, getpwnam returns only the numeric user ID.