Hi everyone,
I'm trying to implement session and idle timers using radmin. My
understanding of "Login time left" field in the editUser.pl script is the
total login time. I need to implement a "per session" timer. I looked at
some of the examples on the archive and came up with something like this:
<AuthBy RADMIN>
Identifier CheckRADMIN
# Change DBSource, DBUsername, DBAuth for your database
# See the reference manual. You will also have to
# change the one in <SessionDatabse SQL> below
# so its the same
DBSource dbi:Pg:dbname=radmin;host=xxxxxxxxx
DBUsername radmin
DBAuth radmin
# validate based on following criteria
AuthSelect select PASS_WORD,STATICADDRESS, \
MAXLOGINS,FRAMED_NETMASK,FRAMED_FILTER_ID,MAXIDLETIME \
from RADUSERS where \
USERNAME='%n' and BADLOGINS < 5 and \
VALIDFROM < %t and VALIDTO > %t
AuthColumnDef 0,Framed-IP-Netmask,reply
AuthColumnDef 1,Filter-Id,reply
AuthColumnDef 2,Idle-Timeout,reply
AuthSelect select TIMELEFT from RADUSERS where USERNAME='%n'
AuthColumnDef 0,Session-Timeout,reply
AcctSQLStatement update RADUSERS set \
TIMELEFT=TIMELEFT-0%{Acct-Session-Time} \
where USERNAME='%n'
<snip>
</AuthBy>
I'm getting the following errors in the logfile:
Mon Nov 27 14:35:29 2000: DEBUG: Handling with Radius::AuthRADMIN
Mon Nov 27 14:35:29 2000: DEBUG: do query is: insert into RADMESSAGES
(TIME_STAMP, TYPE, MESSAGE) values (975332129, 4, 'Handling with
Radius::AuthRADMIN')
Mon Nov 27 14:35:29 2000: DEBUG: Handling with Radius::AuthRADMIN
Mon Nov 27 14:35:29 2000: DEBUG: do query is: insert into RADMESSAGES
(TIME_STAMP, TYPE, MESSAGE) values (975332129, 4, 'Handling with
Radius::AuthRADMIN')
Mon Nov 27 14:35:29 2000: DEBUG: Query is: select TIMELEFT from RADUSERS
where USERNAME='timertest'
Mon Nov 27 14:35:29 2000: DEBUG: Radius::AuthRADMIN looks for match with
timertest
Mon Nov 27 14:35:29 2000: DEBUG: do query is: insert into RADMESSAGES
(TIME_STAMP, TYPE, MESSAGE) values (975332129, 4, 'Radius::AuthRADMIN looks
for match with timertest')
Mon Nov 27 14:35:29 2000: DEBUG: Radius::AuthRADMIN REJECT: Bad Password
Mon Nov 27 14:35:29 2000: DEBUG: do query is: insert into RADMESSAGES
(TIME_STAMP, TYPE, MESSAGE) values (975332129, 4, 'Radius::AuthRADMIN
REJECT: Bad Password')
Mon Nov 27 14:35:29 2000: DEBUG: do query is: update RADUSERS set
BADLOGINS=BADLOGINS+1 where USERNAME='timertest'
Mon Nov 27 14:35:29 2000: DEBUG: Query is: select TIMELEFT from RADUSERS
where USERNAME='DEFAULT'
Mon Nov 27 14:35:29 2000: INFO: Access rejected for timertest: Bad Password
Mon Nov 27 14:35:29 2000: DEBUG: Packet dump:
*** Sending to 62.58.62.132 port 4604 ....
Code: Access-Reject
Identifier: 6
Authentic:
<22><229><1><142><129><202><248><207><153><200><189><185><132>{<140><190>
Attributes:
Framed-IP-Netmask = 255.255.255.255
Framed-IP-Address = 213.35.224.48
Reply-Message = "Request Denied"
I appreciate any help,
Lisa
>
===
Archive at http://www.starport.net/~radiator/
Announcements on [EMAIL PROTECTED]
To unsubscribe, email '[EMAIL PROTECTED]' with
'unsubscribe radiator' in the body of the message.