The Community Forums

Interact with an entire community of cPanel & WHM users!
  1. This site uses cookies. By continuing to use this site, you are agreeing to our use of cookies. Learn More.

Fixing MySQL password for "modsec" user, and modsecparse.pl

Discussion in 'Security' started by quizknows, Nov 12, 2014.

  1. quizknows

    quizknows Well-Known Member

    Joined:
    Oct 20, 2009
    Messages:
    942
    Likes Received:
    57
    Trophy Points:
    28
    cPanel Access Level:
    DataCenter Provider
    First off, is modsecparse.pl (the one in /etc/cron.hourly) still needed/used with the 11.46 implementation of ModSecurity?

    Secondly, I was working with it and found that it had the wrong password for the modsec mysql user. I set the mysql user to use the password listed in /etc/cron.hourly/modsecparse.pl, and now WHM cannot access the database. When I load WHM and go to ModSecurity™ Tools I'm greeted with this error:

    I noticed this when I restart the cpanel service from CLI:

    Code:
    Cpanel::TailWatch::ModSecLog appears to have unprocessed SQL in /var/cpanel/sql/modseclog.sql.
    Thoughts?

    I tried upcp --force, a fresh easyapache, and restarting everything, nothing seems to "straighten out" the password that WHM is trying to use to connect to the modsec database.
     
  2. kernow

    kernow Well-Known Member

    Joined:
    Jul 23, 2004
    Messages:
    865
    Likes Received:
    9
    Trophy Points:
    18
    cPanel Access Level:
    Root Administrator
    #2 kernow, Nov 12, 2014
    Last edited: Nov 12, 2014
  3. quizknows

    quizknows Well-Known Member

    Joined:
    Oct 20, 2009
    Messages:
    942
    Likes Received:
    57
    Trophy Points:
    28
    cPanel Access Level:
    DataCenter Provider
    cPanel got back to me, modsecparse.pl is indeed deprecated in 11.46

    The WHM error was fixed by putting the proper mysql password in this file:

    /var/cpanel/modsec_db_pass
     
Loading...

Share This Page