tru64-unix-managers (formerly alpha-osf-managers) (1994-2012)
 help / color / mirror / Atom feed
From: Simon Greaves <greaves_s () usp ! ac ! fj>
To: tru64-unix-managers
Subject: using getprpwent(3) with C2?
Date: Fri, 19 Jun 1998 01:54:39 +0000	[thread overview]
Message-ID: <96078712011756.tru64-unix-managers.marc@archive.invalid> (raw)

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 <sys/types.h>
#include <sys/security.h>
#include <prot.h>

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

                 reply	other threads:[~1998-06-19  1:54 UTC|newest]

Thread overview: [no followups] expand[flat|nested]  mbox.gz  Atom feed
read-only archive

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox