Hi Richard,

In both EMERALD and PLATYPUS, the select statment is mostly hard-wired, but you
do get the chance to tweak it. The theory is that you can add extra columns to
the Emerald or Platypus tables if you wish.

In both of those modules, if you specify AuthSelect, its added to the select
statment _after_ the list of column names. You can see that in your logfile.
Your AuthSelect has been inserted after sa.TimeLeft:

select DateAdd(Day, ma.extension, maExpireDate),
DateAdd(Day, sa.extension, saExpireDate), sa.AccountID, sa.AccountType,
sa.password, sa.login, sa.shell, sa.TimeLeft
Select password, idletime, sessiontime, simuse, logontime, staticip from
subscribers where username = '%n' and status = 'A'
from masteraccounts ma, subaccounts sa
where (sa.login = 'rhawley' or sa.shell = 'rhawley')
and ma.customerid = sa.customerid
and sa.active <> 0 and ma.active <> 0

So, if you have some extra columns that you want to use as check or reply
items, you can do this. Imagine you have a new reply item column called CLASS
that you want to send back in the Class attribute:

AuthSelect      ,CLASS
AuthColumnDef   0,Class,reply

will make this happen in adition to all the usual stuff the EMERALD does.



BTW, we also got FreeTDS to work here, but we had to use the latest snapshot.
version 0.02 gave us core dumps.

I hope you are able to get on the air soon.

Cheers.

On Jun 7,  4:50pm, Richard Hawley wrote:
> Subject: (RADIATOR) Converting mysql to Platypus
> In my ongoing struggle to setup radiator to authenticate off a SQL Server and
Platypus, I have the following questions:
>
> I'm using the Authby EMERALD because we do have the Radius package add-on for
platypus.  However, I was looking at AuthbyEMERALD.pm.  Can I not specify a
custom
> select statement like the one used by AuthbySQL.pm?  Must I use the default
table structure that emerald uses?  I tried setting the AuthSelect varilable
but I am getting an error
> message in the logs.  See below:
>
> BTW, I got the FreeTDS DBD to work.  Thanks to Kevin Wormington for all the
help.
>
> <REALM blahblah>
>         AuthByPolicy ContinueWhileIgnore
>         RewriteUsername s/^([^@]+).*/$1/
>         <AuthBy EMERALD>
>           DBSource
     dbi:FreeTDS:database=somedb;host=somehostname;port=someport;
>           DBUsername    someuser
>           DBAuth        somepw
>           AuthSelect select password, idletime, sessiontime, simuse, \
>                 logontime, staticip from subscribers where username = '%n' \
>                 and status = 'A'
>           AuthColumnDef 0, User-Password, check
>           AuthColumnDef 1, Idle-Timeout, reply
>           AuthColumnDef 2, Session-Timeout, reply
>           AuthColumnDef 3, Simultaneous-Use, check
>           AuthColumnDef 4, Time, check
>         AuthColumnDef 5, Framed-IP-Address, reply
>
> In the logs, I get this
>
> Mon Jun  7 16:01:55 1999: DEBUG: Query is: select DateAdd(Day, ma.extension,
maE
> xpireDate),
> DateAdd(Day, sa.extension, saExpireDate), sa.AccountID, sa.AccountType,
> sa.password, sa.login, sa.shell, sa.TimeLeft Select password, idletime,
sessiont
> ime, simuse, logontime, staticip from subscribers where username = '%n' and
stat
> us = 'A'
> from masteraccounts ma, subaccounts sa
> where (sa.login = 'rhawley' or sa.shell = 'rhawley')
> and ma.customerid = sa.customerid
> and sa.active <> 0 and ma.active <> 0
>
> Mon Jun  7 16:01:55 1999: ERR: Execute failed for 'select DateAdd(Day,
ma.extens
> ion, maExpireDate),
> DateAdd(Day, sa.extension, saExpireDate), sa.AccountID, sa.AccountType,
> sa.password, sa.login, sa.shell, sa.TimeLeft Select password, idletime,
sessiont
> ime, simuse, logontime, staticip from subscribers where username = '%n' and
stat
> us = 'A'
> from masteraccounts ma, subaccounts sa
> where (sa.login = 'rhawley' or sa.shell = 'rhawley')
> and ma.customerid = sa.customerid
> and sa.active <> 0 and ma.active <> 0': Error processing tds packet.
 Coulnd't g
> et column information
>
> This is what leads me to believe that I cannot use the AuthSelect config
option. :(
>
> ..Rich
>
> 
>------------------------------------------------------------------------------------------------------------------------------
> Richard W. Hawley - Network Engineer                   CyberZone Internet
Services
> [EMAIL PROTECTED]                                           942 Main
Street
> http://www.cyberzone.net                                       Hartford, CT.
06103
>
>
>
> ===
> Archive at http://www.thesite.com.au/~radiator/
> To unsubscribe, email '[EMAIL PROTECTED]' with
> 'unsubscribe radiator' in the body of the message.
>-- End of excerpt from Richard Hawley



-- 
Mike McCauley                               [EMAIL PROTECTED]
Open System Consultants Pty. Ltd            Unix, Perl, Motif, C++, WWW
24 Bateman St Hampton, VIC 3188 Australia   http://www.open.com.au
Phone +61 3 9598-0985                       Fax   +61 3 9598-0955

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.

Reply via email to