--- pinky.c.old 2008-07-04 10:04:54.643837256 +0530
+++ pinky.c     2008-07-04 10:06:19.436946744 +0530
@@ -438,6 +438,7 @@
 scan_entries (size_t n, const STRUCT_UTMP *utmp_buf,
              const int argc_names, char *const argv_names[])
 {
+  int not_found_flg = 1;
   if (hard_locale (LC_TIME))
     {
       time_format = "%Y-%m-%d %H:%M";
@@ -464,15 +465,25 @@
                if (strncmp (UT_USER (utmp_buf), argv_names[i], UT_USER_SIZE)
                    == 0)
                  {
+                    not_found_flg = 0;
                    print_entry (utmp_buf);
                    break;
                  }
            }
-         else
+         else
+           {
+           not_found_flg = 0;
            print_entry (utmp_buf);
+          }
        }
       utmp_buf++;
     }
+   if (not_found_flg)
+     {
+        fprintf (stderr, _("no user found.\n"),
+             program_name);
+       exit(1);
+     }
 }
