> On Thu, Oct 19, 2000 at 10:57:56AM -0400, Joseph S D Yao wrote: > > These "extensions" date back to the late 1970's and PWB Unix 1.0. They > > relate to password aging. The passwords use regular crypt(). If your > > getpw*() functions don't terminate at the comma, then you can either use > > strncmp() or replace the commas with NULs in-line [but beware of any > > other problems that may cause]. > > Since originally looking at it, I've noticed that it's easier to use > strncmp() than attempting to terminate the string in the right place. > Do you have any pointers to online sources of documentation for what > these fields are used for? > # uname -a HP-UX pehpcons B.10.20 U 9000/800 2003573131 unlimited-user license # man getpwduid getpwent(), getpwuid(), and getpwnam() locate an entry in the /etc/passwd file, and return a pointer to an object of passwd structure. The passwd structure is defined in <pwd.h> and includes the following members: char *pw_name; /* user name */ char *pw_passwd; /* encrypted password */ uid_t pw_uid; /* user id */ gid_t pw_gid; /* group id */ char *pw_age; /* password aging */ char *pw_comment;/* unused */ char *pw_gecos; /* user fullname, office, extension, homephone*/ char *pw_dir; /* initial directory */ please let me know if there is anything i could do Carlo