LINUX.ORG.RU
решено ФорумAdmin

Доступ WPA по паролю через freeradius, пользователи в sql


0

1

Доброго всем.

Задача: доступ в беспроводную сеть (WPA) по паролям через freeradius.

Настроил и работает доступ через файл пользователей raddb/users c одной строчкой на пользователя:

...
пользователь    Cleartext-Password := "пароль"
...

Проверил утилитой wpa_supplicant/eapol_test протоколы PEAP, EAP-TLS, EAP-TTLS-MD5 и EAP-TTLS-MSCHAPv2, все нормально - SUCCESS.

Теперь хочу сделать проверку записей пользователей из sql, как написано в http://wiki.freeradius.org/SQL-HOWTO. Делаю одну запись для пользователя в таблице radcheck

...
пользователь          | Cleartext-Password | :=            | пароль 
...

Radius нормально коннектится к базе, на первом же запросе в цепочке авторизации выдает:

...
++[sql] returns ok
....

Дальше продолжается цепочка запросов уже без участия sql.

И вот оно, на 8 запросе вижу, что срабатывает конфиг inner-tunnel:

...
server inner-tunnel {
# Executing section authorize from file /usr/local/etc/raddb/sites-enabled/inner-tunnel
+- entering group authorize {...}
...

В случае с доступом через файл raddb/users вижу такое:

...
[mschap] Told to do MS-CHAPv2 for test with NT-Password
[mschap] adding MS-CHAPv2 MPPE keys
++[mschap] returns ok
MSCHAP Success
...

А вот в случае с sql доступом хуже:

...
[mschapv2] # Executing group from file /usr/local/etc/raddb/sites-enabled/inner-tunnel
[mschapv2] +- entering group MS-CHAP {...}
[mschap] No Cleartext-Password configured.  Cannot create LM-Password.
[mschap] No Cleartext-Password configured.  Cannot create NT-Password.
[mschap] Creating challenge hash with username: test
[mschap] Told to do MS-CHAPv2 for test with NT-Password
[mschap] FAILED: No NT/LM-Password.  Cannot perform authentication.
[mschap] FAILED: MS-CHAP2-Response is incorrect
++[mschap] returns reject
[eap] Freeing handler
++[eap] returns reject
Failed to authenticate the user.
...

Естественно предположение, что не хватает прописать sql в raddb/sites-enabled/inner-tunnel, но об этом ни слова в http://wiki.freeradius.org/SQL-HOWTO

Другое предположение, что может надо прописать какие-то записи отклика в sql-таблицу/ы radreply/radgroupreply

Буду рад комментариям, может кто делал подобное. Спасибо.

С уважением, Михаил

In reply to this post by Denis Iskandarov
On 09/10/2010 09:18 AM, Denis Iskandarov wrote:

You have deleted the output which is needed to help you.

Found Auth-Type = MSCHAP
+- entering group MS-CHAP {...}
[mschap] No Cleartext-Password configured. Cannot create LM-Password.
[mschap] No Cleartext-Password configured. Cannot create NT-Password.


So... you haven't told the server what the «known good» password is
for the user. Go fix that.


Sorry i didn't understand you. which good known password ?I'm using
daloRADIUS. and while creating user i appended cleartext password :=
to it:
Here is output of radcheck table:

mysql> select * from radcheck;
+----+----------+--------------------+----+---------+
| id | username | attribute | op | value |
+----+----------+--------------------+----+---------+
| 2 | ubnt123 | Cleartext-Password | := | ubnt321 |
+----+----------+--------------------+----+---------+

It's almost same string as in users text conf, but in mysql table form.
Something changed while using sql. freeradius or mschap can't
understand this field. Don't know why.
Here is full debug output:

... [show rest of quote]

It doesn't look like you've got sql enabled in the inner tunnel (e.g.
the virtual server invoked after a TLS session is established). Edit
your config to enable sql in the inner-tunnel.

http://freeradius.1045715.n5.nabble.com/FreeRadius2-daloRAIUS-mschap-problem-...

zgen ★★★★★
()
Ответ на: комментарий от zgen

Спасибо, zgen

In reply to this post by Denis Iskandarov Thanks too all of You !!!!! It worked!!!!!!! I saw all the documentations on freeradius, different howtos and forum threads, but didn't saw this option. why people didn't wrote about this.

chegeware
() автор топика
Вы не можете добавлять комментарии в эту тему. Тема перемещена в архив.