Attributes Bandwidth in radgrouprepy table

"Belén Colmenar (Grupo GOWEX)" bcolmenar at gowex.com
Mon Dec 22 18:34:20 CET 2008


My whole log debug is the next (I only have changed the MACs and IP, 
user y pass of database). I think it's correct but I don't understand 
why the sql queries are ignored by Radius ¿? or at least their aren't in 
the debug, only radcheck query

FreeRADIUS Version 2.1.3, for host i686-pc-linux-gnu, built on Dec  9 
2008 at 19:18:07
Copyright (C) 1999-2008 The FreeRADIUS server project and contributors.
There is NO warranty; not even for MERCHANTABILITY or FITNESS FOR A
PARTICULAR PURPOSE.
You may redistribute copies of FreeRADIUS under the terms of the
GNU General Public License v2.
Starting - reading configuration files ...
including configuration file /usr/local/freeradius/etc/raddb/radiusd.conf
including configuration file /usr/local/freeradius/etc/raddb/proxy.conf
including configuration file /usr/local/freeradius/etc/raddb/clients.conf
including files in directory /usr/local/freeradius/etc/raddb/modules/
including configuration file /usr/local/freeradius/etc/raddb/modules/digest
including configuration file 
/usr/local/freeradius/etc/raddb/modules/preprocess
including configuration file 
/usr/local/freeradius/etc/raddb/modules/detail.log
including configuration file /usr/local/freeradius/etc/raddb/modules/passwd
including configuration file /usr/local/freeradius/etc/raddb/modules/perl
including configuration file /usr/local/freeradius/etc/raddb/modules/echo
including configuration file /usr/local/freeradius/etc/raddb/modules/expr
including configuration file /usr/local/freeradius/etc/raddb/modules/policy
including configuration file /usr/local/freeradius/etc/raddb/modules/mschap
including configuration file /usr/local/freeradius/etc/raddb/modules/pam
including configuration file 
/usr/local/freeradius/etc/raddb/modules/checkval
including configuration file /usr/local/freeradius/etc/raddb/modules/pap
including configuration file /usr/local/freeradius/etc/raddb/modules/exec
including configuration file 
/usr/local/freeradius/etc/raddb/modules/logintime
including configuration file /usr/local/freeradius/etc/raddb/modules/linelog
including configuration file 
/usr/local/freeradius/etc/raddb/modules/sradutmp
including configuration file /usr/local/freeradius/etc/raddb/modules/mac2ip
including configuration file /usr/local/freeradius/etc/raddb/modules/krb5
including configuration file 
/usr/local/freeradius/etc/raddb/modules/detail.example.com
including configuration file /usr/local/freeradius/etc/raddb/modules/radutmp
including configuration file /usr/local/freeradius/etc/raddb/modules/counter
including configuration file /usr/local/freeradius/etc/raddb/modules/ldap
including configuration file 
/usr/local/freeradius/etc/raddb/modules/attr_filter
including configuration file /usr/local/freeradius/etc/raddb/modules/sql_log
including configuration file 
/usr/local/freeradius/etc/raddb/modules/etc_group
including configuration file /usr/local/freeradius/etc/raddb/modules/files
including configuration file 
/usr/local/freeradius/etc/raddb/modules/mac2vlan
including configuration file 
/usr/local/freeradius/etc/raddb/modules/sqlcounter_expire_on_login
including configuration file /usr/local/freeradius/etc/raddb/modules/detail
including configuration file /usr/local/freeradius/etc/raddb/modules/always
including configuration file 
/usr/local/freeradius/etc/raddb/modules/acct_unique
including configuration file /usr/local/freeradius/etc/raddb/modules/ippool
including configuration file /usr/local/freeradius/etc/raddb/modules/unix
including configuration file /usr/local/freeradius/etc/raddb/modules/wimax
including configuration file /usr/local/freeradius/etc/raddb/modules/chap
including configuration file 
/usr/local/freeradius/etc/raddb/modules/attr_rewrite
including configuration file 
/usr/local/freeradius/etc/raddb/modules/expiration
including configuration file 
/usr/local/freeradius/etc/raddb/modules/inner-eap
including configuration file /usr/local/freeradius/etc/raddb/modules/realm
including configuration file 
/usr/local/freeradius/etc/raddb/modules/smbpasswd
including configuration file /usr/local/freeradius/etc/raddb/eap.conf
including configuration file /usr/local/freeradius/etc/raddb/sql.conf
including configuration file 
/usr/local/freeradius/etc/raddb/sql/mysql/dialup.conf
including configuration file 
/usr/local/freeradius/etc/raddb/sql/mysql/counter.conf
including configuration file /usr/local/freeradius/etc/raddb/policy.conf
including files in directory /usr/local/freeradius/etc/raddb/sites-enabled/
including configuration file 
/usr/local/freeradius/etc/raddb/sites-enabled/inner-tunnel
including configuration file 
/usr/local/freeradius/etc/raddb/sites-enabled/default
including dictionary file /usr/local/freeradius/etc/raddb/dictionary
main {
        prefix = "/usr/local/freeradius"
        localstatedir = "/usr/local/freeradius/var"
        logdir = "/usr/local/freeradius/var/log/radius"
        libdir = "/usr/local/freeradius/lib"
        radacctdir = "/usr/local/freeradius/var/log/radius/radacct"
        hostname_lookups = no
        max_request_time = 30
        cleanup_delay = 5
        max_requests = 1024
        allow_core_dumps = no
        pidfile = "/usr/local/freeradius/var/run/radiusd/radiusd.pid"
        checkrad = "/usr/local/freeradius/sbin/checkrad"
        debug_level = 0
        proxy_requests = yes
 log {
        stripped_names = no
        auth = yes
        auth_badpass = yes
        auth_goodpass = yes
 }
 security {
        max_attributes = 200
        reject_delay = 1
        status_server = yes
 }
}
 client localhost {
        ipaddr = 127.0.0.1
        require_message_authenticator = no
        secret = "testing123"
        nastype = "other"
 }
 client 192.168.1.30 {
        require_message_authenticator = no
        secret = "m1kr0t1k"
        shortname = "malditaprueba"
 }
 client 192.168.1.39 {
        require_message_authenticator = no
        secret = "l1nks1s"
        shortname = "malditonas"
 }
