Page 1 of 1

Are failed logins logged?

Posted: Sun Sep 27, 2015 4:57 pm
by careycj0219
Does zoneminder log failed logins anywhere, or is it possible to enable? I've searched around with no luck so far.

Re: Are failed logins logged?

Posted: Sun Sep 27, 2015 7:21 pm
by asker
Yes this fix was added recently. It is not part of 1.28.1 but is part of development snapshots. It's a tiny patch to a php file. You can add it to 1.28.1 yourself.
https://github.com/knnniggett/ZoneMinde ... 66ab717576

Re: Are failed logins logged?

Posted: Mon Sep 28, 2015 8:14 pm
by careycj0219
That's just what I was looking for. I ended up expanding just a bit to also log the source ip address, since my goal was to use this with fail2ban.

$remoteAddr = $_SERVER['REMOTE_ADDR'];
Info( "Login successful for user \"$username\" from $remoteAddr" );
Warning( "Login denied for user \"$username\" from $remoteAddr" );

Everything is now working as expected.

Thanks!