in reply to Problem with 'last' or problem with me?

Rather than assume you know where the password file is, you should loop through fetches of getpwent. On some machines the password files may be in a binary format, available through nis, or otherwise not be where you think they are. Don't add an unnecessary assumption. :-)
  • Comment on Re (tilly) 1: Problem with 'last' or problem with me?