radiusd: #### Loading Realms and Home Servers ####
 proxy server {
        retry_delay = 5
        retry_count = 3
        default_fallback = no
        dead_time = 120
        wake_all_if_all_dead = no
 }
 home_server localhost {
        ipaddr = 127.0.0.1
        port = 1812
        type = "auth"
        secret = "testing123"
        response_window = 20
        max_outstanding = 65536
        zombie_period = 40
        status_check = "status-server"
        ping_interval = 30
        check_interval = 30
        num_answers_to_alive = 3
        num_pings_to_alive = 3
        revive_interval = 120
        status_check_timeout = 4
 }
 home_server_pool my_auth_failover {
        type = fail-over
        home_server = localhost
 }
 realm example.com {
        auth_pool = my_auth_failover
 }
 realm NULL {
        authhost = LOCAL
        accthost = LOCAL
 }
 realm host.com {
        authhost = LOCAL
        accthost = LOCAL
 }
 realm host.com {
        authhost = LOCAL
        accthost = LOCAL
 } # realm host.com
 realm LOCAL {
 }
radiusd: #### Instantiating modules ####
 instantiate {
 Module: Linked to module rlm_exec
 Module: Instantiating exec
  exec {
        wait = yes
        program = "/usr/local/freeradius/etc/raddb/pre_script.sh 
%{User-Name}"
        input_pairs = "request"
        shell_escape = yes
  }
 Module: Linked to module rlm_expr
 Module: Instantiating expr
 Module: Linked to module rlm_expiration
 Module: Instantiating expiration
  expiration {
        reply-message = "Password Has Expired  "
  }
 Module: Linked to module rlm_logintime
 Module: Instantiating logintime
  logintime {
        reply-message = "You are calling outside your allowed timespan  "
        minimum-timeout = 60
  }
 }
