Beefy Boxes and Bandwidth Generously Provided by pair Networks
Don't ask to ask, just ask

Re: /etc/shadow logging

by idsfa (Vicar)
on Mar 13, 2006 at 17:39 UTC ( #536318=note: print w/replies, xml ) Need Help??

in reply to /etc/shadow logging

Since Sun first suggested it, you should probably use Pluggable Authentication Modules (PAM). The C example in the documentation (warning, PDF link) shows how to add an extra layer to the password changing process. Your assignment is to wrap the API in XS so that I can use perl to develop PAM plugins ;-) (The PAM stuff on CPAN is only for using PAM, not for extending it.)

Update: Looks like there is already a logging plugin which you can download and compile (tarball link).

Update: You will want logging on the password stack, not the login stack. Other than that, traveler's node probably points you at the quickest (and most perl-y) solution. (++)

The intelligent reader will judge for himself. Without examining the facts fully and fairly, there is no way of knowing whether vox populi is really vox dei, or merely vox asinorum. — Cyrus H. Gordon

Replies are listed 'Best First'.
Re^2: /etc/shadow logging
by traveler (Parson) on Mar 13, 2006 at 19:12 UTC
    You could also use this PAM module to invoke a perl script in your login stack. That script could send the mail.

Log In?

What's my password?
Create A New User
Node Status?
node history
Node Type: note [id://536318]
[Discipulus]: from txt to array, from array to polemic, from polemic to flame?
[Corion]: Discipulus++ # profound insight
[Corion]: :-D
[Discipulus]: the very same topic was discussed in CB yesterday at lunch time
[Discipulus]: or can I ask for a module to do the back conversion from flame to txt?

How do I use this? | Other CB clients
Other Users?
Others contemplating the Monastery: (12)
As of 2017-06-23 08:00 GMT
Find Nodes?
    Voting Booth?
    How many monitors do you use while coding?

    Results (537 votes). Check out past polls.