Changing Reply-Message for expired Password
$ freeradius -v freeradius: FreeRADIUS Version 1.1.6, for host i486-pc-linux-gnu, built on Jun 8 2007 at 17:17:46 I'm using Freeradius, with MySQL (rlm_sql) as the backend for Coova Chilli (and it's JSON interface). Unfortunately, the reply-message when the password is expired, contains a newline at the end, which breaks chilli (due to the newline being in the JSON object, which breaks). Short of recompiling Freeradius with the newlines removed, is there an easier way to change this reply-message? It appears in some versions of FreeRadius there is a rlm_expiration module or something which allows it to be changed? If I have to upgrade manually (using Ubuntu Server), then I'm sure I can do that. But I'd rather not upgrade yet (seeing as everything other than that is work, so I don't want to break other stuff for a minor breakage). Thanks Tim
Tim White wrote:
$ freeradius -v freeradius: FreeRADIUS Version 1.1.6, for host i486-pc-linux-gnu, built on Jun 8 2007 at 17:17:46
I'm using Freeradius, with MySQL (rlm_sql) as the backend for Coova Chilli (and it's JSON interface). Unfortunately, the reply-message when the password is expired, contains a newline at the end, which breaks chilli (due to the newline being in the JSON object, which breaks). Short of recompiling Freeradius with the newlines removed, is there an easier way to change this reply-message?
Assuming you mean a radius Reply-Message attribute in the Access-Accept or Access-Reject, there are two possibilities: 1. You have put the newline in yourself, either in files (/etc/raddb/users) or the SQL/LDAP/other lookup 2. It's in their accidentally I'm going to take a wild guess and say you forgot the closing " in /etc/raddb/users i.e. you have: DEFAULT Reply-Message = "there will be a newline here As advised in the docs and on this mailing list daily, run the server in debug mode (-X) to see where the newline is actually coming from.
It appears in some versions of FreeRadius there is a rlm_expiration module or something which allows it to be changed?
If I have to upgrade manually (using Ubuntu Server), then I'm sure I can do that. But I'd rather not upgrade yet (seeing as everything other than that is work, so I don't want to break other stuff for a minor breakage).
Thanks
Tim - List info/subscribe/unsubscribe? See http://www.freeradius.org/list/users.html
Phil Mayers wrote:
Tim White wrote:
$ freeradius -v freeradius: FreeRADIUS Version 1.1.6, for host i486-pc-linux-gnu, built on Jun 8 2007 at 17:17:46
I'm using Freeradius, with MySQL (rlm_sql) as the backend for Coova Chilli (and it's JSON interface). Unfortunately, the reply-message when the password is expired, contains a newline at the end, which breaks chilli (due to the newline being in the JSON object, which breaks). Short of recompiling Freeradius with the newlines removed, is there an easier way to change this reply-message?
Assuming you mean a radius Reply-Message attribute in the Access-Accept or Access-Reject, there are two possibilities: Yes
1. You have put the newline in yourself, either in files (/etc/raddb/users) or the SQL/LDAP/other lookup 2. It's in their accidentally
I'm going to take a wild guess and say you forgot the closing " in /etc/raddb/users i.e. you have:
DEFAULT Reply-Message = "there will be a newline here Firstly, I'm not using files at all, and as it's the Reply-Message for when a password has expired, it's not going to be in /etc/raddb/users anyway, as when a password has expired, the server replaces all the Reply-Message attributes with it's own. In this case, the one with the newline.
As advised in the docs and on this mailing list daily, run the server in debug mode (-X) to see where the newline is actually coming from. I did that.
I've now got the sources, and it appears to be in the src that the problem is. freeradius-1.1.7/src/main/auth.c:84 "Password Has Expired\r\n", Looking the the 2.0.2 sources, I see the same problem, except I understand seeing as this code is in rlm_expiration now, that it can be overridden in config files. freeradius-2.0.2/src/modules/rlm_expiration/rlm_expiration.c:54 NULL, "Password Has Expired\r\n"}, So from my quick look, is there no way to fix this in 1.1.7 without recompiling freeradius? If not, anyone know of a package for 2.0.2 for Ubuntu? Thanks Tim
Tim White wrote:
I'm using Freeradius, with MySQL (rlm_sql) as the backend for Coova Chilli (and it's JSON interface). Unfortunately, the reply-message when the password is expired, contains a newline at the end, which breaks chilli (due to the newline being in the JSON object, which breaks).
Then Chillispot is buggy. People have been putting newlines in Reply-Message for well over a decade.
I've now got the sources, and it appears to be in the src that the problem is. freeradius-1.1.7/src/main/auth.c:84 "Password Has Expired\r\n",
Yes.
Looking the the 2.0.2 sources, I see the same problem, except I understand seeing as this code is in rlm_expiration now, that it can be overridden in config files. freeradius-2.0.2/src/modules/rlm_expiration/rlm_expiration.c:54 NULL, "Password Has Expired\r\n"},
Yes.
So from my quick look, is there no way to fix this in 1.1.7 without recompiling freeradius? If not, anyone know of a package for 2.0.2 for Ubuntu?
Download 2.0.2, and follow the instructions on the Wiki for building a Debian package. Alan DeKok.
participants (3)
-
Alan DeKok -
Phil Mayers -
Tim White