Hello Christopher -
On Thu, 07 Oct 1999, Christopher Andersson wrote:
> >%_Good day,
>
> OK, Hooking:
>
Good!
> My PostAuthHook runs 3 times every time I run radpwtst. I.e. the lines
> my $username = ${$_[0]}->getAttrByNum($Radius::Radius::USER_NAME);
> print "$username\n";
> produces username 3 times on the screen.
>
> I assume once after authentication request, once after accounting
> start and once after accounting stop. Is this correct?
>
Yes, by default radpwtst will send three requests as above.
> I was also wondering, if I want to perform some action when accounting
> starts for a user, and some other when accounting stops, how would
> I do this?
> Can I somehow figure out of what type the current package is?
>
Yes, you can do this with Handler's:
<Handler Acct-Status-Type = Start>
.....
</Handler>
<Handler Acct-Status-Type = Stop>
.....
</Handler>
There may be a better way to do this depending on your exact requirements. We
can discuss this further if you wish.
>
> Another question I have is about the word USER_NAME above. I've figured
> out some more, like REPLY_MESSAGE and FRAMED_IP_NETMASK..etc.
> Where can I find a complete dictionary of things to use?
>
Have a look in the dictionary file for the list of attributes, and in
Radius/Radius.pm for the list of constants defined as above.
> And finally:
> The line:
> AcctColumnDef TIME_STAMP,Timestamp,'%Y-%m-%d %H:%M:%S'
> doesn't make anything get inserted in my mySQL database. The TIME_STAMP
> column is of type datetime and everything!
> Somebody?
You must also specify AccountingTable in your configuration file if the table
is something other than the default "ACCOUNTING":
<Handler ....>
<AuthBy SQL>
DBSource ....
DBUsername ....
DBAuth ....
AccountingTable SOMEOTHERTABLE
AcctColumnDef ....
</AuthBy>
</Handler>
You can verify what is going on by running radiusd with trace level 4 to see
what is happening:
radiusd -config_file ..... -trace 4
let me know how you get on
hth
Hugh
--
Radiator: the most portable, flexible and configurable RADIUS server
anywhere. SQL, proxy, DBM, files, LDAP, NIS+, password, NT, Emerald,
Platypus, Freeside, TACACS+, PAM, external, etc etc on Unix, Win95/8,
NT, Rhapsody
===
Archive at http://www.thesite.com.au/~radiator/
To unsubscribe, email '[EMAIL PROTECTED]' with
'unsubscribe radiator' in the body of the message.