From mboxrd@z Thu Jan 1 00:00:00 1970 Message-ID: <96078712011756.tru64-unix-managers.marc@archive.invalid> From: Simon Greaves Date: Fri, 19 Jun 1998 01:54:39 +0000 To: tru64-unix-managers Subject: using getprpwent(3) with C2? X-MARC-Message: https://marc.info/?l=tru64-unix-managers&m=96078712011756 I'm trying to use getprpw* to get C2 tcb structures. Compiles ok, but I get: Authentication database use not initialized first Hmm.. obviously missing something here, anyone enlighten me? What I want to do is to write something that will just give me a report of the last successful login for a given user. According to the manual page, I should be able to use getprpwnam(username) to return a pointer to a pr_passwd structure which has all the stuff I want. Does anyone know if there is a perl module to do this sort of thing? Sample program: 8<-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=- #include #include #include void main(void) { struct pr_passwd *prPasswd; /* try getting an entry by name.. */ prPasswd = getprpwnam("greaves"); } 8<-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=- Thanks, Simon -- Simon Greaves voice: (+679) 212114 Computer Centre fax: (+679) 304089 The University of the South Pacific email: greaves_s@usp.ac.fj Suva, Fiji