Some ideas
Gert Doering (gert@greenie.muc.de)
Sat, 27 Nov 1999 20:37:56 +0100
Hi,
On Sat, Nov 27, 1999 at 12:50:07PM +0200, Sarel J. Botha wrote:
> 1) I would like to use a separate file for authentication than the default
> /etc/passwd and I thought I might as well add PAM support for mgetty as
> that would enable one to use a radius server, different configuration
> files, or anything else you can code. Could someone please just give me
> a few pointers as to what the best way is to do this, as I don't want to
> enforce PAM as a dependancy on everybody.
As mgetty does not do *any* authentication *at all*, this is not something
that should be done inside mgetty.
Besides this, PAM is clearly the way to go - if you want Radius, use a
pam->radius module, if you want "text files" use the standard pam passwd
module, if you need a SQL database, use a pam->sql module, all without
changing the application at all.
> 2) When a user connects I want to run a perl script with info about the
> user that connected as args (username, speed, ip). This script then
> writes to a file that serves the same purpose as utmp/wtmp files and
> also logs the connect.
The user name is not known immediately after connect. As pppd does the
authentication, that script would have to be called from there.
> 3) I would like to record the number of bytes that were sent/recv'd when a
> connection is terminated. I believe pppd makes this quite easy.
Indeed, this is not something mgetty can do.
> 4) When the connection is terminated it again executes a perl script but
> this time it has args like: username, reason for disconnect, bytes
> transferred.
This is kinda hard, as usually there is noone to "clean up" after a
call and to run the script.
gert
--
USENET is *not* the non-clickable part of WWW!
//www.muc.de/~gert/
Gert Doering - Munich, Germany gert@greenie.muc.de
fax: +49-89-35655025 gert.doering@physik.tu-muenchen.de