 struct  SHADOWPW {                                 /* see getpwent(3) */
     char *pw_name;
     char *pw_passwd;
     int  pw_uid;
     int  pw_gid;
     int  pw_quota;
     char *pw_comment;
     char *pw_gecos;
     char *pw_dir;
     char *pw_shell;
 };
  
 struct passwd *getpwent(), *getpwuid(), *getpwnam();

 #define NULL 0
 main()
 {
   struct passwd *p;
   int i;
   for (;1;) {;
     p=getpwent();
     if (p==NULL) return;
     printpw(p);
   }
 }
  
 printpw(a)
 struct SHADOWPW *a;
 {
   printf("%s:%s:%d:%d:%s:%s:%s\n",
      a->pw_name,a->pw_passwd,a->pw_uid,a->pw_gid,
      a->pw_gecos,a->pw_dir,a->pw_shell);
 }
