log message when logintime returns userlock?

Josef Vybíhal josef.vybihal at gmail.com
Mon May 16 14:11:22 UTC 2022


HI list,
I just set up the 'logintime' module. It works great - no problem there.
I wanted to add one last thing - log when the user tries to login
outside of allowed timeframe. It seemed easy to do: If the 'logintime'
module returns 'userlock', I will just call the linelog module.

post-auth {
...
                logintime
                if (userlock) {
                        log_locked_by_logintime
                }
...
}


But this does not do what I expected. After logintime returns
'userlock', nothing else following in post-auth section is called.
Snippet from debug:

(9)         } # policy assign_vlan = noop
(9) logintime: Checking Login-Time
(9)         [logintime] = userlock
(9)       } # if (1)  = userlock
(9)     } # post-auth = userlock
(9)   Using Post-Auth-Type Reject

Technically it's inside of the if (1) {} condition, I have tried to
move it outside of it, but the behavior was the same.

Is this expected? Is there some trick how I can call the linelog in
case of userlock?

Due to the length of it, I have put full debug log here:
https://up.jvi.cz/log_logintime.log

Josef


More information about the Freeradius-Users mailing list