在PostGreSql的FreeRadius中,用radpostreply记录用户的登录信息(成功和失败的都记录,成功登录后才记在radacct里面),但是默认情况下,没有记录拨号机的MAC。
vi raddb/mods-config/sql/main/postgresql/queries.conf
找到:
-
query = "\
-
INSERT INTO ${..postauth_table} \
-
(username, pass, reply, authdate) \
-
VALUES(\
-
'%{User-Name}', \
-
'%{%{User-Password}:-Chap-Password}', \
-
'%{reply:Packet-Type}', \
-
NOW())"
-
}
增加一个字段,用%{calling-Station-Id}来替换:
-
query = "\
-
INSERT INTO ${..postauth_table} \
-
(username, pass, reply, callingstationid, authdate) \
-
VALUES(\
-
'%{User-Name}', \
-
'%{%{User-Password}:-Chap-Password}', \
-
'%{reply:Packet-Type}', \
-
'%{Calling-Station-Id}', \
-
NOW())"
-
}
--end--
阅读(4710) | 评论(0) | 转发(0) |