On Tuesday 08 January 2002 17:37, Ronald Chan wrote:
> Sir I need this two categories The time the user can logon into the
> system and the time he should remain online per session !!!, Sir if
> there's a script or an external program that can't managed user's as
> well as the accounting please let me know !!! thanks
which radius do you use? i use cistron radius and even the stock version
(without any of the modifications i've made to the source) can do what
you want.
look at the users file (/etc/raddb/users). for the users whom you want to
control:
Session-Timeout = <seconds>
to specify how long you want their maximum session to be.
Login-Time="...."
to specify ranges of times that the user is allowed to go online.
see your documentation for this. for instance, to specify that a
user user can only log in between 8AM and 6PM, you could have
Login-Time = "Any0800-1800"
in there.
another common thing you might want to control is maximum seconds/hours
online per month. but that requires programming and looking in a database
to see how many hours they've been online already this month. if you
want to set session-timeout based on how many hours they have from now
to a pre-defined limit, then you would use
Exec-Program-Wait
and pass it parameters, e.g., if your program is mychecker and it takes one
parameter, the login name, you can do:
Exec-Program-Wait=/usr/local/bin/mychecker %u
the program will be run with the username as the first parameter. internally,
your program can then talk to a database and do whatever it wants.
if the user is allowed to go online, return 0. if not allowed, return any non-zero
value. if you want to dynamically specify name-value pairs (e.g., as noted above,
you might want to set Session-Timeout to something like (monthly maximum
seconds minus seconds online so far this month), then you could also just
print
Session-Timeout=3600
or whatever the value should be. if you then return 0, the name value pair
will be used instead of any name value pairs in /etc/raddb/users (or wherever
your config file is).
based on
Again, look in your documentation to see what name-value pairs are
supported. your radius might have slightly different names for Session-Timeout,
Exec-Program-Wait and Login-Time.
tiger
--
Gerald Timothy Quimpo [EMAIL PROTECTED] [EMAIL PROTECTED]
Entia non sunt multiplicanda praetere necessitatem
Mene sakhet ur seveh
_
Philippine Linux Users Group. Web site and archives at http://plug.linux.org.ph
To leave: send "unsubscribe" in the body to [EMAIL PROTECTED]
To subscribe to the Linux Newbies' List: send "subscribe" in the body to
[EMAIL PROTECTED]