radiusd: #### Loading Virtual Servers ####
server inner-tunnel {
 modules {
 Module: Checking authenticate {...} for more modules to load
 Module: Linked to module rlm_pap
 Module: Instantiating pap
  pap {
        encryption_scheme = "auto"
        auto_header = no
  }
 Module: Linked to module rlm_chap
 Module: Instantiating chap
 Module: Linked to module rlm_mschap
 Module: Instantiating mschap
  mschap {
        use_mppe = yes
        require_encryption = no
        require_strong = no
        with_ntdomain_hack = no
  }
 Module: Linked to module rlm_unix
 Module: Instantiating unix
  unix {
        radwtmp = "/usr/local/freeradius/var/log/radius/radwtmp"
  }
 Module: Linked to module rlm_eap
 Module: Instantiating eap
  eap {
        default_eap_type = "md5"
        timer_expire = 60
        ignore_unknown_eap_types = no
        cisco_accounting_username_bug = no
        max_sessions = 2048
  }
 Module: Linked to sub-module rlm_eap_md5
 Module: Instantiating eap-md5
 Module: Linked to sub-module rlm_eap_leap
 Module: Instantiating eap-leap
 Module: Linked to sub-module rlm_eap_gtc
 Module: Instantiating eap-gtc
   gtc {
        challenge = "Password: "
        auth_type = "PAP"
   }
 Module: Linked to sub-module rlm_eap_tls
 Module: Instantiating eap-tls
   tls {
        rsa_key_exchange = no
        dh_key_exchange = yes
        rsa_key_length = 512
        dh_key_length = 512
        verify_depth = 0
        pem_file_type = yes
        private_key_file = 
"/usr/local/freeradius/etc/raddb/certs/server.pem"
        certificate_file = 
"/usr/local/freeradius/etc/raddb/certs/server.pem"
        CA_file = "/usr/local/freeradius/etc/raddb/certs/ca.pem"
        private_key_password = "whatever"
        dh_file = "/usr/local/freeradius/etc/raddb/certs/dh"
        random_file = "/usr/local/freeradius/etc/raddb/certs/random"
        fragment_size = 1024
        include_length = yes
        check_crl = no
        cipher_list = "DEFAULT"
        make_cert_command = 
"/usr/local/freeradius/etc/raddb/certs/bootstrap"
    cache {
        enable = no
        lifetime = 24
        max_entries = 255
    }
   }
 Module: Linked to sub-module rlm_eap_ttls
 Module: Instantiating eap-ttls
   ttls {
        default_eap_type = "md5"
        copy_request_to_tunnel = no
        use_tunneled_reply = no
        virtual_server = "inner-tunnel"
   }
 Module: Linked to sub-module rlm_eap_peap
 Module: Instantiating eap-peap
   peap {
        default_eap_type = "mschapv2"
        copy_request_to_tunnel = no
        use_tunneled_reply = no
        proxy_tunneled_request_as_eap = yes
        virtual_server = "inner-tunnel"
   }
 Module: Linked to sub-module rlm_eap_mschapv2
 Module: Instantiating eap-mschapv2
   mschapv2 {
        with_ntdomain_hack = no
   }
 Module: Checking authorize {...} for more modules to load
 Module: Linked to module rlm_realm
 Module: Instantiating suffix
  realm suffix {
        format = "suffix"
        delimiter = "@"
        ignore_default = no
        ignore_null = no
  }
 Module: Linked to module rlm_files
 Module: Instantiating files
  files {
        usersfile = "/usr/local/freeradius/etc/raddb/users"
        acctusersfile = "/usr/local/freeradius/etc/raddb/acct_users"
        preproxy_usersfile = 
"/usr/local/freeradius/etc/raddb/preproxy_users"
        compat = "no"
  }
 Module: Checking session {...} for more modules to load
 Module: Linked to module rlm_radutmp
 Module: Instantiating radutmp
  radutmp {
        filename = "/usr/local/freeradius/var/log/radius/radutmp"
        username = "%{User-Name}"
        case_sensitive = yes
        check_with_nas = yes
        perm = 384
        callerid = yes
  }
 Module: Checking post-proxy {...} for more modules to load
 Module: Checking post-auth {...} for more modules to load
 Module: Linked to module rlm_attr_filter
 Module: Instantiating attr_filter.access_reject
  attr_filter attr_filter.access_reject {
        attrsfile = "/usr/local/freeradius/etc/raddb/attrs.access_reject"
        key = "%{User-Name}"
  }
 }
}
 modules {
 Module: Checking authenticate {...} for more modules to load
 Module: Checking authorize {...} for more modules to load
 Module: Linked to module rlm_preprocess
 Module: Instantiating preprocess
  preprocess {
        huntgroups = "/usr/local/freeradius/etc/raddb/huntgroups"
        hints = "/usr/local/freeradius/etc/raddb/hints"
        with_ascend_hack = no
        ascend_channels_per_line = 23
        with_ntdomain_hack = no
        with_specialix_jetstream_hack = no
        with_cisco_vsa_hack = no
        with_alvarion_vsa_hack = no
  }
 Module: Linked to module rlm_sql
 Module: Instantiating sql
  sql {
        driver = "rlm_sql_mysql"
        server = "x.x.x.x"
        port = ""
        login = "login"
        password = "pass"
        radius_db = "radius"
        read_groups = yes
        sqltrace = no
        sqltracefile = "/usr/local/freeradius/var/log/radius/sqltrace.sql"
        readclients = no
        deletestalesessions = yes
        num_sql_socks = 5
        sql_user_name = "%{User-Name}"
        default_user_profile = ""
        nas_query = "SELECT id,nasname,shortname,type,secret FROM nas"
 *       authorize_check_query = "SELECT id, username, attribute, value, 
op           FROM radcheck           WHERE username = 
'%{SQL-User-Name}'           ORDER BY id"
        authorize_group_check_query = "SELECT 
radgroupcheck.id,radgroupcheck.GroupName,radgroupcheck.Attribute,radgroupcheck.Value,radgroupcheck.op  
FROM radgroupcheck,usergroup WHERE usergroup.Username = 
'%{SQL-User-Name}' AND usergroup.GroupName = radgroupcheck.GroupName 
ORDER BY radgroupcheck.id"
        authorize_group_reply_query = "SELECT radgroupreply.id, 
radgroupreply.GroupName,radgroupreply.Attribute, 
radgroupreply.Value,radgroupreply.op FROM radgroupreply,usergroup WHERE 
usergroup.Username = '%{SQL-User-Name}' AND usergroup.GroupName = 
radgroupreply.GroupName ORDER BY radgroupreply.id"*
        accounting_onoff_query = "          UPDATE radacct           
SET              acctstoptime       =  '%S',              
acctsessiontime    =  unix_timestamp('%S') 
-                                    
unix_timestamp(acctstarttime),              acctterminatecause =  
'%{Acct-Terminate-Cause}',              acctstopdelay      =  
%{%{Acct-Delay-Time}:-0}           WHERE acctstoptime IS NULL           
AND nasipaddress      =  '%{NAS-IP-Address}'           AND 
acctstarttime     <= '%S'"
        accounting_update_query = "           UPDATE radacct           
SET              framedipaddress = '%{Framed-IP-Address}',              
acctsessiontime     = '%{Acct-Session-Time}',              
acctinputoctets     = '%{%{Acct-Input-Gigawords}:-0}'  << 32 
|                                    
'%{%{Acct-Input-Octets}:-0}',              acctoutputoctets    = 
'%{%{Acct-Output-Gigawords}:-0}' << 32 
|                                    
'%{%{Acct-Output-Octets}:-0}'           WHERE acctsessionid = 
'%{Acct-Session-Id}'           AND username        = 
'%{SQL-User-Name}'           AND nasipaddress    = '%{NAS-IP-Address}'"
        accounting_update_query_alt = "           INSERT INTO 
radacct             (acctsessionid,    acctuniqueid,      
username,              realm,            nasipaddress,      
nasportid,              nasporttype,      acctstarttime,     
acctsessiontime,              acctauthentic,    connectinfo_start, 
acctinputoctets,              acctoutputoctets, calledstationid,   
callingstationid,              servicetype,      framedprotocol,    
framedipaddress,              acctstartdelay,   
xascendsessionsvrkey)           VALUES             
('%{Acct-Session-Id}', '%{Acct-Unique-Session-Id}',              
'%{SQL-User-Name}',              '%{Realm}', '%{NAS-IP-Address}', 
'%{NAS-Port}',              '%{NAS-Port-Type}',              
DATE_SUB('%S',                       INTERVAL 
(%{%{Acct-Session-Time}:-0} +                                 
%{%{Acct-Delay-Time}:-0}) SECOND),                       
'%{Acct-Session-Time}',              '%{Acct-Authentic}', 
'',              '%{%{Acct-Input-Gigawords}:-0}' << 32 |              
'%{%{Acct-Input-Octets}:-0}',              
'%{%{Acct-Output-Gigawords}:-0}' << 32 |              
'%{%{Acct-Output-Octets}:-0}',              '%{Called-Station-Id}', 
'%{Calling-Station-Id}',              '%{Service-Type}', 
'%{Framed-Protocol}',              '%{Framed-IP-Address}',              
'0', '%{X-Ascend-Session-Svr-Key}')"
        accounting_start_query = "           INSERT INTO 
radacct             (acctsessionid,    acctuniqueid,     
username,              realm,            nasipaddress,     
nasportid,              nasporttype,      acctstarttime,    
acctstoptime,              acctsessiontime,  acctauthentic,    
connectinfo_start,              connectinfo_stop, acctinputoctets,  
acctoutputoctets,              calledstationid,  callingstationid, 
acctterminatecause,              servicetype,      framedprotocol,   
framedipaddress,              acctstartdelay,   acctstopdelay)           
VALUES             ('%{Acct-Session-Id}', 
'%{Acct-Unique-Session-Id}',              
'%{SQL-User-Name}',              '%{Realm}', '%{NAS-IP-Address}', 
'%{NAS-Port}',              '%{NAS-Port-Type}', '%S', NULL,              
'0', '%{Acct-Authentic}', '%{Connect-Info}',              '', '0', 
'0',              '%{Called-Station-Id}', '%{Calling-Station-Id}', 
'',              '%{Service-Type}', '%{Framed-Protocol}', 
'%{Framed-IP-Address}',              '%{%{Acct-Delay-Time}:-0}', '0')"
        accounting_start_query_alt = "           UPDATE radacct 
SET              acctstarttime     = '%S',              
acctstartdelay    = '%{%{Acct-Delay-Time}:-0}',              
connectinfo_start = '%{Connect-Info}'           WHERE acctsessionid  = 
'%{Acct-Session-Id}'           AND username         = 
'%{SQL-User-Name}'           AND nasipaddress     = '%{NAS-IP-Address}'"
        accounting_stop_query = "           UPDATE radacct 
SET              acctstoptime       = '%S',              
acctsessiontime    = '%{Acct-Session-Time}',              
acctinputoctets    = '%{%{Acct-Input-Octets}:-0}',              
acctoutputoctets   = '%{%{Acct-Output-Octets}:-0}',              
acctterminatecause = '%{Acct-Terminate-Cause}',              
acctstopdelay      = '%{%{Acct-Delay-Time}:-0}',              
connectinfo_stop   = '%{Connect-Info}'           WHERE acctsessionid   = 
'%{Acct-Session-Id}'           AND username          = 
'%{SQL-User-Name}'           AND nasipaddress      = '%{NAS-IP-Address}'"
        accounting_stop_query_alt = ""
        connect_failure_retry_delay = 60
        simul_count_query = ""
        simul_verify_query = "SELECT radacctid, acctsessionid, 
username,                                nasipaddress, nasportid, 
framedipaddress,                                callingstationid, 
framedprotocol                                FROM 
radacct                                WHERE username = 
'%{SQL-User-Name}'                                AND acctstoptime IS NULL"
        postauth_query = "INSERT INTO 
radpostauth                           (username, pass, reply, 
authdate)                           VALUES (                           
'%{User-Name}',                           
'%{%{User-Password}:-%{Chap-Password}}',                           
'%{reply:Packet-Type}', '%S')"
        safe-characters = 
"@abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789.-_: /"
  }
rlm_sql (sql): Driver rlm_sql_mysql (module rlm_sql_mysql) loaded and linked
rlm_sql (sql): Attempting to connect to virtual at 83.150.206.22:/radius
rlm_sql (sql): starting 0
rlm_sql (sql): Attempting to connect rlm_sql_mysql #0
rlm_sql_mysql: Starting connect to MySQL server for #0
rlm_sql (sql): Connected new DB handle, #0
rlm_sql (sql): starting 1
rlm_sql (sql): Attempting to connect rlm_sql_mysql #1
rlm_sql_mysql: Starting connect to MySQL server for #1
rlm_sql (sql): Connected new DB handle, #1
rlm_sql (sql): starting 2
rlm_sql (sql): Attempting to connect rlm_sql_mysql #2
rlm_sql_mysql: Starting connect to MySQL server for #2
rlm_sql (sql): Connected new DB handle, #2
rlm_sql (sql): starting 3
rlm_sql (sql): Attempting to connect rlm_sql_mysql #3
rlm_sql_mysql: Starting connect to MySQL server for #3
rlm_sql (sql): Connected new DB handle, #3
rlm_sql (sql): starting 4
rlm_sql (sql): Attempting to connect rlm_sql_mysql #4
rlm_sql_mysql: Starting connect to MySQL server for #4
rlm_sql (sql): Connected new DB handle, #4
 Module: Checking preacct {...} for more modules to load
 Module: Linked to module rlm_acct_unique
 Module: Instantiating acct_unique
  acct_unique {
        key = "User-Name, Acct-Session-Id, NAS-IP-Address, 
Client-IP-Address, NAS-Port"
  }
 Module: Checking accounting {...} for more modules to load
 Module: Linked to module rlm_detail
 Module: Instantiating detail
  detail {
        detailfile = 
"/usr/local/freeradius/var/log/radius/radacct/%{Client-IP-Address}/detail-%Y%m%d"
        header = "%t"
        detailperm = 384
        dirperm = 493
        locking = no
        log_packet_header = no
  }
 Module: Linked to module rlm_sql_log
 Module: Instantiating sql_log
  sql_log {
        path = "/usr/local/freeradius/var/log/radius/radacct/sql-relay"
        Post-Auth = "INSERT INTO radpostauth                     
(username, pass, reply, authdate) VALUES                        
('%{User-Name}', '%{User-Password:-Chap-Password}',              
'%{reply:Packet-Type}', '%S');"
        sql_user_name = "%{%{User-Name}:-DEFAULT}"
        safe-characters = 
"@abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789.-_: /"
  }
 Module: Instantiating attr_filter.accounting_response
  attr_filter attr_filter.accounting_response {
        attrsfile = 
"/usr/local/freeradius/etc/raddb/attrs.accounting_response"
        key = "%{User-Name}"
  }
 Module: Checking session {...} for more modules to load
 Module: Checking post-proxy {...} for more modules to load
 Module: Checking post-auth {...} for more modules to load
 }
