Stuck on very basic freeradius setup
Hello, I've just installed freeradius 2.x on an ubuntu server 12.04 with apt-get. I've follow documentation and I'm stuck on a very basic setup (pap auth). Basically I'm testing the default config using the users file to test auth with radtest. So, here is the thing: *users file - first line: teste Cleartext-Password:="teste"* I'm running freeradius on debug mode, here is the error log: rad_recv: Access-Request packet from host 127.0.0.1 port 38134, id=101, length=57 User-Name = "teste" User-Password = "teste" NAS-IP-Address = 201.x.x.x NAS-Port = 0 # Executing section authorize from file /etc/freeradius/sites-enabled/default +- entering group authorize {...} ++[preprocess] returns ok ++[chap] returns noop ++[mschap] returns noop ++[digest] returns noop [suffix] No '@' in User-Name = "teste", looking up realm NULL [suffix] No such realm "NULL" ++[suffix] returns noop [eap] No EAP-Message, not doing EAP ++[eap] returns noop [files] users: Matched entry teste at line 1 ++[files] returns ok ++[expiration] returns noop ++[logintime] returns noop ++[pap] returns updated Found Auth-Type = PAP # Executing group from file /etc/freeradius/sites-enabled/default +- entering group PAP {...} *[pap] login attempt with password "teste" [pap] No password configured for the user. Cannot do authentication* *++[pap] returns fail Failed to authenticate the user.* Login incorrect: [teste/teste] (from client localhost port 0) Using Post-Auth-Type Reject # Executing group from file /etc/freeradius/sites-enabled/default +- entering group REJECT {...} [attr_filter.access_reject] expand: %{User-Name} -> teste attr_filter: Matched entry DEFAULT at line 11 ++[attr_filter.access_reject] returns updated.... My radtest command: radtest teste teste 127.0.0.1 0 testing123 Ok, is that so obvious that I'm blind? Is there pap auth looking for another file instead users file? What am I missing? Thanks people.
Hello! Tiago <sytker@gmail.com> wrote:
Hello, I've just installed freeradius 2.x on an ubuntu server 12.04 with apt-get.
I've follow documentation and I'm stuck on a very basic setup (pap auth). Basically I'm testing the default config using the users file to test auth with radtest.
So, here is the thing:
*users file - first line: teste Cleartext-Password:="teste"*
My entry in the user file looks like this: miles<-><------>Cleartext-Password := "davis45" <------><------>Reply-Message = "Hello, %{User-Name}" Does this help? Andreas
No, still getting errors, but it sends the reply message: [pap] login attempt with password "davis45" [pap] No password configured for the user. Cannot do authentication ++[pap] returns fail Failed to authenticate the user. Login incorrect: [miles/davis45] (from client localhost port 0) Using Post-Auth-Type Reject # Executing group from file /etc/freeradius/sites-enabled/default +- entering group REJECT {...} [attr_filter.access_reject] expand: %{User-Name} -> miles attr_filter: Matched entry DEFAULT at line 11 ++[attr_filter.access_reject] returns updated Delaying reject of request 1 for 1 seconds Going to the next request Waking up in 0.9 seconds. Sending delayed reject for request 1 Sending Access-Reject of id 230 to 127.0.0.1 port 59377 Reply-Message = "Hello, miles" 2012/7/3 Andreas Meyer <anmeyer@anup.de>
Hello!
Tiago <sytker@gmail.com> wrote:
Hello, I've just installed freeradius 2.x on an ubuntu server 12.04 with apt-get.
I've follow documentation and I'm stuck on a very basic setup (pap auth). Basically I'm testing the default config using the users file to test auth with radtest.
So, here is the thing:
*users file - first line: teste Cleartext-Password:="teste"*
My entry in the user file looks like this:
miles<-><------>Cleartext-Password := "davis45" <------><------>Reply-Message = "Hello, %{User-Name}"
Does this help?
Andreas - List info/subscribe/unsubscribe? See http://www.freeradius.org/list/users.html
N
On Tue, Jul 3, 2012 at 8:53 PM, Tiago <sytker@gmail.com> wrote:
No, still getting errors, but it sends the reply message:
[pap] login attempt with password "davis45" [pap] No password configured for the user. Cannot do authentication
Did you do what John suggests, add spaces like the example on users file? What does your entry currently looks like? Did the debug log show it's reading that user file? -- Fajar
Hello Fajar, Yes, I did, here is my users file: teste Cleartext-Password := "teste" miles Cleartext-Password := "davis45" Reply-Message = "Hello, %{User-Name}" The only entry refering to users file is this when I run freeradius -X: Module: Linked to module rlm_files Module: Instantiating module "files" from file /etc/freeradius/modules/files files { * usersfile = "/etc/freeradius/users"* acctusersfile = "/etc/freeradius/acct_users" preproxy_usersfile = "/etc/freeradius/preproxy_users" compat = "no" } 2012/7/3 Fajar A. Nugraha <list@fajar.net>
On Tue, Jul 3, 2012 at 8:53 PM, Tiago <sytker@gmail.com> wrote:
No, still getting errors, but it sends the reply message:
[pap] login attempt with password "davis45" [pap] No password configured for the user. Cannot do authentication
Did you do what John suggests, add spaces like the example on users file? What does your entry currently looks like? Did the debug log show it's reading that user file?
-- Fajar - List info/subscribe/unsubscribe? See http://www.freeradius.org/list/users.html
On Tue, Jul 3, 2012 at 9:20 PM, Tiago <sytker@gmail.com> wrote:
Hello Fajar, Yes, I did, here is my users file:
teste Cleartext-Password := "teste" miles Cleartext-Password := "davis45" Reply-Message = "Hello, %{User-Name}"
The only entry refering to users file is this when I run freeradius -X: Module: Linked to module rlm_files Module: Instantiating module "files" from file /etc/freeradius/modules/files files { usersfile = "/etc/freeradius/users" acctusersfile = "/etc/freeradius/acct_users" preproxy_usersfile = "/etc/freeradius/preproxy_users" compat = "no" }
Then read the rest of the debug log. It should print (on authorize phase) which lines matched, and you can compare whether it's the correct line. Since you cut that part, no one else will be able to help you. -- Fajar
Sorry, here is my complete debug log: http://pastebin.com/dYWb5tDs 2012/7/3 Fajar A. Nugraha <list@fajar.net>
On Tue, Jul 3, 2012 at 9:20 PM, Tiago <sytker@gmail.com> wrote:
Hello Fajar, Yes, I did, here is my users file:
teste Cleartext-Password := "teste" miles Cleartext-Password := "davis45" Reply-Message = "Hello, %{User-Name}"
The only entry refering to users file is this when I run freeradius -X: Module: Linked to module rlm_files Module: Instantiating module "files" from file /etc/freeradius/modules/files files { usersfile = "/etc/freeradius/users" acctusersfile = "/etc/freeradius/acct_users" preproxy_usersfile = "/etc/freeradius/preproxy_users" compat = "no" }
Then read the rest of the debug log. It should print (on authorize phase) which lines matched, and you can compare whether it's the correct line. Since you cut that part, no one else will be able to help you.
-- Fajar - List info/subscribe/unsubscribe? See http://www.freeradius.org/list/users.html
Hi,
Sorry, here is my complete debug log: [1]http://pastebin.com/dYWb5tDs
no it isnt. thats not complete - thats just the startup...where is the actual log when an event happens..this debug log just ends with Listening on authentication address * port 1812 Listening on authentication address 127.0.0.1 port 18120 as server inner-tunnel Listening on proxy address * port 1814 Ready to process requests. and please dont use pastebin etc - just post the full output to this list. its not big its just simple and easy for us to help you then. alan
Alan, My first message had that data, I'm pasting here again - after ready to process line, thanks. Ready to process requests. rad_recv: Access-Request packet from host 127.0.0.1 port 44400, id=204, length=57 User-Name = "miles" User-Password = "davis45" NAS-IP-Address = 201.23.200.7 NAS-Port = 0 # Executing section authorize from file /etc/freeradius/sites-enabled/default +- entering group authorize {...} ++[preprocess] returns ok ++[chap] returns noop ++[mschap] returns noop ++[digest] returns noop [suffix] No '@' in User-Name = "miles", looking up realm NULL [suffix] No such realm "NULL" ++[suffix] returns noop [eap] No EAP-Message, not doing EAP ++[eap] returns noop [files] users: Matched entry miles at line 3 [files] expand: Hello, %{User-Name} -> Hello, miles ++[files] returns ok ++[expiration] returns noop ++[logintime] returns noop ++[pap] returns updated Found Auth-Type = PAP # Executing group from file /etc/freeradius/sites-enabled/default +- entering group PAP {...} [pap] login attempt with password "davis45" [pap] No password configured for the user. Cannot do authentication ++[pap] returns fail Failed to authenticate the user. Login incorrect: [miles/davis45] (from client localhost port 0) Using Post-Auth-Type Reject # Executing group from file /etc/freeradius/sites-enabled/default +- entering group REJECT {...} [attr_filter.access_reject] expand: %{User-Name} -> miles attr_filter: Matched entry DEFAULT at line 11 ++[attr_filter.access_reject] returns updated Delaying reject of request 0 for 1 seconds Going to the next request Waking up in 0.9 seconds. Sending delayed reject for request 0 Sending Access-Reject of id 204 to 127.0.0.1 port 44400 Reply-Message = "Hello, miles" Waking up in 4.9 seconds. Cleaning up request 0 ID 204 with timestamp +10 Ready to process requests. 2012/7/3 alan buxey <A.L.M.Buxey@lboro.ac.uk>
Hi,
Sorry, here is my complete debug log: [1]http://pastebin.com/dYWb5tDs
no it isnt. thats not complete - thats just the startup...where is the actual log when an event happens..this debug log just ends with
Listening on authentication address * port 1812 Listening on authentication address 127.0.0.1 port 18120 as server inner-tunnel
Listening on proxy address * port 1814 Ready to process requests.
and please dont use pastebin etc - just post the full output to this list. its not big its just simple and easy for us to help you then.
alan - List info/subscribe/unsubscribe? See http://www.freeradius.org/list/users.html
On Tue, Jul 3, 2012 at 10:13 PM, Tiago <sytker@gmail.com> wrote:
Alan, My first message had that data, I'm pasting here again - after ready to process line, thanks.
It works on my setup.
[files] users: Matched entry miles at line 3 [files] expand: Hello, %{User-Name} -> Hello, miles ++[files] returns ok
Check your users file again. If you don't have empty lines on top, and your users file is what you pasted earlier, it should say "line 2" instead of "line 3". Recreate from scratch if necessary. My users file is like this #=========== testuser1 Cleartext-Password := "testpass" testuser2 Cleartext-Password := "testpass" Reply-Message := "Hello %{User-Name}" #=========== and doing a "radtest testuser2 testpass 127.0.0.1 0 testing123" gets me #============== [files] users: Matched entry testuser2 at line 2 [files] expand: Hello %{User-Name} -> Hello testuser2 ++[files] returns ok #============== Maybe it's extra line on your users file, or tab vs space issue, or something else that I don't know about. Try copy-paste from mine (minus the comment mark), and see if you get the correct line (which is line 2 in my example). ... and if you've modified anything else on the config files, better start from scratch (e.g. apt-get purge, apt-get install) just to be sure. -- Fajar
Hello, Even removing users file and recreating it didn't work (same error) I did a purge/reinstall and it solved the problem O.o. Well, thanks very much for the help! 2012/7/3 Fajar A. Nugraha <list@fajar.net>
On Tue, Jul 3, 2012 at 10:13 PM, Tiago <sytker@gmail.com> wrote:
Alan, My first message had that data, I'm pasting here again - after ready to process line, thanks.
It works on my setup.
[files] users: Matched entry miles at line 3 [files] expand: Hello, %{User-Name} -> Hello, miles ++[files] returns ok
Check your users file again. If you don't have empty lines on top, and your users file is what you pasted earlier, it should say "line 2" instead of "line 3". Recreate from scratch if necessary. My users file is like this
#=========== testuser1 Cleartext-Password := "testpass" testuser2 Cleartext-Password := "testpass" Reply-Message := "Hello %{User-Name}" #===========
and doing a "radtest testuser2 testpass 127.0.0.1 0 testing123" gets me
#============== [files] users: Matched entry testuser2 at line 2 [files] expand: Hello %{User-Name} -> Hello testuser2 ++[files] returns ok #==============
Maybe it's extra line on your users file, or tab vs space issue, or something else that I don't know about. Try copy-paste from mine (minus the comment mark), and see if you get the correct line (which is line 2 in my example).
... and if you've modified anything else on the config files, better start from scratch (e.g. apt-get purge, apt-get install) just to be sure.
-- Fajar - List info/subscribe/unsubscribe? See http://www.freeradius.org/list/users.html
On 07/03/2012 09:33 AM, Tiago wrote:
Hello, I've just installed freeradius 2.x on an ubuntu server 12.04 with apt-get.
I've follow documentation and I'm stuck on a very basic setup (pap auth). Basically I'm testing the default config using the users file to test auth with radtest.
So, here is the thing:
*users file - first line: teste Cleartext-Password:="teste"*
Try adding spaces around the operator (:=) like the example suggests.
Ok, is that so obvious that I'm blind? Is there pap auth looking for another file instead users file?
The debug output tells you what file it's reading, read the output. -- John Dennis <jdennis@redhat.com> Looking to carve out IT costs? www.redhat.com/carveoutcosts/
participants (5)
-
alan buxey -
Andreas Meyer -
Fajar A. Nugraha -
John Dennis -
Tiago