From: Kenneth P. <sh...@se...> - 2020-09-02 21:50:43
|
--On Wednesday, September 02, 2020 11:58 AM -0700 Kenneth Porter <sh...@se...> wrote: > Near the end of > /usr/lib/python2.7/site-packages/fail2ban/server/action.py I see: > > if logSys.getEffectiveLevel() < logging.DEBUG: > logSys.log(9, realCmd) I changed this to the following to get the thing to log all commands. Note that Python is sensitive to indentation (which I hate, because tab size influences syntax so editor settings on spaces versus tabs are critical). Make sure the replacement line has the same two tabs in front of it as the if line. logSys.error("executeCmd: %s", realCmd) (Remember to back up the old action.py file so you can restore it once you get this working!) When you start the fail2ban service, you should see a new action.pyc file appear. (It gets recompiled when the script is loaded.) Check /var/log/messages if anything goes wrong in case you have a syntax error. |