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.

cPanel Control Panel "Last Login" clarification

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

  1. martin MHC

    martin MHC Active Member

    Joined:
    Sep 14, 2016
    Messages:
    29
    Likes Received:
    6
    Trophy Points:
    3
    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
  2. cPanelMichael

    cPanelMichael Forums Analyst
    Staff Member

    Joined:
    Apr 11, 2011
    Messages:
    37,037
    Likes Received:
    1,281
    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.
     
  3. martin MHC

    martin MHC Active Member

    Joined:
    Sep 14, 2016
    Messages:
    29
    Likes Received:
    6
    Trophy Points:
    3
    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.
     
    cPanelMichael likes this.
  4. cPanelMichael

    cPanelMichael Forums Analyst
    Staff Member

    Joined:
    Apr 11, 2011
    Messages:
    37,037
    Likes Received:
    1,281
    Trophy Points:
    363
    cPanel Access Level:
    Root Administrator
Loading...

Share This Page