[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]

Re: I want to do a ISP Pam module! Can anyone help

The first one should be pretty straightforward with PAM.  The second two 
are probably best solved elsewhere.  My thoughts are below...

On Mon, 22 Jan 2001, ken rhodes wrote:
> 	Hi;
> 	For those who would like to help, or are interested. I am reading the
> PAM Documentation. I understand I have to program in C. I am just having
> a problem understanding where to start.
> What I need the module to do;
>    1) Restrict logins to having only one login at a time. ( With the
> exception of the system administration team)

   You may be able to do this with existing modules.  What you want to do
is set up a second user database that contains only the currently logged
in users, then refuse a login if the user is already in the database.  If
they're not there, add them.  This would need to be last in the stack.

>    2) Track limited accounts. Maybe even e-mail the account, or pop up a
> warning screen when they are at there limit. I need this programmable
> because right now we have 30 hour and 90 hour accounts, and we may add
> more in the future. I also need this part to email the accounting person
> with the amount these limited accounts are over for billing purposes.

   Where do you store user's monthly usage stats?  What granularity do you
need? (i.e is it enough to notify a user within 15 minutes of their going
over limit? 5 minutes? 1?)  The easiest solution I see is setting up a cron
job to query your usage stats every x minutes,  noticing who's over limit,
and notifying them and your accounting person.

   If you're not keeping usage stats, then PAM can help you do that.

>    3) I would also like this module to check to see when all of our
> phone lines are busy, and kick off people who have not done anything for
> 20 minutes or more.

   This is probably best done outside of PAM.  Write a daemon to watch your
phone lines and notice when they're all used.  Then check the output of
'w' or read /proc to find out who's been idle.  then 'kill -TERM


> >From all of my reading in the PAM modules there are no modules that fit
> in this category, but if there is a teem already working on a project
> like this I would like to start to help; Otherwise, I would like to set
> up a project team for this project.
> Thank you;
> Ken Rhodes
> Webmaster
> http://webside.ca
> _______________________________________________
> Pam-list mailing list
> Pam-list@redhat.com
> https://listman.redhat.com/mailman/listinfo/pam-list

GnuPG key available at http://devel.duluoz.net/pubkey.asc
Key ID = 1024D/9A256AE5 1999-11-13 Mike Glover <mpg4@duluoz.net>
Key fingerprint = EF6E 8BCB 4810 E98C F0FD  4596 367A 32B7 9A25 6AE5

[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index] []