radiusd: #### Opening IP addresses and Ports ####
listen {
        type = "auth"
        ipaddr = *
        port = 0
}
listen {
        type = "acct"
        ipaddr = *
        port = 0
}
Listening on authentication address * port 1812
Listening on accounting address * port 1813
Listening on proxy address * port 1814
Ready to process requests.
rad_recv: Access-Request packet from host 192.168.1.39 port 2050, id=0, 
length=228
        User-Name = " 'belen at host.com'"
        CHAP-Challenge = 0xc74b60a7038a719e5dd388e7a2ef8ef7
        CHAP-Password = 0x00ad5805f6c05c9c76bf8ae8e8f1bfc2dc
        NAS-IP-Address = 0.0.0.0
        Service-Type = Login-User
        Framed-IP-Address = 192.168.10.3
        Calling-Station-Id = "xx-xx-xx-xx-xx-xx"
        Called-Station-Id = "xx-xx-xx-xx-xx-xx"
        NAS-Identifier = "nas01"
        Acct-Session-Id = "490106cb00000000"
        NAS-Port-Type = Wireless-802.11
        NAS-Port = 0
        Message-Authenticator = 0xd45c77f997d85ebfa61cf1147ed8244d
        WISPr-Logoff-URL = "http://192.168.10.1:3990/logoff"
