Cpanel: Last login from?

You know where it tells you “Last login from” on your Cpanel control panel. Does anyone now where it keeps this log so I can see what IP addresses have been logging in lately. Right now it just shows the last login, but it has to keep a log somewhere.

Any ideas?

I`m afraid it onyl stores the last IP not all of them… I have htis write-up on my site…


Also, a few CPanel patches ago, the IP address changed, from the real one, to, so it’s not much help now for me.


ToddW is correct, this is stored under .lastlogin in the $HOME (users home dir), and only keeps the last record.
You could try and make this work differently, but it’s too much trouble when you have the cpsrvd access logs available anyway.

A way around is: I have created my own proxy, based on the idea of using a proxy to access cpanel when behind a firewall (cpanelproxy) and have virtual hosts which have their own logfiles (like my main domain, etc…).
And you can also set up extra security measures since you can run this from your own home dir…

Peter, that appears whenever you access CPanel from SSL.

I am interestd on putting that into my site.

Now I am so not a pro with programming and PHP is kinda new to me. I do know that

<?php echo $_SERVER[‘REMOTE_ADDR’]; ?>

Will display the current ip that is on. I am sure there is a way to take the current ip and write it to a text file. Then when the next time you logon it will display what was last written to the text file.

I am not that good yet to write that code so all you pros that wat to help us noobs out please!!! Thank in advance and you guys rock!!