#include #include #include #include #include main( int argc, char **argv) { register struct passwd *p; int f=0; /* This used to work with IRIX 6.5.13f */ #if IRIX6_5_13 extern int _getpwent_no_yp; _getpwent_no_yp=1; #else int nobody_found=0; #endif setpwent(); while ((p = getpwent()) != NULL) { #if IRIX6_5_13 #else if (p->pw_uid==60001) { if (nobody_found) p->pw_uid=-2; else nobody_found=1; } #endif fprintf(stdout,"%s:%d\n",p->pw_name,p->pw_uid); f++; } if (0 == f) perror("getpwent"); endpwent(); setpwent(); if ((p = getpwnam("stdiis1$")) == NULL) perror("getpwnam"); else puts(p->pw_name); endpwent(); } /* main */