+- entering group authorize {...}
++[preprocess] returns ok
[chap] Setting 'Auth-Type := CHAP'
++[chap] returns ok
++[mschap] returns noop
[eap] No EAP-Message, not doing EAP
++[eap] returns noop
++[unix] returns notfound
[sql]   expand: %{User-Name} ->  belen at host.com
[sql] sql_set_user escaped user --> 'belen at host.com'
rlm_sql (sql): Reserving sql socket id: 4
[sql]   expand: SELECT id, username, attribute, value, op           FROM 
radcheck           WHERE username = '%{SQL-User-Name}'           ORDER 
BY id -> SELECT id, username, attribute, value, op           FROM 
radcheck           WHERE username = 'belen at host.com'           ORDER BY id
[sql] User found in radcheck table
rlm_sql (sql): Released sql socket id: 4
++[sql] returns ok
++[expiration] returns noop
++[logintime] returns noop
[pap] Found existing Auth-Type, not changing it.
++[pap] returns noop
Found Auth-Type = CHAP
+- entering group CHAP {...}
[chap] login attempt by " 'belen at host.com'" with CHAP password
[chap] Using clear text password "belen" for user  belen at host.com 
authentication.
[chap] chap user  belen at host.com authenticated succesfully
++[chap] returns ok
Login OK: [ belen at host.com/<CHAP-Password>] (from client malditonas port 
0 cli xx-xx-xx-xx-xx-xx)
+- entering group post-auth {...}
[sql]   expand: %{User-Name} ->  belen at host.com
[sql] sql_set_user escaped user --> 'belen at host.com'
[sql]   expand: %{User-Password} ->
[sql]   expand: %{Chap-Password} -> 0x00ad5805f6c05c9c76bf8ae8e8f1bfc2dc
[sql]   expand: INSERT INTO radpostauth                           
(username, pass, reply, authdate)                           VALUES 
(                           '%{User-Name}',                           
'%{%{User-Password}:-%{Chap-Password}}',                           
'%{reply:Packet-Type}', '%S') -> INSERT INTO 
radpostauth                           (username, pass, reply, 
authdate)                           VALUES (                           
'belen at host.com',                           
'0x00ad5805f6c05c9c76bf8ae8e8f1bfc2dc',                           
'Access-Accept', '2008-12-22 18:50:00')
rlm_sql (sql) in sql_postauth: query is INSERT INTO 
radpostauth                           (username, pass, reply, 
authdate)                           VALUES (                           
'belen at host.com',                           
'0x00ad5805f6c05c9c76bf8ae8e8f1bfc2dc',                           
'Access-Accept', '2008-12-22 18:50:00')
rlm_sql (sql): Reserving sql socket id: 3
rlm_sql (sql): Released sql socket id: 3
++[sql] returns ok
[sql_log] Processing sql_log_postauth
[sql_log]       expand: %{User-Name} ->  belen at host.com
[sql_log]       expand: %{%{User-Name}:-DEFAULT} ->  belen at host.com
[sql_log] sql_set_user escaped user --> 'belen at host.com'
[sql_log] WARNING: Deprecated conditional expansion ":-".  See "man 
unlang" for details
[sql_log]       expand: INSERT INTO radpostauth                          
(username, pass, reply, authdate) VALUES                        
('%{User-Name}', '%{User-Password:-Chap-Password}',              
'%{reply:Packet-Type}', '%S'); -> INSERT INTO 
radpostauth                       (username, pass, reply, authdate) 
VALUES                        ( 'belen at host.com', 
'Chap-Password',                 'Access-Accept', '2008-12-22 18:50:00');
[sql_log]       expand: 
/usr/local/freeradius/var/log/radius/radacct/sql-relay -> 
/usr/local/freeradius/var/log/radius/radacct/sql-relay
++[sql_log] returns ok
[exec]  expand: %{User-Name} ->  belen at host.com
Exec-Program output: VALOR 1(Username) ES  belen at host.com
Exec-Program-Wait: plaintext: VALOR 1(Username) ES  belen at host.com
Exec-Program: returned: 0
++[exec] returns ok
Sending Access-Accept of id 0 to 192.168.1.39 port 2050
Finished request 0.
Going to the next request
Waking up in 4.9 seconds.
rad_recv: Accounting-Request packet from host 192.168.1.39 port 2048, 
id=8, length=144
        Acct-Status-Type = Start
        User-Name = " belen at host.com"
        Calling-Station-Id = "xx-xx-xx-xx-xx-xx"
        Called-Station-Id = "xx-xx-xx-xx-xx-xx"
        NAS-Port-Type = Wireless-802.11
        NAS-Port = 0
        NAS-Port-Id = "00000000"
        NAS-IP-Address = 0.0.0.0
        NAS-Identifier = "nas01"
        Framed-IP-Address = 192.168.10.3
        Acct-Session-Id = "490106cb00000000"
