Hello William -
What version of Radiator are you running? The "request" type is only
supported in Radiator 2.18 and later.
BTW - Radiator-2.18.1 was released yesterday.
hth
Hugh
On Friday 27 April 2001 01:35, William Hernandez wrote:
> Thanks Hugh,
>
> I changed to:
> AuthColumnDef 0, Time, request
>
> But I'm still not getting anything in my PostAuthHook with:
> my $p=${$_[0]};
> my $timeblock=$p->get_attr('Time');
>
> Thanks in advance,
> William
>
>
> Thu Apr 26 10:18:17 2001: DEBUG: Packet dump:
> *** Received from 208.249.78.6 port 4346 ....
> Code: Access-Request
> Identifier: 122
> Authentic: 1234567890123456
> Attributes:
> User-Name = "whr"
> Service-Type = Framed-User
> NAS-IP-Address = 203.63.154.1
> NAS-Port = 1234
> NAS-Port-Type = Async
> User-Password =
> "<146><208><238><158><247><22><144><5><164><133><228><17
> 4><1>H<30>x"
>
> Thu Apr 26 10:18:17 2001: DEBUG: Handling request with Handler
> 'Realm=DEFAULT'
> Thu Apr 26 10:18:17 2001: DEBUG: Deleting session for whr,
> 203.63.154.1, 1234
> Thu Apr 26 10:18:17 2001: DEBUG: do query is: delete from
> RADONLINE where NASIDE
> NTIFIER='203.63.154.1' and NASPORT=01234
>
> Thu Apr 26 10:18:17 2001: DEBUG: Handling with Radius::AuthFILE
> Thu Apr 26 10:18:17 2001: DEBUG: Radius::AuthFILE looks for match
> with whr
> Thu Apr 26 10:18:17 2001: DEBUG: Radius::AuthFILE looks for match
> with DEFAULT
> Thu Apr 26 10:18:17 2001: DEBUG: Handling with Radius::AuthUNIX
> Thu Apr 26 10:18:17 2001: DEBUG: Radius::AuthUNIX looks for match
> with whr
> Thu Apr 26 10:18:17 2001: DEBUG: Query is: select NASIDENTIFIER,
> NASPORT, ACCTSE
> SSIONID from RADONLINE where USERNAME='whr'
>
> Thu Apr 26 10:18:17 2001: Login OK: [whr] (home)
> Thu Apr 26 10:18:17 2001: DEBUG: Radius::AuthUNIX ACCEPT:
> Thu Apr 26 10:18:17 2001: DEBUG: Radius::AuthFILE ACCEPT:
> Thu Apr 26 10:18:17 2001: DEBUG: Handling with Radius::AuthUNIX
> Thu Apr 26 10:18:17 2001: DEBUG: Radius::AuthUNIX looks for match
> with whr
> Thu Apr 26 10:18:17 2001: Login OK: [whr] (home)
> Thu Apr 26 10:18:17 2001: DEBUG: Radius::AuthUNIX ACCEPT:
> Thu Apr 26 10:18:17 2001: DEBUG: Handling with Radius::AuthSQL
> Thu Apr 26 10:18:17 2001: DEBUG: Handling with Radius::AuthSQL
> Thu Apr 26 10:18:17 2001: DEBUG: Query is: select TIMEBLOCK from
> XSTOP where USE
> RNAME='whr'
>
> Thu Apr 26 10:18:17 2001: DEBUG: Radius::AuthSQL looks for match
> with whr
> Thu Apr 26 10:18:17 2001: DEBUG: Radius::AuthSQL ACCEPT:
> Thu Apr 26 10:18:17 2001: ERR: Invalid timeblock for user whr
> Thu Apr 26 10:18:17 2001: DEBUG: Access accepted for whr
> Thu Apr 26 10:18:17 2001: DEBUG: Packet dump:
> *** Sending to 208.249.78.6 port 4346 ....
> Code: Access-Accept
> Identifier: 122
> Authentic: 1234567890123456
> Attributes:
> Service-Type = Framed-User
> Framed-Protocol = PPP
> Framed-IP-Netmask = 255.255.255.255
> Framed-Compression = Van-Jacobson-TCP-IP
> Ascend-Idle-Limit = 900
>
>
> -----Original Message-----
> From: Hugh Irvine [mailto:[EMAIL PROTECTED]]
> Sent: Thursday, April 26, 2001 1:49 AM
> To: William Hernandez; Radiator
> Subject: Re: (RADIATOR) Important - How to do Block Time users
>
>
>
> Hello William -
>
> On Thursday 26 April 2001 01:25, William Hernandez wrote:
> > Hello everyone,
> >
> > I'm trying to follow Hugh's tips, but I'm doing something
>
> wrong.
>
> > In my radius.cfg I have:
> >
> > <AuthBy SQL>
> > Identifier TimeBlock-SQL
> > DBSource *
> > DBUsername *
> > DBAuth *
> > AuthSelect select TIMEBLOCK from XSTOP where
> > USERNAME='%n'
> > AuthColumnDef 0, Time, check
>
> This is the problem, as you are trying to do a check with this
> query. If you
> want to store the value as an attribute called "Time" in the
> request packet,
> you would do this:
>
> AuthColumnDef 0, Time, request
>
> > </AuthBy>
> > <Realm DEFAULT>
> > AuthBy Check-FILE
> > AuthBy System
> > # This AuthBy will check the Time check-item
> > AuthBy TimeBlock-SQL
> > # This hook calculates the session-timeout
> > PostAuthHook file:"/etc/raddb/setSessionTimeout"
> > AcctLogFileName /var/log/radacct/detail
> > PasswordLogFileName /var/log/radius.log
> > ExcludeFromPasswordLog root
> > </Realm>
> >
> > In my PostAuthHook I have:
> > my $timeblock=$p->get_attr('Time');
>
> See above, until you store the value from the database in the
> request packet,
> this won't work ($p is a pointer to the current request packet).
>
> > The problem is $timeblock is coming back an empty string. I
>
> can't
>
> > get the value to the PostAuthHook.
> > The "ERR: Invalid timeblock for user whr" in the radius.log
>
> comes
>
> > from the PostAuthHook.
> >
> > A Trace 4 radius.log shows:
> > Wed Apr 25 11:05:31 2001: DEBUG: Packet dump:
> > *** Received from 208.249.78.6 port 4319 ....
> > Code: Access-Request
> > Identifier: 196
> > Authentic: 1234567890123456
> > Attributes:
> > User-Name = "whr"
> > Service-Type = Framed-User
> > NAS-IP-Address = 203.63.154.1
> > NAS-Port = 1234
> > NAS-Port-Type = Async
> > User-Password =
> > "<146><208><238><158><247><22><144><5><164><133><228><17
> > 4><1>H<30>x"
> >
> > Wed Apr 25 11:05:31 2001: DEBUG: Handling request with Handler
> > 'Realm=DEFAULT'
> > Wed Apr 25 11:05:31 2001: DEBUG: Deleting session for whr,
> > 203.63.154.1, 1234
> > Wed Apr 25 11:05:31 2001: DEBUG: do query is: delete from
> > RADONLINE where NASIDE
> > NTIFIER='203.63.154.1' and NASPORT=01234
> >
> > Wed Apr 25 11:05:31 2001: DEBUG: Handling with Radius::AuthFILE
> > Wed Apr 25 11:05:31 2001: DEBUG: Radius::AuthFILE looks for
>
> match
>
> > with whr
> > Wed Apr 25 11:05:31 2001: DEBUG: Radius::AuthFILE looks for
>
> match
>
> > with DEFAULT
> > Wed Apr 25 11:05:31 2001: DEBUG: Handling with Radius::AuthUNIX
> > Wed Apr 25 11:05:31 2001: DEBUG: Radius::AuthUNIX looks for
>
> match
>
> > with whr
> > Wed Apr 25 11:05:31 2001: DEBUG: Query is: select
>
> NASIDENTIFIER,
>
> > NASPORT, ACCTSE
> > SSIONID from RADONLINE where USERNAME='whr'
> >
> > Wed Apr 25 11:05:31 2001: Login OK: [whr] (home)
> > Wed Apr 25 11:05:31 2001: DEBUG: Radius::AuthUNIX ACCEPT:
> > Wed Apr 25 11:05:31 2001: DEBUG: Radius::AuthFILE ACCEPT:
> > Wed Apr 25 11:05:31 2001: ERR: Invalid timeblock for user whr
> > Wed Apr 25 11:05:31 2001: DEBUG: Access accepted for whr
> > Wed Apr 25 11:05:31 2001: DEBUG: Packet dump:
> > *** Sending to 208.249.78.6 port 4319 ....
> > Code: Access-Accept
> > Identifier: 196
> > Authentic: 1234567890123456
> > Attributes:
> > Service-Type = Framed-User
> > Framed-Protocol = PPP
> > Framed-IP-Netmask = 255.255.255.255
> > Framed-Compression = Van-Jacobson-TCP-IP
> > Ascend-Idle-Limit = 900
>
> hth
>
> Hugh
>
> --
> Radiator: the most portable, flexible and configurable RADIUS
> server
> anywhere. Available on *NIX, *BSD, Windows 95/98/2000, NT, MacOS
> X.
> -
> Nets: internetwork inventory and management - graphical,
> extensible,
> flexible with hardware, software, platform and database
> independence.
>
>
> ===
> 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.
--
Radiator: the most portable, flexible and configurable RADIUS server
anywhere. Available on *NIX, *BSD, Windows 95/98/2000, NT, MacOS X.
-
Nets: internetwork inventory and management - graphical, extensible,
flexible with hardware, software, platform and database independence.
===
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.