Abills 0.40b + Mikrotik + DHCP

Ответить
mindless
Сообщения: 3
Зарегистрирован: Чт янв 29, 2009 12:37 pm

Abills 0.40b + Mikrotik + DHCP

Сообщение mindless »

Hello,
I'm sorry I'm writing in English, but my Russian is not so good.
I have a problem setting up abills with Mikrotik dhcp.
I'm trying to use the Dv module logic for DHCP users, but since Mikrotik is inserting the users MAC address as user name in the radius request I need to be able to create logins in the form of MAC addresses.
I did change the USERNAMEREGEXP and MAX_USERNAME_LENGTH in the config.pl so that I don't get the errors "wrong name" and "username too long" but still I couldn't get the web interface to create users with this name.
I don't get any error code, not successful nor error. Just nothing happens. I tried to insert such user name manually into the database users table and I succeeded, but then I have a second problem the abills is returning me "Login Not Exist or Expire" for that user. Is there some data validation check I can't find?
Any help will be appreciated. I hope I was clear enough. You could reply in Russian I understand it.
Thanks!

~AsmodeuS~
Site Admin
Сообщения: 5749
Зарегистрирован: Пт янв 28, 2005 3:11 pm
Контактная информация:

Сообщение ~AsmodeuS~ »

Dhcp логика не будет работать полнофункционально для Dhcp пользователей

какая у Вас версия ?
какие данные вы вносите в логины

mindless
Сообщения: 3
Зарегистрирован: Чт янв 29, 2009 12:37 pm

Сообщение mindless »

First thanks for the answer.
My versions are Abills 0.40b MySql 4.1.10a perl v5.8.6 Apache/1.3.33.
The only functionality I'm trying to use from the Dv module is the radius authentication.And of course the automatic disable of the login when there are no payments for the customer.
This is how my users table looks like:

Код: Выделить всё

| id                | activate   | expire     | credit | reduction | registration | password     | uid | gid | disable | company_id | bill_id | ext_bill_id | credit_date |
| test3             | 0000-00-00 | 0000-00-00 |   0.00 |      0.00 | 2009-01-29   |              |   3 |   0 |       0 |          0 |       6 |           0 | 0000-00-00  |
| 00:01:29:27:81:95 | 0000-00-00 | 0000-00-00 |   0.00 |      0.00 | 2009-01-29   |              |   4 |   0 |       0 |          0 |       7 |           0 | 0000-00-00  |
The only difference between the 2 users is that I added the first one using the interface, and the second one using manual SQL INSERT.
But when I make a radius request with the same parameters except the user name the first user is getting the:

rad_recv: Access-Accept packet from host 127.0.0.1:1812, id=249, length=75
and the second one:

rad_recv: Access-Reject packet from host 127.0.0.1:1812, id=128, length=47
Reply-Message = "Login Not Exist or Expire"

Both users have activated tariff plans. I didn't find anything strange in the Users.pm file where the db query is, but the web interface does not allow me to create users with MAC addresses as login name and returns no error at all.

And the RADIUS reject is coming from the Auth.pm, but there I don't see anything suspicious either.
Any help will be appreciated . Thanks again!

ran
Сообщения: 2298
Зарегистрирован: Вс окт 21, 2007 2:29 pm

Сообщение ran »

The only difference between the 2 users is that I added the first one using the interface, and the second one using manual SQL INSERT.
But when I make a radius request with the same parameters except the user name the first user is getting the:

rad_recv: Access-Accept packet from host 127.0.0.1:1812, id=249, length=75
and the second one:

rad_recv: Access-Reject packet from host 127.0.0.1:1812, id=128, length=47
Reply-Message = "Login Not Exist or Expire"
а почему Вы решили что в случае добавления клиента через вебинтерфейс не корректируются какие-то взаимосвязанные таблицы, чего Вы не учитываете в случае manual SQL INSERT?

mindless
Сообщения: 3
Зарегистрирован: Чт янв 29, 2009 12:37 pm

Сообщение mindless »

That is one of the problems I cannot add a user with name MAC address with the web interface. I don't get any error, but it just doesn't create any user.

Ответить