+- entering group preacct {...}
++[preprocess] returns ok
[acct_unique] Hashing 'NAS-Port = 0,Client-IP-Address = 
192.168.1.39,NAS-IP-Address = 0.0.0.0,Acct-Session-Id = 
"490106cb00000000",User-Name = " belen at host.com"'
[acct_unique] Acct-Unique-Session-ID = "0b777c9c1a59f758".
++[acct_unique] returns ok
[suffix] Looking up realm "host.com" for User-Name = " belen at host.com"
[suffix] Found realm "host.com"
[suffix] Adding Stripped-User-Name = "belen"
[suffix] Adding Realm = "host.com"
[suffix] Accounting realm is LOCAL.
++[suffix] returns ok
++[files] returns noop
+- entering group accounting {...}
[detail]        expand: 
/usr/local/freeradius/var/log/radius/radacct/%{Client-IP-Address}/detail-%Y%m%d 
-> /usr/local/freeradius/var/log/radius/radacct/192.168.1.39/detail-20081222
[detail] 
/usr/local/freeradius/var/log/radius/radacct/%{Client-IP-Address}/detail-%Y%m%d 
expands to 
/usr/local/freeradius/var/log/radius/radacct/192.168.1.39/detail-20081222
[detail]        expand: %t -> Mon Dec 22 18:50:00 2008
++[detail] returns ok
[radutmp]       expand: /usr/local/freeradius/var/log/radius/radutmp -> 
/usr/local/freeradius/var/log/radius/radutmp
[radutmp]       expand: %{User-Name} ->  belen at host.com
++[radutmp] returns ok
[sql]   expand: %{User-Name} ->  belen at host.com
[sql] sql_set_user escaped user --> 'belen at host.com'
[sql]   expand: %{Acct-Delay-Time} ->
[sql]   expand:            INSERT INTO radacct             
(acctsessionid,    acctuniqueid,     username,              
realm,            nasipaddress,     nasportid,              
nasporttype,      acctstarttime,    acctstoptime,              
acctsessiontime,  acctauthentic,    connectinfo_start,              
connectinfo_stop, acctinputoctets,  acctoutputoctets,              
calledstationid,  callingstationid, acctterminatecause,              
servicetype,      framedprotocol,   framedipaddress,              
acctstartdelay,   acctstopdelay)           VALUES             
('%{Acct-Session-Id}', '%{Acct-Unique-Session-Id}',              
'%{SQL-User-Name}',              '%{Realm}', '%{NAS-IP-Address}', 
'%{NAS-Port}',              '%{NAS-Port-Type}', '%S', NULL,              
'0', '%{Acct-Authentic}', '%{Connect-Info}',              '', '0', 
'0',              '%{Called-Station-Id}', '%{Calling-Station-Id}', 
'',              '%{Service-Type}', '%{Framed-Protocol}', 
'%{Framed-IP-Address}',              '%{%{Acct-Delay-T
rlm_sql (sql): Reserving sql socket id: 2
rlm_sql (sql): Released sql socket id: 2
++[sql] returns ok
[sql_log] Processing sql_log_accounting
[sql_log]       expand: %{User-Name} ->  belen at host.com
[sql_log]       expand: %{%{User-Name}:-DEFAULT} ->  belen at host.com
[sql_log] sql_set_user escaped user --> 'belen at host.com'
[sql_log]       expand: INSERT INTO radacct (AcctSessionId, UserName,    
NASIPAddress, FramedIPAddress, AcctStartTime, AcctStopTime,     
AcctSessionTime, AcctTerminateCause) VALUES                      
('%{Acct-Session-Id}', '%{User-Name}', '%{NAS-IP-Address}',     
'%{Framed-IP-Address}', '%S', '0', '0', ''); -> INSERT INTO radacct 
(AcctSessionId, UserName,    NASIPAddress, FramedIPAddress, 
AcctStartTime, AcctStopTime,     AcctSessionTime, AcctTerminateCause) 
VALUES                     ('490106cb00000000', 'belen at host.com', 
'0.0.0.0',   '192.168.10.3', '2008-12-22 18:50:00', '0', '0', '');
[sql_log]       expand: 
/usr/local/freeradius/var/log/radius/radacct/sql-relay -> 
/usr/local/freeradius/var/log/radius/radacct/sql-relay
++[sql_log] returns ok
[attr_filter.accounting_response]       expand: %{User-Name} ->  
belen at host.com
 attr_filter: Matched entry DEFAULT at line 12
++[attr_filter.accounting_response] returns updated
Sending Accounting-Response of id 8 to 192.168.1.39 port 2048
Finished request 1.
Cleaning up request 1 ID 8 with timestamp +8
Going to the next request
Waking up in 4.9 seconds.
Cleaning up request 0 ID 0 with timestamp +8
Ready to process requests.


Thanks


Belén Colmenar (Grupo GOWEX) escribió:
>
>
> tnt at kalik.net escribió:
>>> I'm coming back with this problem.
>>>
>>> When I change "User-Password" for "Cleartext-Password", my NAS can't 
>>> connect with the Radius because NAS is sendig in CHAP mode
>>>
>>>     
>>
>> That makes no sense. Cleartext-Password works with every authentication
>> method. Encrypted ones don't.
>>   
> I don't know why didn't work but in the next times yes. Now I have put 
> Cleartext-Password.
>>  
>>> [chap] login attempt by "belen at host.com" with CHAP password
>>> [chap] Using clear text password "pass" for user belen at host.com 
>>> authentication.
>>> [chap] Password check failed
>>>     
>> ..
>>  
>>> When I set "User-Password" in the data base, again, I can connect 
>>> but with the "mistake":
>>>
>>> Found Auth-Type = CHAP
>>> !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! 
>>>
>>> !!!    Replacing User-Password in config items with 
>>> Cleartext-Password.     !!!
>>> !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! 
>>>
>>> !!! Please update your configuration so that the "known 
>>> good"               !!!
>>> !!! clear text password is in Cleartext-Password, and not in 
>>> User-Password. !!!
>>> !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! 
>>>
>>> +- entering group CHAP {...}
>>> [chap] login attempt by "belen at host.com" with CHAP password
>>> [chap] Using clear text password "pass" for user belen at hostcom 
>>> authentication.
>>> [chap] chap user belen at seasuntel.com authenticated succesfully
>>>     
>>
>> You have doctored the username (at least) in second output so there 
>> is no
>> way to see is it the same user and password. It is critical that you
>> provide debug with usernames and passwords. Use temporary test users,
>> not real ones. Also it woud help if both debugs were complete. If you
>> don't trust the list ...
>>
>>   
> Yes, both usernames are the same and I guess I haven't show all the 
> debug by space and long where important data is shown
>>> It is really wrong????
>>>
>>>     
>>
>> Can't say when you have altered the debug.
>>
>>  
>>> Besides, this could be affecting to my SQL query in radgroupreply?
>>>
>>>     
>>
>> No. Have you made changes to sql.conf apart from connection details?
>> Groups are read as default.
>>   
> Yes, I've changed SQL queries in dialup.conf and now are like that:
>
>    authorize_group_reply_query = "SELECT ${groupreply_table}.id, 
> ${groupreply_table}.GroupName,${groupreply_table}.Attribute, 
> ${groupreply_table}.Value,${groupreply_table}.op FROM 
> ${groupreply_table},${usergroup_table} WHERE 
> ${usergroup_table}.Username = '%{SQL-User-Name}' AND 
> ${usergroup_table}.GroupName = ${groupreply_table}.GroupName ORDER BY 
> ${groupreply_table}.id"
>
>    authorize_group_check_query = "SELECT 
> radgroupcheck.id,radgroupcheck.GroupName,radgroupcheck.Attribute,radgroupcheck.Value,radgroupcheck.op  
> FROM radgroupcheck,usergroup WHERE usergroup.Username = 
> '%{SQL-User-Name}' AND usergroup.GroupName = radgroupcheck.GroupName 
> ORDER BY radgroupcheck.id"
>
> -
> List info/subscribe/unsubscribe? See 
> http://www.freeradius.org/list/users.html
>
>
>

-- 




More information about the Freeradius-Users mailing list