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!

cPanel Control Panel "Last Login" clarification

Discussion in 'General Discussion' started by martin MHC, Oct 25, 2016.

  1. martin MHC

    martin MHC Well-Known Member

    Joined:
    Sep 14, 2016
    Messages:
    90
    Likes Received:
    11
    Trophy Points:
    8
    Location:
    UK
    cPanel Access Level:
    Root Administrator
    Hello
    I have numerous CPanel accounts I usually access via WHM, and many of these accounts have a "CPanel Last Login" on the mainpage of the CPanel, something like:

    *******************
    **General Information**

    Current User : example
    Primary Domain : example.tld
    Home Directory : /home/example
    Last Login : 1.2.3.4
    Theme : paper_lantern

    *******************

    Now, This is not my IP and clients do not have access directly to CPanel, so I am curious where this IP address comes from?

    Does this IP address include email accesses to account emails? I also assume this IP address is account specific rather than server specific (I have many CPanels on one server).

    If not, where else can this IP address come from, because as I say, if it's not me and not my server folks (it isn't) and not email accounts, then the option left is that it's someone else logging in using the CPanel login.

    Obviously this would be an issue, and I do know that ultimately this can be checked with the reference to the logs file ( cPanel login logs ) but I would rather have a clear idea of the method of this "Last Login" report generation.

    Thank you for the clarifications.
     
    #1 martin MHC, Oct 25, 2016
    Last edited by a moderator: Oct 25, 2016
    prodjex likes this.
  2. cPanelMichael

    cPanelMichael Forums Analyst
    Staff Member

    Joined:
    Apr 11, 2011
    Messages:
    44,386
    Likes Received:
    1,857
    Trophy Points:
    363
    cPanel Access Level:
    Root Administrator
    Hello,

    The last login feature will only update the the IP address that logs in via cPanel if it's different than the previous entry. In other words, if you directly view the /home/$username/.lastlogin file, the IP address displayed in cPanel should be the last IP address listed in this file that's not your own. Here's an example of the output from this file on a test system:

    Code:
    10.1.1.1 # 2016-10-04 16:40:39 -0500
    10.2.2.2# 2016-10-27 14:33:05 -0500
    
    If my IP address is "10.2.2.2", then I would see "10.1.1.1" in cPanel because it's the most recent entry in this file that isn't my own IP address. In addition, if I continue to login as "10.2.2.2", the file isn't updated unless the IP address logging in changes.

    I've opened a case with our documentation team to update the following document to better reflect this behavior.

    The cPanel Interface - Documentation - cPanel Documentation

    Thank you.
     
    Stop hovering to collapse... Click to collapse... Hover to expand... Click to expand...
    prodjex likes this.
  3. martin MHC

    martin MHC Well-Known Member

    Joined:
    Sep 14, 2016
    Messages:
    90
    Likes Received:
    11
    Trophy Points:
    8
    Location:
    UK
    cPanel Access Level:
    Root Administrator
    Thanks for the feedback, Michael. Exploring the .lastlogin file does put my mind at rest. Perhaps if CPanel can add a date/time detail to the info (for instance an HTML title tag) on the CPanel main page that would be very helpful (I imagine easily extracted from the comment data). I guess I should submit a feature request for this.
     
    prodjex and cPanelMichael like this.
  4. cPanelMichael

    cPanelMichael Forums Analyst
    Staff Member

    Joined:
    Apr 11, 2011
    Messages:
    44,386
    Likes Received:
    1,857
    Trophy Points:
    363
    cPanel Access Level:
    Root Administrator
    Stop hovering to collapse... Click to collapse... Hover to expand... Click to expand...
    prodjex likes this.
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