How do I get the user's name from their user id number?
This is a discussion on statBuf.st_uid -> username? within the Linux Programming forums, part of the Platform Specific Boards category; How do I get the user's name from their user id number?...
How do I get the user's name from their user id number?
#include <pwd.h>
struct passwd * getpwuid(int uid)
struct passwd is
{char* pw_name;
char * pw_passwd;
.... bla bla
};see man getpwuid