Hello,<br><br>I want to send the NoCat user Class in the Access-Accept.<br><br>I don't know if I can send an attribute defined by me.<br><br>I have defined an attributed:<br><br># cat /etc/freeradius/dictionary<br>$INCLUDE /usr/share/freeradius/dictionary<br>
ATTRIBUTE NoCat-User-Class 3000 string<br><br>And I put this attribute in the reply list with MySQL:<br><br>mysql> select * from radgroupreply;<br>+----+-----------+------------------+----+------------------------------+<br>
| id | groupname | attribute | op | value |<br>+----+-----------+------------------+----+------------------------------+<br>| 6 | MEMBER | NoCat-User-Class | := | Member | <br>
+----+-----------+------------------+----+------------------------------+<br><br>mysql> select * from radusergroup;<br>+----------+-----------+----------+<br>| username | groupname | priority |<br>+----------+-----------+----------+<br>
| ana | CAU1 | 0 | <br>| ana | MEMBER | 8 | <br>+----------+-----------+----------+<br><br>But the server don send this attribute to the user. Debug info:<br><br>rad_recv: Access-Request packet from host X port 33606, id=250, length=55<br>
User-Name = "ana"<br> User-Password = "claveAna"<br> NAS-IP-Address = 127.0.1.1<br> NAS-Port = 0<br>+- entering group authorize {...}<br>sql_xlat<br> expand: %{User-Name} -> ana<br>sql_set_user escaped user --> 'ana'<br>
expand: select shortname from nas where nasname="%{Client-IP-Address}" -> select shortname from nas where nasname="X"<br> expand: /var/log/freeradius/sqltrace.sql -> /var/log/freeradius/sqltrace.sql<br>
rlm_sql (sql): Reserving sql socket id: 3<br>rlm_sql_mysql: query: select shortname from nas where nasname="X"<br>sql_xlat finished<br>rlm_sql (sql): Released sql socket id: 3<br> expand: %{sql:select shortname from nas where nasname="%{Client-IP-Address}"} -> pcCAU1<br>
++[request] returns notfound<br>++[preprocess] returns ok<br>++[mschap] returns noop<br>[suffix] No '@' in User-Name = "ana", looking up realm NULL<br>[suffix] No such realm "NULL"<br>++[suffix] returns noop<br>
[eap] No EAP-Message, not doing EAP<br>++[eap] returns noop<br>++[files] returns noop<br>[sql] expand: %{User-Name} -> ana<br>[sql] sql_set_user escaped user --> 'ana'<br>rlm_sql (sql): Reserving sql socket id: 2<br>
[sql] expand: SELECT id, username, attribute, value, op FROM radcheck WHERE username = BINARY '%{SQL-User-Name}' ORDER BY id -> SELECT id, username, attribute, value, op FROM radcheck WHERE username = BINARY 'ana' ORDER BY id<br>
rlm_sql_mysql: query: SELECT id, username, attribute, value, op FROM radcheck WHERE username = BINARY 'ana' ORDER BY id<br>[sql] User found in radcheck table<br>[sql] expand: SELECT id, username, attribute, value, op FROM radreply WHERE username = BINARY '%{SQL-User-Name}' ORDER BY id -> SELECT id, username, attribute, value, op FROM radreply WHERE username = BINARY 'ana' ORDER BY id<br>
rlm_sql_mysql: query: SELECT id, username, attribute, value, op FROM radreply WHERE username = BINARY 'ana' ORDER BY id<br>[sql] expand: SELECT groupname FROM radusergroup WHERE username = BINARY '%{SQL-User-Name}' ORDER BY priority -> SELECT groupname FROM radusergroup WHERE username = BINARY 'ana' ORDER BY priority<br>
rlm_sql_mysql: query: SELECT groupname FROM radusergroup WHERE username = BINARY 'ana' ORDER BY priority<br>[sql] expand: SELECT id, groupname, attribute, Value, op FROM radgroupcheck WHERE groupname = '%{Sql-Group}' ORDER BY id -> SELECT id, groupname, attribute, Value, op FROM radgroupcheck WHERE groupname = 'CAU1' ORDER BY id<br>
rlm_sql_mysql: query: SELECT id, groupname, attribute, Value, op FROM radgroupcheck WHERE groupname = 'CAU1' ORDER BY id<br>[sql] expand: SELECT id, groupname, attribute, Value, op FROM radgroupcheck WHERE groupname = '%{Sql-Group}' ORDER BY id -> SELECT id, groupname, attribute, Value, op FROM radgroupcheck WHERE groupname = 'MEMBER' ORDER BY id<br>
rlm_sql_mysql: query: SELECT id, groupname, attribute, Value, op FROM radgroupcheck WHERE groupname = 'MEMBER' ORDER BY id<br>[sql] User found in group MEMBER<br>[sql] expand: SELECT id, groupname, attribute, value, op FROM radgroupreply WHERE groupname = '%{Sql-Group}' ORDER BY id -> SELECT id, groupname, attribute, value, op FROM radgroupreply WHERE groupname = 'MEMBER' ORDER BY id<br>
rlm_sql_mysql: query: SELECT id, groupname, attribute, value, op FROM radgroupreply WHERE groupname = 'MEMBER' ORDER BY id<br>rlm_sql (sql): Released sql socket id: 2<br>++[sql] returns ok<br>
[expiration] Checking Expiration time: '02 Dec 2010'<br>++[expiration] returns ok<br>++[pap] returns updated<br>Found Auth-Type = PAP<br>+- entering group PAP {...}<br>[pap] login attempt with password "claveAna"<br>
[pap] Using clear text password "claveAna"<br>[pap] User authenticated successfully<br>++[pap] returns ok<br>+- entering group post-auth {...}<br>[sql] expand: %{User-Name} -> ana<br>[sql] sql_set_user escaped user --> 'ana'<br>
[sql] expand: INSERT INTO radpostauth (username, mac, client, nas, reply, authdate) VALUES ( '%{User-Name}', '%{Calling-Station-Id}', '%C', '%{Nas-IP-Address}', '%{reply:Packet-Type}', NOW()) -> INSERT INTO radpostauth (username, mac, client, nas, reply, authdate) VALUES ( 'ana', '', 'pcCAU1', '127.0.1.1', 'Access-Accept', NOW())<br>
[sql] expand: /var/log/freeradius/sqltrace.sql -> /var/log/freeradius/sqltrace.sql<br>rlm_sql (sql) in sql_postauth: query is INSERT INTO radpostauth (username, mac, client, nas, reply, authdate) VALUES ( 'ana', '', 'pcCAU1', '127.0.1.1', 'Access-Accept', NOW())<br>
rlm_sql (sql): Reserving sql socket id: 1<br>rlm_sql_mysql: query: INSERT INTO radpostauth (username, mac, client, nas, reply, authdate) VALUES ( 'ana', '', 'pcCAU1', '127.0.1.1', 'Access-Accept', NOW())<br>
rlm_sql (sql): Released sql socket id: 1<br>++[sql] returns ok<br>Sending Access-Accept of id 250 to X port 33606<br> Reply-Message += "Hola Anita"<br> Session-Timeout = 18189945<br>Finished request 0.<br>
Going to the next request<br>Waking up in 4.9 seconds.<br>Cleaning up request 0 ID 250 with timestamp +6<br>Ready to process requests.<br><br><br>I have found the attribute Class but I think that is more complex than I need.<br>
<br>Some sugestion??<br><br>Thank you very much and sorry for my english.<br><br clear="all"><br>-- <br>____________________<br><br> Ana Gallardo Gómez<br>____________________<br>