Again...

We're trying to convert from the sample radiator sql database to the sample
radmin sql database. I'm having problems specifying the AuthColumnDef stuff
properly (I think). To start with, I know I need to specify my own
AuthSelect and AuthColumnDef's when using AuthbyRADMIN if you want
additional attributes. To start out simple, I created a radmin.cfg that just
specifies the exact same AuthSelect and AuthColumnDef stuff that the
AuthRADMIN.pm does already by default. Here is the radmin.cfg that works....
(note the rest of the problem is described below the radmin.cfg text)...

=========================================
AuthPort 1812
AcctPort 1813
DictionaryFile /usr/local/etc/raddb/dictionary
PidFile  /var/run/radiusd.pid

<Log SQL>
 DBSource dbi:mysql:radmin:pearl.tseinc.com
 DBUsername xxxxxxxx
 DBAuth  xxxxxxxx
 Table  RADMESSAGES
 Trace  4
</Log>

<ClientListSQL>
 DBSource dbi:mysql:radmin:pearl.tseinc.com
 DBUsername xxxxxxxx
 DBAuth  xxxxxxxx
</ClientListSQL>

<SessionDatabase SQL>
 DBSource dbi:mysql:radmin:pearl.tseinc.com
 DBUsername xxxxxxxx
 DBAuth  xxxxxxxx
</SessionDatabase>

<Realm DEFAULT>
 <AuthBy RADMIN>
  DBSource dbi:mysql:radmin:pearl.tseinc.com
  DBUsername xxxxxxxx
  DBAuth  xxxxxxxx

  AuthSelect select PASS_WORD,STATICADDRESS,TIMELEFT,\
    MAXLOGINS \
    from RADUSERS where \
    USERNAME='%n' and BADLOGINS < 5 and \
    VALIDFROM < %t and VALIDTO > %t
  AuthColumnDef 0,User-Password,check
  AuthColumnDef 1,Framed-IP-Address,reply
  AuthColumnDef 2,Session-Timeout,reply
  AuthColumnDef 3,Simultaneous-Use,reply

  AccountingTable RADUSAGE
  AcctColumnDef USERNAME,User-Name
  AcctColumnDef TIME_STAMP,Timestamp,integer
  AcctColumnDef ACCTSTATUSTYPE,Acct-Status-Type,integer
  AcctColumnDef ACCTDELAYTIME,Acct-Delay-Time,integer
  AcctColumnDef ACCTINPUTOCTETS,Acct-Input-Octets,integer
  AcctColumnDef ACCTOUTPUTOCTETS,Acct-Output-Octets,integer
  AcctColumnDef ACCTSESSIONID,Acct-Session-Id
  AcctColumnDef ACCTSESSIONTIME,Acct-Session-Time,integer
  AcctColumnDef ACCTTERMINATECAUSE,Acct-Terminate-Cause,integer
  AcctColumnDef FRAMEDIPADDRESS,Framed-IP-Address
  AcctColumnDef NASIDENTIFIER,NAS-Identifier
  AcctColumnDef NASIDENTIFIER,NAS-IP-Address
  AcctColumnDef NASPORT,NAS-Port,integer
  AcctColumnDef DNIS,Called-Station-Id

  AcctSQLStatement update RADUSERS set
TIMELEFT=TIMELEFT-0%{Acct-Session-Time},
OCTETSINLEFT=OCTETSINLEFT-0%{Acct-Input-Octets},
OCTETSOUTLEFT=OCTETSOUTLEFT-0%{Acct-Output-Octets} where USERNAME='%n'

  AddToReply Service-Type = Framed-User, \
    Framed-Protocol = PPP,\
           Framed-Routing = None,\
           Framed-MTU = 1500,\
    Framed-Compression = Van-Jacobson-TCP-IP
 </AuthBy>
</Realm>
=========================================


The above works fine, and radpwtst works fine too. Here's the change - I
want to also pass to the NAS the Framed-IP-Netmask, as well as the above
default fields. The *ONLY* change I make to the above config file is to add
the field "FRAMED_NETMASK" to the above AuthSelect right after MAXLOGINS
(but before the \). Then I add a AuthColumnDef after the last one (ex.
AuthColumnDef 4,Framed-IP-Netmask,reply). Those two things are all I change.
Now when I run radpwtst, it tells me the user was rejected with a bad
password. I know the password is correct, because radpwtst worked with the
same userid/password combination before those two changes to radmin.cfg were
made.

HELP! I've spent days messing with this already and am getting flustered.
What am I doing wrong????

OS: FreeBSD 3.3, Radiator 2.15, Radmin 1.3. My code is freshly installed and
unmodified except one source code change. I changed the update to the log
file in LogSQL.pm to use TYPE instead of the (problematic) PRIORITY.

Thanks *VERY* much in advance!

Jay West


===
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.

Reply via email to