CHAP faliled authenticate from users file
Hello, I'm trying to make redundant authentication if database fails to get users from files. authorize { filter_username preprocess chap mschap suffix eap { ok = return } if (Service-Type == Login-User){ files } if (Framed-Protocol == PPP){ redundant { lms files } } expiration logintime pap } With this, when I try to connect and database is well everything goes well and user is authentificated. But when I simulate problems with database (shutdown db) user cannot connect. in users file: serwis Cleartext-Password := "password" Framed-IP-Address = 1.1.1.1, Framed-IP-Netmask = 255.255.255.255, MS-Primary-DNS-Server = 8.8.4.4, MS-Secondary-DNS-Server = 8.8.8.8, Port-Limit = 1, Acct-Interim-Interval = 300, Filter-ID = "105192k/11196k", Mikrotik-Rate-Limit = "11196k/105192k" now the log: radiusd -X FreeRADIUS Version 3.0.12 Copyright (C) 1999-2016 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 For more information about these matters, see the file named COPYRIGHT Starting - reading configuration files ... including dictionary file /usr/share/freeradius/dictionary including dictionary file /usr/share/freeradius/dictionary.dhcp including dictionary file /usr/share/freeradius/dictionary.vqp including dictionary file /etc/freeradius/3.0/dictionary including configuration file /etc/freeradius/3.0/radiusd.conf including configuration file /etc/freeradius/3.0/proxy.conf including configuration file /etc/freeradius/3.0/clients.conf including files in directory /etc/freeradius/3.0/mods-enabled/ including configuration file /etc/freeradius/3.0/mods-enabled/passwd including configuration file /etc/freeradius/3.0/mods-enabled/lineloglms including configuration file /etc/freeradius/3.0/mods-enabled/echo including configuration file /etc/freeradius/3.0/mods-enabled/soh including configuration file /etc/freeradius/3.0/mods-enabled/radutmp including configuration file /etc/freeradius/3.0/mods-enabled/pap including configuration file /etc/freeradius/3.0/mods-enabled/digest including configuration file /etc/freeradius/3.0/mods-enabled/logintime including configuration file /etc/freeradius/3.0/mods-enabled/expiration including configuration file /etc/freeradius/3.0/mods-enabled/unpack including configuration file /etc/freeradius/3.0/mods-enabled/utf8 including configuration file /etc/freeradius/3.0/mods-enabled/always including configuration file /etc/freeradius/3.0/mods-enabled/exec including configuration file /etc/freeradius/3.0/mods-enabled/unix including configuration file /etc/freeradius/3.0/mods-enabled/mschap including configuration file /etc/freeradius/3.0/mods-enabled/realm including configuration file /etc/freeradius/3.0/mods-enabled/dynamic_clients including configuration file /etc/freeradius/3.0/mods-enabled/linelog including configuration file /etc/freeradius/3.0/mods-enabled/ntlm_auth including configuration file /etc/freeradius/3.0/mods-enabled/detail.log including configuration file /etc/freeradius/3.0/mods-enabled/eap including configuration file /etc/freeradius/3.0/mods-enabled/replicate including configuration file /etc/freeradius/3.0/mods-enabled/sradutmp including configuration file /etc/freeradius/3.0/mods-enabled/cache_eap including configuration file /etc/freeradius/3.0/mods-enabled/chap including configuration file /etc/freeradius/3.0/mods-enabled/attr_filter including configuration file /etc/freeradius/3.0/mods-enabled/detail including configuration file /etc/freeradius/3.0/mods-enabled/expr including configuration file /etc/freeradius/3.0/mods-enabled/lms including configuration file /etc/freeradius/3.0/mods-enabled/files including configuration file /etc/freeradius/3.0/mods-enabled/preprocess including files in directory /etc/freeradius/3.0/policy.d/ including configuration file /etc/freeradius/3.0/policy.d/control including configuration file /etc/freeradius/3.0/policy.d/moonshot-targeted-ids including configuration file /etc/freeradius/3.0/policy.d/canonicalization including configuration file /etc/freeradius/3.0/policy.d/cui including configuration file /etc/freeradius/3.0/policy.d/filter including configuration file /etc/freeradius/3.0/policy.d/eap including configuration file /etc/freeradius/3.0/policy.d/debug including configuration file /etc/freeradius/3.0/policy.d/accounting including configuration file /etc/freeradius/3.0/policy.d/abfab-tr including configuration file /etc/freeradius/3.0/policy.d/operator-name including configuration file /etc/freeradius/3.0/policy.d/dhcp including files in directory /etc/freeradius/3.0/sites-enabled/ including configuration file /etc/freeradius/3.0/sites-enabled/lms main { security { user = "freerad" group = "freerad" allow_core_dumps = no } name = "freeradius" prefix = "/usr" localstatedir = "/var" logdir = "/var/log/freeradius" run_dir = "/var/run/freeradius" } main { name = "freeradius" prefix = "/usr" localstatedir = "/var" sbindir = "/usr/sbin" logdir = "/var/log/freeradius" run_dir = "/var/run/freeradius" libdir = "/usr/lib/freeradius" radacctdir = "/var/log/freeradius/radacct" hostname_lookups = no max_request_time = 30 cleanup_delay = 5 max_requests = 16384 pidfile = "/var/run/freeradius/freeradius.pid" checkrad = "/usr/sbin/checkrad" debug_level = 0 proxy_requests = no log { stripped_names = no auth = no auth_badpass = no auth_goodpass = no colourise = yes msg_denied = "You are already logged in - access denied" } resources { } security { max_attributes = 200 reject_delay = 1.000000 status_server = yes } } 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 = <<< secret >>> response_window = 20.000000 response_timeouts = 1 max_outstanding = 65536 zombie_period = 40 status_check = "status-server" ping_interval = 30 check_interval = 30 check_timeout = 4 num_answers_to_alive = 3 revive_interval = 120 limit { max_connections = 16 max_requests = 0 lifetime = 0 idle_timeout = 0 } coa { irt = 2 mrt = 16 mrc = 5 mrd = 30 } } home_server_pool my_auth_failover { type = fail-over home_server = localhost } realm example.com { auth_pool = my_auth_failover } realm LOCAL { } radiusd: #### Loading Clients #### client localhost { ipaddr = 127.0.0.1 require_message_authenticator = no secret = <<< secret >>> nas_type = "other" proto = "*" limit { max_connections = 16 lifetime = 0 idle_timeout = 30 } } client localhost_ipv6 { ipv6addr = ::1 require_message_authenticator = no secret = <<< secret >>> limit { max_connections = 16 lifetime = 0 idle_timeout = 30 } } client localNas { ipaddr = 10.5.5.0/16 require_message_authenticator = no secret = <<< secret >>> limit { max_connections = 16 lifetime = 0 idle_timeout = 30 } } client local2Nas { ipaddr = 10.10.1.0/16 require_message_authenticator = no secret = <<< secret >>> limit { max_connections = 16 lifetime = 0 idle_timeout = 30 } } Debugger not attached # Creating Auth-Type = mschap # Creating Auth-Type = eap # Creating Auth-Type = PAP # Creating Auth-Type = CHAP # Creating Auth-Type = MS-CHAP radiusd: #### Instantiating modules #### modules { # Loaded module rlm_passwd # Loading module "etc_passwd" from file /etc/freeradius/3.0/mods-enabled/passwd passwd etc_passwd { filename = "/etc/passwd" format = "*User-Name:Crypt-Password:" delimiter = ":" ignore_nislike = no ignore_empty = yes allow_multiple_keys = no hash_size = 100 } # Loaded module rlm_linelog # Loading module "lineloglms" from file /etc/freeradius/3.0/mods-enabled/lineloglms linelog lineloglms { filename = "/var/log/freeradius/linelog" escape_filenames = no syslog_severity = "info" permissions = 384 format = "%T This is a log message for %{User-Name}" reference = "Accounting-Request.%{%{Acct-Status-Type}:-unknown}" } # Loaded module rlm_exec # Loading module "echo" from file /etc/freeradius/3.0/mods-enabled/echo exec echo { wait = yes program = "/bin/echo %{User-Name}" input_pairs = "request" output_pairs = "reply" shell_escape = yes } # Loaded module rlm_soh # Loading module "soh" from file /etc/freeradius/3.0/mods-enabled/soh soh { dhcp = yes } # Loaded module rlm_radutmp # Loading module "radutmp" from file /etc/freeradius/3.0/mods-enabled/radutmp radutmp { filename = "/var/log/freeradius/radutmp" username = "%{User-Name}" case_sensitive = yes check_with_nas = yes permissions = 384 caller_id = yes } # Loaded module rlm_pap # Loading module "pap" from file /etc/freeradius/3.0/mods-enabled/pap pap { normalise = yes } # Loaded module rlm_digest # Loading module "digest" from file /etc/freeradius/3.0/mods-enabled/digest # Loaded module rlm_logintime # Loading module "logintime" from file /etc/freeradius/3.0/mods-enabled/logintime logintime { minimum_timeout = 60 } # Loaded module rlm_expiration # Loading module "expiration" from file /etc/freeradius/3.0/mods-enabled/expiration # Loaded module rlm_unpack # Loading module "unpack" from file /etc/freeradius/3.0/mods-enabled/unpack # Loaded module rlm_utf8 # Loading module "utf8" from file /etc/freeradius/3.0/mods-enabled/utf8 # Loaded module rlm_always # Loading module "reject" from file /etc/freeradius/3.0/mods-enabled/always always reject { rcode = "reject" simulcount = 0 mpp = no } # Loading module "fail" from file /etc/freeradius/3.0/mods-enabled/always always fail { rcode = "fail" simulcount = 0 mpp = no } # Loading module "ok" from file /etc/freeradius/3.0/mods-enabled/always always ok { rcode = "ok" simulcount = 0 mpp = no } # Loading module "handled" from file /etc/freeradius/3.0/mods-enabled/always always handled { rcode = "handled" simulcount = 0 mpp = no } # Loading module "invalid" from file /etc/freeradius/3.0/mods-enabled/always always invalid { rcode = "invalid" simulcount = 0 mpp = no } # Loading module "userlock" from file /etc/freeradius/3.0/mods-enabled/always always userlock { rcode = "userlock" simulcount = 0 mpp = no } # Loading module "notfound" from file /etc/freeradius/3.0/mods-enabled/always always notfound { rcode = "notfound" simulcount = 0 mpp = no } # Loading module "noop" from file /etc/freeradius/3.0/mods-enabled/always always noop { rcode = "noop" simulcount = 0 mpp = no } # Loading module "updated" from file /etc/freeradius/3.0/mods-enabled/always always updated { rcode = "updated" simulcount = 0 mpp = no } # Loading module "exec" from file /etc/freeradius/3.0/mods-enabled/exec exec { wait = no input_pairs = "request" shell_escape = yes timeout = 10 } # Loaded module rlm_unix # Loading module "unix" from file /etc/freeradius/3.0/mods-enabled/unix unix { radwtmp = "/var/log/freeradius/radwtmp" } Creating attribute Unix-Group # Loaded module rlm_mschap # Loading module "mschap" from file /etc/freeradius/3.0/mods-enabled/mschap mschap { use_mppe = yes require_encryption = no require_strong = no with_ntdomain_hack = yes passchange { } allow_retry = yes } # Loaded module rlm_realm # Loading module "IPASS" from file /etc/freeradius/3.0/mods-enabled/realm realm IPASS { format = "prefix" delimiter = "/" ignore_default = no ignore_null = no } # Loading module "suffix" from file /etc/freeradius/3.0/mods-enabled/realm realm suffix { format = "suffix" delimiter = "@" ignore_default = no ignore_null = no } # Loading module "realmpercent" from file /etc/freeradius/3.0/mods-enabled/realm realm realmpercent { format = "suffix" delimiter = "%" ignore_default = no ignore_null = no } # Loading module "ntdomain" from file /etc/freeradius/3.0/mods-enabled/realm realm ntdomain { format = "prefix" delimiter = "\\" ignore_default = no ignore_null = no } # Loaded module rlm_dynamic_clients # Loading module "dynamic_clients" from file /etc/freeradius/3.0/mods-enabled/dynamic_clients # Loading module "linelog" from file /etc/freeradius/3.0/mods-enabled/linelog linelog { filename = "/var/log/freeradius/linelog" escape_filenames = no syslog_severity = "info" permissions = 384 format = "This is a log message for %{User-Name}" reference = "messages.%{%{reply:Packet-Type}:-default}" } # Loading module "log_accounting" from file /etc/freeradius/3.0/mods-enabled/linelog linelog log_accounting { filename = "/var/log/freeradius/linelog-accounting" escape_filenames = no syslog_severity = "info" permissions = 384 format = "" reference = "Accounting-Request.%{%{Acct-Status-Type}:-unknown}" } # Loading module "ntlm_auth" from file /etc/freeradius/3.0/mods-enabled/ntlm_auth exec ntlm_auth { wait = yes program = "/path/to/ntlm_auth --request-nt-key --domain=MYDOMAIN --username=%{mschap:User-Name} --password=%{User-Password}" shell_escape = yes } # Loaded module rlm_detail # Loading module "auth_log" from file /etc/freeradius/3.0/mods-enabled/detail.log detail auth_log { filename = "/var/log/freeradius/radacct/%{%{Packet-Src-IP-Address}:-%{Packet-Src-IPv6-Address}}/auth-detail-%Y%m%d" header = "%t" permissions = 384 locking = no escape_filenames = no log_packet_header = no } # Loading module "reply_log" from file /etc/freeradius/3.0/mods-enabled/detail.log detail reply_log { filename = "/var/log/freeradius/radacct/%{%{Packet-Src-IP-Address}:-%{Packet-Src-IPv6-Address}}/reply-detail-%Y%m%d" header = "%t" permissions = 384 locking = no escape_filenames = no log_packet_header = no } # Loading module "pre_proxy_log" from file /etc/freeradius/3.0/mods-enabled/detail.log detail pre_proxy_log { filename = "/var/log/freeradius/radacct/%{%{Packet-Src-IP-Address}:-%{Packet-Src-IPv6-Address}}/pre-proxy-detail-%Y%m%d" header = "%t" permissions = 384 locking = no escape_filenames = no log_packet_header = no } # Loading module "post_proxy_log" from file /etc/freeradius/3.0/mods-enabled/detail.log detail post_proxy_log { filename = "/var/log/freeradius/radacct/%{%{Packet-Src-IP-Address}:-%{Packet-Src-IPv6-Address}}/post-proxy-detail-%Y%m%d" header = "%t" permissions = 384 locking = no escape_filenames = no log_packet_header = no } # Loaded module rlm_eap # Loading module "eap" from file /etc/freeradius/3.0/mods-enabled/eap eap { default_eap_type = "md5" timer_expire = 60 ignore_unknown_eap_types = no cisco_accounting_username_bug = no max_sessions = 16384 } # Loaded module rlm_replicate # Loading module "replicate" from file /etc/freeradius/3.0/mods-enabled/replicate # Loading module "sradutmp" from file /etc/freeradius/3.0/mods-enabled/sradutmp radutmp sradutmp { filename = "/var/log/freeradius/sradutmp" username = "%{User-Name}" case_sensitive = yes check_with_nas = yes permissions = 420 caller_id = no } # Loaded module rlm_cache # Loading module "cache_eap" from file /etc/freeradius/3.0/mods-enabled/cache_eap cache cache_eap { driver = "rlm_cache_rbtree" key = "%{%{control:State}:-%{%{reply:State}:-%{State}}}" ttl = 15 max_entries = 0 epoch = 0 add_stats = no } # Loaded module rlm_chap # Loading module "chap" from file /etc/freeradius/3.0/mods-enabled/chap # Loaded module rlm_attr_filter # Loading module "attr_filter.post-proxy" from file /etc/freeradius/3.0/mods-enabled/attr_filter attr_filter attr_filter.post-proxy { filename = "/etc/freeradius/3.0/mods-config/attr_filter/post-proxy" key = "%{Realm}" relaxed = no } # Loading module "attr_filter.pre-proxy" from file /etc/freeradius/3.0/mods-enabled/attr_filter attr_filter attr_filter.pre-proxy { filename = "/etc/freeradius/3.0/mods-config/attr_filter/pre-proxy" key = "%{Realm}" relaxed = no } # Loading module "attr_filter.access_reject" from file /etc/freeradius/3.0/mods-enabled/attr_filter attr_filter attr_filter.access_reject { filename = "/etc/freeradius/3.0/mods-config/attr_filter/access_reject" key = "%{User-Name}" relaxed = no } # Loading module "attr_filter.access_challenge" from file /etc/freeradius/3.0/mods-enabled/attr_filter attr_filter attr_filter.access_challenge { filename = "/etc/freeradius/3.0/mods-config/attr_filter/access_challenge" key = "%{User-Name}" relaxed = no } # Loading module "attr_filter.accounting_response" from file /etc/freeradius/3.0/mods-enabled/attr_filter attr_filter attr_filter.accounting_response { filename = "/etc/freeradius/3.0/mods-config/attr_filter/accounting_response" key = "%{User-Name}" relaxed = no } # Loading module "detail" from file /etc/freeradius/3.0/mods-enabled/detail detail { filename = "/var/log/freeradius/radacct/%{%{Packet-Src-IP-Address}:-%{Packet-Src-IPv6-Address}}/detail-%Y%m%d" header = "%t" permissions = 384 locking = no escape_filenames = no log_packet_header = no } # Loaded module rlm_expr # Loading module "expr" from file /etc/freeradius/3.0/mods-enabled/expr expr { safe_characters = "@abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789.-_: /äéöüàâæçèéêëîïôœùûüaÿÄÉÖÜßÀÂÆÇÈÉÊËÎÏÔŒÙÛÜŸ" } # Loaded module rlm_sql # Loading module "lms" from file /etc/freeradius/3.0/mods-enabled/lms sql lms { driver = "rlm_sql_mysql" server = "localhost" port = 3306 login = "radius" password = <<< secret >>> radius_db = "lms" read_groups = yes read_profiles = yes read_clients = no delete_stale_sessions = yes sql_user_name = "%{User-Name}" default_user_profile = "" client_query = "SELECT id, nasname, shortname, type, secret, server FROM nas" authorize_check_query = "...." authorize_reply_query = "...." safe_characters = "@abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789.-_: /" accounting { reference = "%{tolower:type.%{Acct-Status-Type}.query}" type { accounting-on { } accounting-off { } start { } interim-update { } stop { query = "UPDATE nodes SET lastonline = unix_timestamp() WHERE name='%{User-Name}'" } } } post-auth { reference = ".query" query = "UPDATE nodes SET lastonline = unix_timestamp() WHERE name='%{User-Name}'" } } rlm_sql (lms): Driver rlm_sql_mysql (module rlm_sql_mysql) loaded and linked # Loaded module rlm_files # Loading module "files" from file /etc/freeradius/3.0/mods-enabled/files files { filename = "/etc/freeradius/3.0/mods-config/files/authorize" acctusersfile = "/etc/freeradius/3.0/mods-config/files/accounting" preproxy_usersfile = "/etc/freeradius/3.0/mods-config/files/pre-proxy" } # Loaded module rlm_preprocess # Loading module "preprocess" from file /etc/freeradius/3.0/mods-enabled/preprocess preprocess { huntgroups = "/etc/freeradius/3.0/mods-config/preprocess/huntgroups" hints = "/etc/freeradius/3.0/mods-config/preprocess/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 } instantiate { } # Instantiating module "etc_passwd" from file /etc/freeradius/3.0/mods-enabled/passwd rlm_passwd: nfields: 3 keyfield 0(User-Name) listable: no # Instantiating module "lineloglms" from file /etc/freeradius/3.0/mods-enabled/lineloglms # Instantiating module "pap" from file /etc/freeradius/3.0/mods-enabled/pap # Instantiating module "logintime" from file /etc/freeradius/3.0/mods-enabled/logintime # Instantiating module "expiration" from file /etc/freeradius/3.0/mods-enabled/expiration # Instantiating module "reject" from file /etc/freeradius/3.0/mods-enabled/always # Instantiating module "fail" from file /etc/freeradius/3.0/mods-enabled/always # Instantiating module "ok" from file /etc/freeradius/3.0/mods-enabled/always # Instantiating module "handled" from file /etc/freeradius/3.0/mods-enabled/always # Instantiating module "invalid" from file /etc/freeradius/3.0/mods-enabled/always # Instantiating module "userlock" from file /etc/freeradius/3.0/mods-enabled/always # Instantiating module "notfound" from file /etc/freeradius/3.0/mods-enabled/always # Instantiating module "noop" from file /etc/freeradius/3.0/mods-enabled/always # Instantiating module "updated" from file /etc/freeradius/3.0/mods-enabled/always # Instantiating module "mschap" from file /etc/freeradius/3.0/mods-enabled/mschap rlm_mschap (mschap): using internal authentication # Instantiating module "IPASS" from file /etc/freeradius/3.0/mods-enabled/realm # Instantiating module "suffix" from file /etc/freeradius/3.0/mods-enabled/realm # Instantiating module "realmpercent" from file /etc/freeradius/3.0/mods-enabled/realm # Instantiating module "ntdomain" from file /etc/freeradius/3.0/mods-enabled/realm # Instantiating module "linelog" from file /etc/freeradius/3.0/mods-enabled/linelog # Instantiating module "log_accounting" from file /etc/freeradius/3.0/mods-enabled/linelog # Instantiating module "auth_log" from file /etc/freeradius/3.0/mods-enabled/detail.log rlm_detail (auth_log): 'User-Password' suppressed, will not appear in detail output # Instantiating module "reply_log" from file /etc/freeradius/3.0/mods-enabled/detail.log # Instantiating module "pre_proxy_log" from file /etc/freeradius/3.0/mods-enabled/detail.log # Instantiating module "post_proxy_log" from file /etc/freeradius/3.0/mods-enabled/detail.log # Instantiating module "eap" from file /etc/freeradius/3.0/mods-enabled/eap # Linked to sub-module rlm_eap_md5 # Linked to sub-module rlm_eap_leap # Linked to sub-module rlm_eap_gtc gtc { challenge = "Password: " auth_type = "PAP" } # Linked to sub-module rlm_eap_tls tls { tls = "tls-common" } tls-config tls-common { verify_depth = 0 ca_path = "/etc/freeradius/3.0/certs" pem_file_type = yes private_key_file = "/etc/ssl/private/ssl-cert-snakeoil.key" certificate_file = "/etc/ssl/certs/ssl-cert-snakeoil.pem" ca_file = "/etc/ssl/certs/ca-certificates.crt" private_key_password = <<< secret >>> dh_file = "/etc/freeradius/3.0/certs/dh" fragment_size = 1024 include_length = yes auto_chain = yes check_crl = no check_all_crl = no cipher_list = "DEFAULT" ecdh_curve = "prime256v1" cache { enable = yes lifetime = 24 max_entries = 255 } verify { skip_if_ocsp_ok = no } ocsp { enable = no override_cert_url = yes url = "http://127.0.0.1/ocsp/" use_nonce = yes timeout = 0 softfail = no } } # Linked to sub-module rlm_eap_ttls ttls { tls = "tls-common" default_eap_type = "md5" copy_request_to_tunnel = no use_tunneled_reply = no virtual_server = "inner-tunnel" include_length = yes require_client_cert = no } tls: Using cached TLS configuration from previous invocation # Linked to sub-module rlm_eap_peap peap { tls = "tls-common" default_eap_type = "mschapv2" copy_request_to_tunnel = no use_tunneled_reply = no proxy_tunneled_request_as_eap = yes virtual_server = "inner-tunnel" soh = no require_client_cert = no } tls: Using cached TLS configuration from previous invocation # Linked to sub-module rlm_eap_mschapv2 mschapv2 { with_ntdomain_hack = no send_error = no } # Instantiating module "cache_eap" from file /etc/freeradius/3.0/mods-enabled/cache_eap rlm_cache (cache_eap): Driver rlm_cache_rbtree (module rlm_cache_rbtree) loaded and linked # Instantiating module "attr_filter.post-proxy" from file /etc/freeradius/3.0/mods-enabled/attr_filter reading pairlist file /etc/freeradius/3.0/mods-config/attr_filter/post-proxy # Instantiating module "attr_filter.pre-proxy" from file /etc/freeradius/3.0/mods-enabled/attr_filter reading pairlist file /etc/freeradius/3.0/mods-config/attr_filter/pre-proxy # Instantiating module "attr_filter.access_reject" from file /etc/freeradius/3.0/mods-enabled/attr_filter reading pairlist file /etc/freeradius/3.0/mods-config/attr_filter/access_reject [/etc/freeradius/3.0/mods-config/attr_filter/access_reject]:11 Check item "FreeRADIUS-Response-Delay" found in filter list for realm "DEFAULT". [/etc/freeradius/3.0/mods-config/attr_filter/access_reject]:11 Check item "FreeRADIUS-Response-Delay-USec" found in filter list for realm "DEFAULT". # Instantiating module "attr_filter.access_challenge" from file /etc/freeradius/3.0/mods-enabled/attr_filter reading pairlist file /etc/freeradius/3.0/mods-config/attr_filter/access_challenge # Instantiating module "attr_filter.accounting_response" from file /etc/freeradius/3.0/mods-enabled/attr_filter reading pairlist file /etc/freeradius/3.0/mods-config/attr_filter/accounting_response # Instantiating module "detail" from file /etc/freeradius/3.0/mods-enabled/detail # Instantiating module "lms" from file /etc/freeradius/3.0/mods-enabled/lms rlm_sql_mysql: libmysql version: 10.1.26-MariaDB mysql { tls { } warnings = "auto" } rlm_sql (lms): Attempting to connect to database "lms" rlm_sql (lms): Initialising connection pool pool { start = 0 min = 3 max = 32 spare = 10 uses = 0 lifetime = 0 cleanup_interval = 30 idle_timeout = 60 retry_delay = 30 spread = no } # Instantiating module "files" from file /etc/freeradius/3.0/mods-enabled/files reading pairlist file /etc/freeradius/3.0/mods-config/files/authorize reading pairlist file /etc/freeradius/3.0/mods-config/files/radius_users reading pairlist file /etc/freeradius/3.0/mods-config/files/accounting reading pairlist file /etc/freeradius/3.0/mods-config/files/pre-proxy # Instantiating module "preprocess" from file /etc/freeradius/3.0/mods-enabled/preprocess reading pairlist file /etc/freeradius/3.0/mods-config/preprocess/huntgroups reading pairlist file /etc/freeradius/3.0/mods-config/preprocess/hints } # modules radiusd: #### Loading Virtual Servers #### server { # from file /etc/freeradius/3.0/radiusd.conf } # server server default { # from file /etc/freeradius/3.0/sites-enabled/lms # Loading authenticate {...} # Loading authorize {...} # Loading preacct {...} # Loading accounting {...} # Loading post-auth {...} } # server default radiusd: #### Opening IP addresses and Ports #### listen { type = "auth" ipaddr = * port = 0 limit { max_connections = 100 lifetime = 0 idle_timeout = 30 } } listen { type = "acct" ipaddr = * port = 0 limit { max_connections = 16 lifetime = 0 idle_timeout = 30 } } listen { type = "auth" ipv6addr = :: port = 0 limit { max_connections = 16 lifetime = 0 idle_timeout = 30 } } listen { type = "acct" ipv6addr = :: port = 0 limit { max_connections = 16 lifetime = 0 idle_timeout = 30 } } Listening on auth address * port 1812 bound to server default Listening on acct address * port 1813 bound to server default Listening on auth address :: port 1812 bound to server default Listening on acct address :: port 1813 bound to server default Ready to process requests (0) Received Access-Request Id 11 from 10.5.5.10:40267 to 10.5.5.1:1812 length 153 (0) Service-Type = Framed-User (0) Framed-Protocol = PPP (0) NAS-Port = 15728920 (0) NAS-Port-Type = Ethernet (0) User-Name = "serwis" (0) Calling-Station-Id = "00:0C:42:79:DC:8E" (0) Called-Station-Id = "pppoe-server" (0) NAS-Port-Id = "pppoe_br" (0) CHAP-Challenge = 0xc87cea176b46a73b1cf190c880397b23 (0) CHAP-Password = 0x01ca42fce452d8fb68862851d755236a05 (0) NAS-Identifier = "PPPoE_MT_Test" (0) NAS-IP-Address = 10.5.5.10 (0) # Executing section authorize from file /etc/freeradius/3.0/sites-enabled/lms (0) authorize { (0) policy filter_username { (0) if (&User-Name) { (0) if (&User-Name) -> TRUE (0) if (&User-Name) { (0) if (&User-Name =~ / /) { (0) if (&User-Name =~ / /) -> FALSE (0) if (&User-Name =~ /@[^@]*@/ ) { (0) if (&User-Name =~ /@[^@]*@/ ) -> FALSE (0) if (&User-Name =~ /\.\./ ) { (0) if (&User-Name =~ /\.\./ ) -> FALSE (0) if ((&User-Name =~ /@/) && (&User-Name !~ /@(.+)\.(.+)$/)) { (0) if ((&User-Name =~ /@/) && (&User-Name !~ /@(.+)\.(.+)$/)) -> FALSE (0) if (&User-Name =~ /\.$/) { (0) if (&User-Name =~ /\.$/) -> FALSE (0) if (&User-Name =~ /@\./) { (0) if (&User-Name =~ /@\./) -> FALSE (0) } # if (&User-Name) = notfound (0) } # policy filter_username = notfound (0) [preprocess] = ok (0) chap: &control:Auth-Type := CHAP (0) [chap] = ok (0) [mschap] = noop (0) suffix: Checking for suffix after "@" (0) suffix: No '@' in User-Name = "serwis", looking up realm NULL (0) suffix: No such realm "NULL" (0) [suffix] = noop (0) eap: No EAP-Message, not doing EAP (0) [eap] = noop (0) if (Service-Type == Login-User){ (0) if (Service-Type == Login-User) -> FALSE (0) if (Framed-Protocol == PPP){ (0) if (Framed-Protocol == PPP) -> TRUE (0) if (Framed-Protocol == PPP) { (0) redundant { (0) lms: EXPAND %{User-Name} (0) lms: --> serwis (0) lms: SQL-User-Name set to 'serwis' rlm_sql (lms): 0 of 0 connections in use. You may need to increase "spare" rlm_sql (lms): Opening additional connection (0), 1 of 32 pending slots used rlm_sql_mysql: Starting connect to MySQL server rlm_sql_mysql: Couldn't connect to MySQL server radius@localhost:lms rlm_sql_mysql: MySQL error: Can't connect to local MySQL server through socket '/var/run/mysqld/mysqld.sock' (2 "No such file or directory") rlm_sql_mysql: Socket destructor called, closing socket rlm_sql (lms): Opening connection failed (0) *(0) [lms] = fail* *(0) files: users: Matched entry DEFAULT at line 186* *(0) [files] = ok* *(0) } # redundant = ok* *(0) } # if (Framed-Protocol == PPP) = ok* *(0) [expiration] = noop* *(0) [logintime] = noop* *(0) pap: WARNING: No "known good" password found for the user. Not setting Auth-Type* *(0) pap: WARNING: Authentication will fail unless a "known good" password is available* *(0) [pap] = noop* *(0) } # authorize = ok* *(0) Found Auth-Type = CHAP* *(0) # Executing group from file /etc/freeradius/3.0/sites-enabled/lms* *(0) Auth-Type CHAP {* *(0) chap: ERROR: &control:Cleartext-Password is required for authentication* *(0) [chap] = fail* *(0) } # Auth-Type CHAP = fail* *(0) Failed to authenticate the user* (0) Using Post-Auth-Type Reject (0) # Executing group from file /etc/freeradius/3.0/sites-enabled/lms (0) Post-Auth-Type REJECT { (0) attr_filter.access_reject: EXPAND %{User-Name} (0) attr_filter.access_reject: --> serwis (0) attr_filter.access_reject: Matched entry DEFAULT at line 11 (0) [attr_filter.access_reject] = updated (0) [eap] = noop (0) policy remove_reply_message_if_eap { (0) if (&reply:EAP-Message && &reply:Reply-Message) { (0) if (&reply:EAP-Message && &reply:Reply-Message) -> FALSE (0) else { (0) [noop] = noop (0) } # else = noop (0) } # policy remove_reply_message_if_eap = noop (0) } # Post-Auth-Type REJECT = updated (0) Delaying response for 1.000000 seconds Waking up in 0.6 seconds. Waking up in 0.3 seconds. (0) Sending delayed response (0) Sent Access-Reject Id 11 from 10.5.5.1:1812 to 10.5.5.10:40267 length 20 Waking up in 3.9 seconds. (1) Received Access-Request Id 12 from 10.5.5.10:35043 to 10.5.5.1:1812 length 153 (1) Service-Type = Framed-User (1) Framed-Protocol = PPP (1) NAS-Port = 15728921 (1) NAS-Port-Type = Ethernet (1) User-Name = "serwis" (1) Calling-Station-Id = "00:0C:42:79:DC:8E" (1) Called-Station-Id = "pppoe-server" (1) NAS-Port-Id = "pppoe_br" (1) CHAP-Challenge = 0x1ba6c67c6087767d213ef90b566452fd (1) CHAP-Password = 0x01b5934a859ef0cd8a1a5c445f63c93785 (1) NAS-Identifier = "PPPoE_MT_Test" (1) NAS-IP-Address = 10.5.5.10 (1) # Executing section authorize from file /etc/freeradius/3.0/sites-enabled/lms (1) authorize { (1) policy filter_username { (1) if (&User-Name) { (1) if (&User-Name) -> TRUE (1) if (&User-Name) { (1) if (&User-Name =~ / /) { (1) if (&User-Name =~ / /) -> FALSE (1) if (&User-Name =~ /@[^@]*@/ ) { (1) if (&User-Name =~ /@[^@]*@/ ) -> FALSE (1) if (&User-Name =~ /\.\./ ) { (1) if (&User-Name =~ /\.\./ ) -> FALSE (1) if ((&User-Name =~ /@/) && (&User-Name !~ /@(.+)\.(.+)$/)) { (1) if ((&User-Name =~ /@/) && (&User-Name !~ /@(.+)\.(.+)$/)) -> FALSE (1) if (&User-Name =~ /\.$/) { (1) if (&User-Name =~ /\.$/) -> FALSE (1) if (&User-Name =~ /@\./) { (1) if (&User-Name =~ /@\./) -> FALSE (1) } # if (&User-Name) = notfound (1) } # policy filter_username = notfound (1) [preprocess] = ok (1) chap: &control:Auth-Type := CHAP (1) [chap] = ok (1) [mschap] = noop (1) suffix: Checking for suffix after "@" (1) suffix: No '@' in User-Name = "serwis", looking up realm NULL (1) suffix: No such realm "NULL" (1) [suffix] = noop (1) eap: No EAP-Message, not doing EAP (1) [eap] = noop (1) if (Service-Type == Login-User){ (1) if (Service-Type == Login-User) -> FALSE (1) if (Framed-Protocol == PPP){ (1) if (Framed-Protocol == PPP) -> TRUE (1) if (Framed-Protocol == PPP) { (1) redundant { (1) lms: EXPAND %{User-Name} (1) lms: --> serwis (1) lms: SQL-User-Name set to 'serwis' rlm_sql (lms): 0 of 0 connections in use. You may need to increase "spare" rlm_sql (lms): Last connection attempt failed, waiting 30 seconds before retrying (1) [lms] = fail (1) files: users: Matched entry DEFAULT at line 186 (1) [files] = ok (1) } # redundant = ok (1) } # if (Framed-Protocol == PPP) = ok (1) [expiration] = noop (1) [logintime] = noop (1) pap: WARNING: No "known good" password found for the user. Not setting Auth-Type (1) pap: WARNING: Authentication will fail unless a "known good" password is available (1) [pap] = noop (1) } # authorize = ok (1) Found Auth-Type = CHAP (1) # Executing group from file /etc/freeradius/3.0/sites-enabled/lms (1) Auth-Type CHAP { (1) chap: ERROR: &control:Cleartext-Password is required for authentication (1) [chap] = fail (1) } # Auth-Type CHAP = fail (1) Failed to authenticate the user (1) Using Post-Auth-Type Reject (1) # Executing group from file /etc/freeradius/3.0/sites-enabled/lms (1) Post-Auth-Type REJECT { (1) attr_filter.access_reject: EXPAND %{User-Name} (1) attr_filter.access_reject: --> serwis (1) attr_filter.access_reject: Matched entry DEFAULT at line 11 (1) [attr_filter.access_reject] = updated (1) [eap] = noop (1) policy remove_reply_message_if_eap { (1) if (&reply:EAP-Message && &reply:Reply-Message) { (1) if (&reply:EAP-Message && &reply:Reply-Message) -> FALSE (1) else { (1) [noop] = noop (1) } # else = noop (1) } # policy remove_reply_message_if_eap = noop (1) } # Post-Auth-Type REJECT = updated (1) Delaying response for 1.000000 seconds Waking up in 0.6 seconds. Waking up in 0.3 seconds. (1) Sending delayed response (1) Sent Access-Reject Id 12 from 10.5.5.1:1812 to 10.5.5.10:35043 length 20 Waking up in 2.6 seconds. (2) Received Access-Request Id 13 from 10.5.5.10:33994 to 10.5.5.1:1812 length 153 (2) Service-Type = Framed-User (2) Framed-Protocol = PPP (2) NAS-Port = 15728922 (2) NAS-Port-Type = Ethernet (2) User-Name = "serwis" (2) Calling-Station-Id = "00:0C:42:79:DC:8E" (2) Called-Station-Id = "pppoe-server" (2) NAS-Port-Id = "pppoe_br" (2) CHAP-Challenge = 0x69b1921ba616decda1f9736776d3efec (2) CHAP-Password = 0x01b99a2b00d635f01a5de5e230a3d70d89 (2) NAS-Identifier = "PPPoE_MT_Test" (2) NAS-IP-Address = 10.5.5.10 (2) # Executing section authorize from file /etc/freeradius/3.0/sites-enabled/lms (2) authorize { (2) policy filter_username { (2) if (&User-Name) { (2) if (&User-Name) -> TRUE (2) if (&User-Name) { (2) if (&User-Name =~ / /) { (2) if (&User-Name =~ / /) -> FALSE (2) if (&User-Name =~ /@[^@]*@/ ) { (2) if (&User-Name =~ /@[^@]*@/ ) -> FALSE (2) if (&User-Name =~ /\.\./ ) { (2) if (&User-Name =~ /\.\./ ) -> FALSE (2) if ((&User-Name =~ /@/) && (&User-Name !~ /@(.+)\.(.+)$/)) { (2) if ((&User-Name =~ /@/) && (&User-Name !~ /@(.+)\.(.+)$/)) -> FALSE (2) if (&User-Name =~ /\.$/) { (2) if (&User-Name =~ /\.$/) -> FALSE (2) if (&User-Name =~ /@\./) { (2) if (&User-Name =~ /@\./) -> FALSE (2) } # if (&User-Name) = notfound (2) } # policy filter_username = notfound (2) [preprocess] = ok (2) chap: &control:Auth-Type := CHAP (2) [chap] = ok (2) [mschap] = noop (2) suffix: Checking for suffix after "@" (2) suffix: No '@' in User-Name = "serwis", looking up realm NULL (2) suffix: No such realm "NULL" (2) [suffix] = noop (2) eap: No EAP-Message, not doing EAP (2) [eap] = noop (2) if (Service-Type == Login-User){ (2) if (Service-Type == Login-User) -> FALSE (2) if (Framed-Protocol == PPP){ (2) if (Framed-Protocol == PPP) -> TRUE (2) if (Framed-Protocol == PPP) { (2) redundant { (2) lms: EXPAND %{User-Name} (2) lms: --> serwis (2) lms: SQL-User-Name set to 'serwis' rlm_sql (lms): 0 of 0 connections in use. You may need to increase "spare" rlm_sql (lms): Last connection attempt failed, waiting 30 seconds before retrying (2) [lms] = fail (2) files: users: Matched entry DEFAULT at line 186 (2) [files] = ok (2) } # redundant = ok (2) } # if (Framed-Protocol == PPP) = ok (2) [expiration] = noop (2) [logintime] = noop (2) pap: WARNING: No "known good" password found for the user. Not setting Auth-Type (2) pap: WARNING: Authentication will fail unless a "known good" password is available (2) [pap] = noop (2) } # authorize = ok (2) Found Auth-Type = CHAP (2) # Executing group from file /etc/freeradius/3.0/sites-enabled/lms (2) Auth-Type CHAP { (2) chap: ERROR: &control:Cleartext-Password is required for authentication (2) [chap] = fail (2) } # Auth-Type CHAP = fail (2) Failed to authenticate the user (2) Using Post-Auth-Type Reject (2) # Executing group from file /etc/freeradius/3.0/sites-enabled/lms (2) Post-Auth-Type REJECT { (2) attr_filter.access_reject: EXPAND %{User-Name} (2) attr_filter.access_reject: --> serwis (2) attr_filter.access_reject: Matched entry DEFAULT at line 11 (2) [attr_filter.access_reject] = updated (2) [eap] = noop (2) policy remove_reply_message_if_eap { (2) if (&reply:EAP-Message && &reply:Reply-Message) { (2) if (&reply:EAP-Message && &reply:Reply-Message) -> FALSE (2) else { (2) [noop] = noop (2) } # else = noop (2) } # policy remove_reply_message_if_eap = noop (2) } # Post-Auth-Type REJECT = updated (2) Delaying response for 1.000000 seconds Waking up in 0.6 seconds. Waking up in 0.3 seconds. (2) Sending delayed response (2) Sent Access-Reject Id 13 from 10.5.5.1:1812 to 10.5.5.10:33994 length 20 Waking up in 0.8 seconds. (0) Cleaning up request packet ID 11 with timestamp +40 Waking up in 1.3 seconds. (3) Received Access-Request Id 14 from 10.5.5.10:33515 to 10.5.5.1:1812 length 153 (3) Service-Type = Framed-User (3) Framed-Protocol = PPP (3) NAS-Port = 15728923 (3) NAS-Port-Type = Ethernet (3) User-Name = "serwis" (3) Calling-Station-Id = "00:0C:42:79:DC:8E" (3) Called-Station-Id = "pppoe-server" (3) NAS-Port-Id = "pppoe_br" (3) CHAP-Challenge = 0xae6e7e4edc6c7d12dbe6c46e016a84e0 (3) CHAP-Password = 0x0196756c9df1dc459d4231d901434d6a79 (3) NAS-Identifier = "PPPoE_MT_Test" (3) NAS-IP-Address = 10.5.5.10 (3) # Executing section authorize from file /etc/freeradius/3.0/sites-enabled/lms (3) authorize { (3) policy filter_username { (3) if (&User-Name) { (3) if (&User-Name) -> TRUE (3) if (&User-Name) { (3) if (&User-Name =~ / /) { (3) if (&User-Name =~ / /) -> FALSE (3) if (&User-Name =~ /@[^@]*@/ ) { (3) if (&User-Name =~ /@[^@]*@/ ) -> FALSE (3) if (&User-Name =~ /\.\./ ) { (3) if (&User-Name =~ /\.\./ ) -> FALSE (3) if ((&User-Name =~ /@/) && (&User-Name !~ /@(.+)\.(.+)$/)) { (3) if ((&User-Name =~ /@/) && (&User-Name !~ /@(.+)\.(.+)$/)) -> FALSE (3) if (&User-Name =~ /\.$/) { (3) if (&User-Name =~ /\.$/) -> FALSE (3) if (&User-Name =~ /@\./) { (3) if (&User-Name =~ /@\./) -> FALSE (3) } # if (&User-Name) = notfound (3) } # policy filter_username = notfound (3) [preprocess] = ok (3) chap: &control:Auth-Type := CHAP (3) [chap] = ok (3) [mschap] = noop (3) suffix: Checking for suffix after "@" (3) suffix: No '@' in User-Name = "serwis", looking up realm NULL (3) suffix: No such realm "NULL" (3) [suffix] = noop (3) eap: No EAP-Message, not doing EAP (3) [eap] = noop (3) if (Service-Type == Login-User){ (3) if (Service-Type == Login-User) -> FALSE (3) if (Framed-Protocol == PPP){ (3) if (Framed-Protocol == PPP) -> TRUE (3) if (Framed-Protocol == PPP) { (3) redundant { (3) lms: EXPAND %{User-Name} (3) lms: --> serwis (3) lms: SQL-User-Name set to 'serwis' rlm_sql (lms): 0 of 0 connections in use. You may need to increase "spare" rlm_sql (lms): Last connection attempt failed, waiting 30 seconds before retrying (3) [lms] = fail (3) files: users: Matched entry DEFAULT at line 186 (3) [files] = ok (3) } # redundant = ok (3) } # if (Framed-Protocol == PPP) = ok (3) [expiration] = noop (3) [logintime] = noop (3) pap: WARNING: No "known good" password found for the user. Not setting Auth-Type (3) pap: WARNING: Authentication will fail unless a "known good" password is available (3) [pap] = noop (3) } # authorize = ok (3) Found Auth-Type = CHAP (3) # Executing group from file /etc/freeradius/3.0/sites-enabled/lms (3) Auth-Type CHAP { (3) chap: ERROR: &control:Cleartext-Password is required for authentication (3) [chap] = fail (3) } # Auth-Type CHAP = fail (3) Failed to authenticate the user (3) Using Post-Auth-Type Reject (3) # Executing group from file /etc/freeradius/3.0/sites-enabled/lms (3) Post-Auth-Type REJECT { (3) attr_filter.access_reject: EXPAND %{User-Name} (3) attr_filter.access_reject: --> serwis (3) attr_filter.access_reject: Matched entry DEFAULT at line 11 (3) [attr_filter.access_reject] = updated (3) [eap] = noop (3) policy remove_reply_message_if_eap { (3) if (&reply:EAP-Message && &reply:Reply-Message) { (3) if (&reply:EAP-Message && &reply:Reply-Message) -> FALSE (3) else { (3) [noop] = noop (3) } # else = noop (3) } # policy remove_reply_message_if_eap = noop (3) } # Post-Auth-Type REJECT = updated (3) Delaying response for 1.000000 seconds Waking up in 0.5 seconds. (1) Cleaning up request packet ID 12 with timestamp +42 Waking up in 0.1 seconds. Waking up in 0.3 seconds. (3) Sending delayed response (3) Sent Access-Reject Id 14 from 10.5.5.1:1812 to 10.5.5.10:33515 length 20 How should I configure users file to success authorize clients? -- Pozdrawiam Marcin / nicraM
On Feb 14, 2018, at 11:17 AM, Marcin <marcin@nicram.net> wrote:
Hello, I'm trying to make redundant authentication if database fails to get users from files.
OK...
if (Framed-Protocol == PPP){ redundant { lms files }
That should work.
With this, when I try to connect and database is well everything goes well and user is authentificated. But when I simulate problems with database (shutdown db) user cannot connect.
Because it's not matching the entry in the "users" file.
in users file: serwis Cleartext-Password := "password" Framed-IP-Address = 1.1.1.1, Framed-IP-Netmask = 255.255.255.255, MS-Primary-DNS-Server = 8.8.4.4, MS-Secondary-DNS-Server = 8.8.8.8, Port-Limit = 1, Acct-Interim-Interval = 300, Filter-ID = "105192k/11196k", Mikrotik-Rate-Limit = "11196k/105192k"
now the log: ... (0) Received Access-Request Id 11 from 10.5.5.10:40267 to 10.5.5.1:1812 length 153 (0) Service-Type = Framed-User (0) Framed-Protocol = PPP (0) NAS-Port = 15728920 (0) NAS-Port-Type = Ethernet (0) User-Name = "serwis"
Which should be fine.
... (0) lms: EXPAND %{User-Name} (0) lms: --> serwis (0) lms: SQL-User-Name set to 'serwis' rlm_sql (lms): 0 of 0 connections in use. You may need to increase "spare" rlm_sql (lms): Opening additional connection (0), 1 of 32 pending slots used rlm_sql_mysql: Starting connect to MySQL server rlm_sql_mysql: Couldn't connect to MySQL server radius@localhost:lms rlm_sql_mysql: MySQL error: Can't connect to local MySQL server through socket '/var/run/mysqld/mysqld.sock' (2 "No such file or directory") rlm_sql_mysql: Socket destructor called, closing socket rlm_sql (lms): Opening connection failed (0) *(0) [lms] = fail* *(0) files: users: Matched entry DEFAULT at line 186*
Which means it didn't match the entry you added. So... where did you add the entry? At the top of the file? Or at the bottom? What's on line 186? Did you edit the correct "users" file? Alan DeKok.
2018-02-14 17:24 GMT+01:00 Alan DeKok <aland@deployingradius.com>: Thank You for this quick reply
*(0) [lms] = fail* *(0) files: users: Matched entry DEFAULT at line 186*
Which means it didn't match the entry you added.
So... where did you add the entry? At the top of the file? Or at the bottom? What's on line 186?
the 186 line in "users" file is DEFAULT Framed-Protocol == PPP Framed-Protocol = PPP, Framed-Compression = Van-Jacobson-TCP-IP
Did you edit the correct "users" file?
but 10 lines earlier I added: $INCLUDE radius_users in this are all users -- Pozdrawiam Marcin / nicraM
I've moved my test user 'serwis' directly to "users" file instead line "$INCLUDE ..." and works :) But I'd like to keep users in seperate file because I'm going to generate this daily from database. 2018-02-14 17:30 GMT+01:00 Marcin <marcin@nicram.net>:
2018-02-14 17:24 GMT+01:00 Alan DeKok <aland@deployingradius.com>:
Thank You for this quick reply
*(0) [lms] = fail* *(0) files: users: Matched entry DEFAULT at line 186*
Which means it didn't match the entry you added.
So... where did you add the entry? At the top of the file? Or at the bottom? What's on line 186?
the 186 line in "users" file is DEFAULT Framed-Protocol == PPP Framed-Protocol = PPP, Framed-Compression = Van-Jacobson-TCP-IP
Did you edit the correct "users" file?
but 10 lines earlier I added: $INCLUDE radius_users
in this are all users
-- Pozdrawiam Marcin / nicraM
-- Pozdrawiam Marcin / nicraM
Try using the full path with your $INCLUDE statement. Regards, Krzysztof PGP: 9E5D E635 5A03 485C 2E00 4530 EB83 920A 9E21 FBA8 On 14/02/18 17:40, Marcin wrote:
I've moved my test user 'serwis' directly to "users" file instead line "$INCLUDE ..." and works :) But I'd like to keep users in seperate file because I'm going to generate this daily from database.
2018-02-14 17:30 GMT+01:00 Marcin <marcin@nicram.net>:
2018-02-14 17:24 GMT+01:00 Alan DeKok <aland@deployingradius.com>:
Thank You for this quick reply
*(0) [lms] = fail* *(0) files: users: Matched entry DEFAULT at line 186* Which means it didn't match the entry you added.
So... where did you add the entry? At the top of the file? Or at the bottom? What's on line 186?
the 186 line in "users" file is DEFAULT Framed-Protocol == PPP Framed-Protocol = PPP, Framed-Compression = Van-Jacobson-TCP-IP
Did you edit the correct "users" file?
but 10 lines earlier I added: $INCLUDE radius_users
in this are all users
-- Pozdrawiam Marcin / nicraM
On Feb 14, 2018, at 11:40 AM, Marcin <marcin@nicram.net> wrote:
I've moved my test user 'serwis' directly to "users" file instead line "$INCLUDE ..." and works :) But I'd like to keep users in seperate file because I'm going to generate this daily from database.
Weird. I haven't seen that before. Are you sure that it's loading the correct file? i.e. in the file you're creating and using with $INCLUDE, put this at the top: DEFAULT Auth-Type := Reject If the users can still log in, then the server isn't reading the file you're writing. Make sure that there is only one file, and use the full path name of the file. Alan DeKok.
2018-02-15 13:56 GMT+01:00 Alan DeKok <aland@deployingradius.com>:
On Feb 14, 2018, at 11:40 AM, Marcin <marcin@nicram.net> wrote:
I've moved my test user 'serwis' directly to "users" file instead line "$INCLUDE ..." and works :) But I'd like to keep users in seperate file because I'm going to generate this daily from database.
Weird. I haven't seen that before.
Are you sure that it's loading the correct file?
Yes, I'm sure that I'm loading correct file. I tried put full path also but whihout result
i.e. in the file you're creating and using with $INCLUDE, put this at the top:
DEFAULT Auth-Type := Reject
Its, weird, because if I added this line, in debug mode log says that, in users file was found in line where it is, so file is included. When I remove this line, problem returns that user isn't matched. But if I set my file instead authore in mods-enabled/files cat mods-enabled/files # -*- text -*- # # $Id: e3f3bf568d92eba8eb17bbad590f846f2d9e1ac8 $ # Livingston-style 'users' file # # See "man users" for more information. # files { # Search for files in a subdirectory of mods-config which # matches this instance of the files module. moddir = ${modconfdir}/${.:instance} # The default key attribute to use for matches. The content # of this attribute is used to match the "name" of the # entry. #key = "%{%{Stripped-User-Name}:-%{User-Name}}" # The old "users" style file is now located here. # filename = ${moddir}/authorize filename = ${moddir}/users # This is accepted for backwards compatibility # It will be removed in a future release. # usersfile = ${moddir}/authorize # These are accepted for backwards compatibility. # They will be renamed in a future release. acctusersfile = ${moddir}/accounting preproxy_usersfile = ${moddir}/pre-proxy } it starting works. no changes in my users file.
If the users can still log in, then the server isn't reading the file you're writing. Make sure that there is only one file, and use the full path name of the file.
Alan DeKok.
- List info/subscribe/unsubscribe? See http://www.freeradius.org/ list/users.html
-- Pozdrawiam Marcin / nicraM
I've reduced my file, which is included to two users: user1 Cleartext-Password := "YwXYiufu640QkatX" Framed-IP-Address = 192.168.237.24, Framed-IP-Netmask = 255.255.255.255, MS-Primary-DNS-Server = 192.168.232.7, MS-Secondary-DNS-Server = 8.8.8.8, Port-Limit = 1, Acct-Interim-Interval = 300, Filter-ID = "9708k/3704k", Mikrotik-Rate-Limit = "3704k/9708k" serwis Cleartext-Password := "serwis" Framed-IP-Address = 192.168.237.25, Framed-IP-Netmask = 255.255.255.255, MS-Primary-DNS-Server = 192.168.232.7, MS-Secondary-DNS-Server = 8.8.8.8, Port-Limit = 1, Acct-Interim-Interval = 300, Filter-ID = "162668k/143172k", Mikrotik-Rate-Limit = "143172k/162668k" With this authenticate works, user serwis is found and response is accept. Finally, this file containst over 20k lines wc -l ../3.0/mods-config/files/users 20905 ../3.0/mods-config/files/users my users file I generate from php script. The strange thing is that, when I set *filename = ${moddir}/users* everything works, but with $INCLUDE in authorize file it doesn't work 2018-02-26 11:43 GMT+01:00 Marcin <marcin@nicram.net>:
2018-02-15 13:56 GMT+01:00 Alan DeKok <aland@deployingradius.com>:
On Feb 14, 2018, at 11:40 AM, Marcin <marcin@nicram.net> wrote:
I've moved my test user 'serwis' directly to "users" file instead line "$INCLUDE ..." and works :) But I'd like to keep users in seperate file because I'm going to
generate
this daily from database.
Weird. I haven't seen that before.
Are you sure that it's loading the correct file?
Yes, I'm sure that I'm loading correct file. I tried put full path also but whihout result
i.e. in the file you're creating and using with $INCLUDE, put this at the top:
DEFAULT Auth-Type := Reject
Its, weird, because if I added this line, in debug mode log says that, in users file was found in line where it is, so file is included. When I remove this line, problem returns that user isn't matched. But if I set my file instead authore in mods-enabled/files
cat mods-enabled/files # -*- text -*- # # $Id: e3f3bf568d92eba8eb17bbad590f846f2d9e1ac8 $
# Livingston-style 'users' file # # See "man users" for more information. # files { # Search for files in a subdirectory of mods-config which # matches this instance of the files module. moddir = ${modconfdir}/${.:instance}
# The default key attribute to use for matches. The content # of this attribute is used to match the "name" of the # entry. #key = "%{%{Stripped-User-Name}:-%{User-Name}}"
# The old "users" style file is now located here. # filename = ${moddir}/authorize filename = ${moddir}/users
# This is accepted for backwards compatibility # It will be removed in a future release. # usersfile = ${moddir}/authorize
# These are accepted for backwards compatibility. # They will be renamed in a future release. acctusersfile = ${moddir}/accounting preproxy_usersfile = ${moddir}/pre-proxy }
it starting works. no changes in my users file.
If the users can still log in, then the server isn't reading the file you're writing. Make sure that there is only one file, and use the full path name of the file.
Alan DeKok.
- List info/subscribe/unsubscribe? See http://www.freeradius.org/list /users.html
-- Pozdrawiam Marcin / nicraM
-- Pozdrawiam Marcin / nicraM
On Feb 26, 2018, at 6:07 AM, Marcin <marcin@nicram.net> wrote:
I've reduced my file, which is included to two users:
OK...
With this authenticate works, user serwis is found and response is accept. Finally, this file containst over 20k lines wc -l ../3.0/mods-config/files/users 20905 ../3.0/mods-config/files/users
my users file I generate from php script. The strange thing is that, when I set *filename = ${moddir}/users* everything works, but with $INCLUDE in authorize file it doesn't work
If you put a $INCLUDE at the top of ${moddir}/users, it should work. It works for me in all of my testing. i.e. I just tried that with a large file containing 10K users and 200K lines. it works fine. So I'm not sure what's wrong on your end of things. Alan DeKok.
...are you putting an $INCLUDE actually IN the file containing all the user data? in which case...try ensuring you have the FULL path defined and not just the filename on its own alan
I'm put "$INCLUDE users" into original authorize file before DEFAULTs options. 2018-02-26 20:33 GMT+01:00 Alan Buxey <alan.buxey@gmail.com>:
...are you putting an $INCLUDE actually IN the file containing all the user data? in which case...try ensuring you have the FULL path defined and not just the filename on its own
alan - List info/subscribe/unsubscribe? See http://www.freeradius.org/ list/users.html
-- Pozdrawiam Marcin / nicraM
Try using the full path i.e. "$INCLUDE /usr/local/et/raddb/users.additional" I remember that i had once a issue with $INCLUDE in user files and this was the workaround Regards, Krzysztof PGP: 9E5D E635 5A03 485C 2E00 4530 EB83 920A 9E21 FBA8 On 27/02/18 09:54, Marcin wrote:
I'm put "$INCLUDE users" into original authorize file before DEFAULTs options.
2018-02-26 20:33 GMT+01:00 Alan Buxey <alan.buxey@gmail.com>:
...are you putting an $INCLUDE actually IN the file containing all the user data? in which case...try ensuring you have the FULL path defined and not just the filename on its own
alan - List info/subscribe/unsubscribe? See http://www.freeradius.org/ list/users.html
2018-02-27 10:45 GMT+01:00 Krzysztof Grobelak <krzysztof.grobelak@enet.ie>:
Try using the full path i.e.
"$INCLUDE /usr/local/et/raddb/users.additional"
I've tried this also but the same result :/
I remember that i had once a issue with $INCLUDE in user files and this was the workaround
Regards,
Krzysztof
PGP: 9E5D E635 5A03 485C 2E00 4530 EB83 920A 9E21 FBA8
On 27/02/18 09:54, Marcin wrote:
I'm put "$INCLUDE users" into original authorize file before DEFAULTs options.
2018-02-26 20:33 GMT+01:00 Alan Buxey <alan.buxey@gmail.com>:
...are you putting an $INCLUDE actually IN the file containing all the
user data? in which case...try ensuring you have the FULL path defined and not just the filename on its own
alan - List info/subscribe/unsubscribe? See http://www.freeradius.org/ list/users.html
- List info/subscribe/unsubscribe? See http://www.freeradius.org/list /users.html
-- Pozdrawiam Marcin / nicraM
participants (4)
-
Alan Buxey -
Alan DeKok -
Krzysztof Grobelak -
Marcin