All Users Go to the first , previous , next , last section, table of contents .
This section explains how a program can read the list of all users in the system, one user at a time. You can use the fgetpwent function to read user entries from a particular file. This function reads the next user entry from stream and returns a pointer to the entry. The structure is statically allocated and is rewritten on subsequent calls to fgetpwent . You must copy the contents of the structure if you wish to save the information.