Please whitelist cPanel in your adblocker so that you’re able to see our version release promotions, thanks!

The Community Forums

Interact with an entire community of cPanel & WHM users!

Email notification when cPanel user logs in?

Discussion in 'General Discussion' started by Mash962, Jan 16, 2018.

  1. Mash962

    Mash962 Registered

    Joined:
    Jan 16, 2018
    Messages:
    2
    Likes Received:
    0
    Trophy Points:
    1
    Location:
    Sri Lanka
    cPanel Access Level:
    Website Owner
    Hello.
    Is there any way to get email notification when a user logged to cPanel? I have installed ConfigServer Security & Firewall(csf) to the WHM. Is there any feature in firewall to achieve this target?

    Thanks.
     
  2. rpvw

    rpvw Well-Known Member

    Joined:
    Jul 18, 2013
    Messages:
    823
    Likes Received:
    299
    Trophy Points:
    113
    Location:
    Spain
    cPanel Access Level:
    Root Administrator
    Yes you can:

    In CSF configuration look for LF_CPANEL_ALERT and switch this ON
     
    Stop hovering to collapse... Click to collapse... Hover to expand... Click to expand...
    cPWilliamL likes this.
  3. cPWilliamL

    cPWilliamL cP Technical Analyst II
    Staff Member

    Joined:
    May 15, 2017
    Messages:
    257
    Likes Received:
    29
    Trophy Points:
    103
    Location:
    America
    cPanel Access Level:
    Root Administrator
    Stop hovering to collapse... Click to collapse... Hover to expand... Click to expand...
  4. Mash962

    Mash962 Registered

    Joined:
    Jan 16, 2018
    Messages:
    2
    Likes Received:
    0
    Trophy Points:
    1
    Location:
    Sri Lanka
    cPanel Access Level:
    Website Owner
    Thank you for the response.

    But a notification email never send when I login to cPanel. Is there any configurations?
     
  5. cPanelMichael

    cPanelMichael Technical Support Community Manager
    Staff Member

    Joined:
    Apr 11, 2011
    Messages:
    44,803
    Likes Received:
    1,897
    Trophy Points:
    363
    cPanel Access Level:
    Root Administrator
    Twitter:
    Stop hovering to collapse... Click to collapse... Hover to expand... Click to expand...
  6. jmginer

    jmginer Well-Known Member

    Joined:
    Jul 26, 2006
    Messages:
    108
    Likes Received:
    0
    Trophy Points:
    166
    Location:
    Benifato, Spain
    Stop hovering to collapse... Click to collapse... Hover to expand... Click to expand...
  7. cPanelMichael

    cPanelMichael Technical Support Community Manager
    Staff Member

    Joined:
    Apr 11, 2011
    Messages:
    44,803
    Likes Received:
    1,897
    Trophy Points:
    363
    cPanel Access Level:
    Root Administrator
    Twitter:
    Hello @jmginer,

    In order to use this setting, cPHulk must be enabled in WHM's cPHulk Brute Force Protection interface (WHM >> Security Center >> cPHulk Brute Force Protection).

    Thank you.
     
    Stop hovering to collapse... Click to collapse... Hover to expand... Click to expand...
  8. jmginer

    jmginer Well-Known Member

    Joined:
    Jul 26, 2006
    Messages:
    108
    Likes Received:
    0
    Trophy Points:
    166
    Location:
    Benifato, Spain
    Thanks! I've enabled cphulk, but the option is disabled by default.
    It's possible to enable on all cPanel accounts? and enable by default for new created accounts?

    Thanks!

    [​IMG]
     
    Stop hovering to collapse... Click to collapse... Hover to expand... Click to expand...
  9. cPanelMichael

    cPanelMichael Technical Support Community Manager
    Staff Member

    Joined:
    Apr 11, 2011
    Messages:
    44,803
    Likes Received:
    1,897
    Trophy Points:
    363
    cPanel Access Level:
    Root Administrator
    Twitter:
    Hello @jmginer,

    You'd need to create a bash command that loops the following cPanel API 2 function on all existing accounts:

    cPanel API 2 Functions - CustInfo::savecontactinfo - Developer Documentation - cPanel Documentation

    For new accounts, you could setup a post account creation hook that automatically executes the above cPanel API 2 function. The command for a single account looks like this:

    Code:
    cpapi2 --user=username123 CustInfo savecontactinfo notify_account_login=1
    Additionally, I encourage you to vote for the following feature request if you'd like to see a way to set the defaults through WHM:

    Ability to set defaults for cPanel user notifications

    Thank you.
     
    Stop hovering to collapse... Click to collapse... Hover to expand... Click to expand...
Loading...

Share This Page

  1. This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
    By continuing to use this site, you are consenting to our use of cookies.
    Dismiss Notice