pawan.rote

Member
Jul 28, 2011
5
0
51
How can I identify customers who are not using their web hosting account since long. The duration may be more than 30 days. Alternatively I want to know Where can I view last login (date) in cpanel.

I know we can view Last Login From but I real interest in getting the date.
 

cPanelTristan

Quality Assurance Analyst
Staff member
Oct 2, 2010
7,607
42
348
somewhere over the rainbow
cPanel Access Level
Root Administrator
This will get you the last modification time on those files but it doesn't include the file name:

Code:
stat /home/*/.lastlogin | grep -i modify
This will go alphabetically by files found by that name.
 

pawan.rote

Member
Jul 28, 2011
5
0
51
I also want to know the last login in to wordpress and web based email for each customer. Is it stored somewhere in cPanel database? what are possible ways to get the last login details of each customer.
 

JaredR.

Well-Known Member
Feb 25, 2010
1,834
27
143
Houston, TX
cPanel Access Level
Root Administrator
I also want to know the last login in to wordpress and web based email for each customer. Is it stored somewhere in cPanel database? what are possible ways to get the last login details of each customer.
This would be a WordPress issue, and would have nothing to do with cPanel. cPanel does not track log-ins to site software such as WordPress. I did a quick Google search on "wordpress last login" and it looks like there is a plug-in that will do this:

WordPress › WordPress Last Login « WordPress Plugins
 

JaredR.

Well-Known Member
Feb 25, 2010
1,834
27
143
Houston, TX
cPanel Access Level
Root Administrator
I apologize that I overlooked this part of your question. Access to Webmail is logged in the file /usr/local/cpanel/logs/access_log. The data are stored in Apache-style format, with timestamps, source IP address, browser used, and other data. There is no way to view this file from the WebHost Manager. You will need to log into the server as root via SSH and use commands like vi, grep, cat, tail and head to view the file.

Access to all areas of cPanel, including the WebHost Manager, is logged to the same file.