We have a problem regarding simultaneous logins.
One of our users did the following:

Logged in once using his normal username, eg. "user"
..and then logged in successfuly using the same username with additional
trailing spaces: "user    ".

When radiator writes the accounting records to the SQL online database, it
uses the original username, without the modifications made by the
RewriteUsername commands. So it thinks that the usename "user" is different
from "user   " and lets the user login more than once.

Is there some solution to this problem? Can radiator write to the online
database the final username, after all modifications?
We cannot afford not to strip the leading & trailing spaces, as we will have
tech support overload..

Of course, the same can happen if the user uses uppercase and lowercase
letters in his username and if he uses realms.
Here is the part of the conf file that does the RewriteUsername:



<Handler Realm=spark.net.gr,NAS-Port-Type=ISDN>
#               Strip the realm
        RewriteUsername         s/^([^@]+).*/$1/
#               Remove spaces from username
        RewriteUsername         s/\s+//g
#               Translates all uppercase chars to lowercase
        RewriteUsername        tr/[A-Z]/[a-z]/
#               Remove char '(' from username (causes radiator to lock)
        RewriteUsername         s/\(//g

        RejectHasReason
        SessionDatabase         SESSQL
        AuthByPolicy            ContinueWhileReject
#       AcctLogFileName         /var/adm/radacct/RADIATOR/detail

        <AuthBy SQL>
                DBSource        dbi:mysql:regcod:xxx.xxx.xxx.xxx
                DBUsername      xxxxxx
                DBAuth              xxxxxx
                AuthSelect
                AccountingStopsOnly
                AccountingTable account%m%Y
                AcctColumnDef   USERNAME,User-Name
                AcctColumnDef   ACCTSTATUSTYPE,Acct-Status-Type
                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
                AcctColumnDef   NASIDENTIFIER,NAS-IP-Address
                AcctColumnDef   NASPORT,NAS-Port,integer
                AcctColumnDef   FRAMEDIPADDRESS,Framed-IP-Address
                AcctColumnDef   CALLINGSTATIONID,Calling-Station-Id
        </AuthBy>


Thanks in advance for any help.

        _____________________________
        Nikos Aslanakis
        SPARKnet S.A. - Systems Admin
        Thessaloniki - Greece
        tel.  +30 31 868080
        http://www.spark.net.gr
        mailto:[EMAIL PROTECTED]


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