--- BUILD/freeradius-server-2.1.10/src/modules/rlm_unix/rlm_unix.c-orign 2011-11-14 16:04:38.795620370 +0200 +++ BUILD/freeradius-server-2.1.10/src/modules/rlm_unix/rlm_unix.c 2011-11-14 16:06:46.293616405 +0200 @@ -274,9 +274,17 @@ /* * Check if password has expired. */ + if (spwd && spwd->sp_lstchg > 0 && spwd->sp_max >= 0 && + (request->timestamp / 86400) > (spwd->sp_lstchg + spwd->sp_max)) { + radlog_request(L_AUTH, 0, request, "[%s]: password has expired", name); + return RLM_MODULE_REJECT; + } + /* + * Check if account has expired. + */ if (spwd && spwd->sp_expire > 0 && (request->timestamp / 86400) > spwd->sp_expire) { - radlog_request(L_AUTH, 0, request, "[%s]: password has expired", name); + radlog_request(L_AUTH, 0, request, "[%s]: account has expired", name); return RLM_MODULE_REJECT; } #endif