Skip to main content

cPanel User Login Logging?

Comments

6 comments

  • Muhammed Fasal
    Mark, Each cPanel account itself should have a hidden log file in its home directory there as '.lastlogin' to record the history successful logins. To get it, go to 'File Manager' interface and make the hidden files visible by going to the Settings tab from right top corner, and view the file named '.lastlogin' there. This file will log the IP address of the logged in visitor, date and time for reference. If you have the root level SSH access, then you can run below oneliner command to see the successful logins to the cPanel/WHM accounts there: grep "login=1&post_login=" /usr/local/cpanel/logs/access_log | awk '{print $1" : "$3" : "$4}'
    The above one liner could be improved a bit more, I wrote it just now and had no time to make the output even better.
    0
  • Mark Coates
    Thanks :)
    0
  • cPanelLauren
    Thanks @Muhammed Fasal for the awesome response and help!
    0
  • Muhammed Fasal
    Most welcome guys @Mark Coates @cPanelLauren ;)
    0
  • Ed Bergavera
    Mark, Each cPanel account itself should have a hidden log file in its home directory there as '.lastlogin' to record the history successful logins. To get it, go to 'File Manager' interface and make the hidden files visible by going to the Settings tab from right top corner, and view the file named '.lastlogin' there. This file will log the IP address of the logged in visitor, date and time for reference. If you have the root level SSH access, then you can run below oneliner command to see the successful logins to the cPanel/WHM accounts there: grep "login=1&post_login=" /usr/local/cpanel/logs/access_log | awk '{print $1" : "$3" : "$4}'
    The above one liner could be improved a bit more, I wrote it just now and had no time to make the output even better.

    The command really helps!
    0
  • cPanelAnthony
    Hello. I'm happy this post helped you!
    0

Please sign in to leave a comment.