Alan DeKok wrote:
Ossama Suleiman <[EMAIL PROTECTED]> wrote:
  
    i am using freeradius 0.8.1 with Redhat 8.0, i wanted to use mysql 
authentication, the problem is that i want to authenticate users 
depending on Calling-Station-Id, so i added an entry (blank username) 
    

  Why?  What's wrong with the DEFAULT configuration?
��� When using the DEFAULT entry with the users file there is no problem at all, but when using it with mysql i got the error message mentioned before below

-i got the following error message that the user-name can't be blank:
------------------------------------------------------------------
rlm_sql (sql): zero length username not permitted
    

  Exactly.  Use DEFAULT.
  
i tried the DEFAULT value, my table looks like this:


+----+--------------+------------------+----------+------+
| id ��� | UserName ��� | Attribute����� ��� �� | Value� ��� � | op�� ��� �|
+----+--------------+------------------+----------+------+
|� 1 ��� | DEFAULT� �| Auth-Type����� ��� | Accept �� | �:=�� ��� � |
|� 2 ��� | DEFAULT� �| Huntgroup-Name | test� � �� ��� | �==�� ��� |
+----+--------------+------------------+----------+------+
but as i said before, this configuration is not working and it still complains about zero length username.

when i commented out that section in rlm_sql.c and replaced the default entry with an blank entry it worked correctly.
my table looked like this in that case:
+----+--------------+------------------+----------+------+
| id ��� | UserName ��� | Attribute����� ��� �� | Value� ��� � | op�� ��� �|
+----+--------------+------------------+----------+------+
|� 1 ��� | ��� ��� ��� ��� � � �| Auth-Type����� ��� | Accept �� | �:=�� ��� � |
|� 2 ��� | ��� ��� ��� ��� ��� �| Huntgroup-Name | test�� � � �� �|� ==�� ��� |
+----+--------------+------------------+----------+------+
this is working fine, and checking the calling-station-id listed in the huntgroup file

  
could somebody correct me if this contains mistakes??
    

  You're doing too much work, and ignoring the examples which tell you
about the DEFAULT user.

  Alan DeKok.
sorry for all the trouble.
Ossama

- List info/subscribe/unsubscribe? See http://www.freeradius.org/list/users.html

Reply via email to