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!

Suspend No Activity Users

Discussion in 'General Discussion' started by GreenVine, Aug 7, 2012.

  1. GreenVine

    GreenVine Member

    Joined:
    Jan 28, 2012
    Messages:
    17
    Likes Received:
    0
    Trophy Points:
    51
    cPanel Access Level:
    Root Administrator
    Hello,
    I want to suspend the users who have not login to cPanel for 120 days, is there any automatically way to do this? Cron job is also ok.
    Many thanks.
     
  2. PlotHost

    PlotHost Well-Known Member

    Joined:
    Apr 29, 2011
    Messages:
    255
    Likes Received:
    2
    Trophy Points:
    68
    Location:
    Romania
    cPanel Access Level:
    Root Administrator
    Twitter:
    I think you can write a script to check the date of /home/user/.lastlogin files and then run /scripts/suspendacct .
     
    Stop hovering to collapse... Click to collapse... Hover to expand... Click to expand...
  3. GreenVine

    GreenVine Member

    Joined:
    Jan 28, 2012
    Messages:
    17
    Likes Received:
    0
    Trophy Points:
    51
    cPanel Access Level:
    Root Administrator
    Hmm...
    This idea is good but I do not know how to write this shell script?
     
  4. Eric

    Eric Administrator
    Staff Member

    Joined:
    Nov 25, 2007
    Messages:
    751
    Likes Received:
    11
    Trophy Points:
    143
    Location:
    Texas
    cPanel Access Level:
    Root Administrator
    Howdy,

    /home/user/.lastlogin has the ip address of the log in not the date/time.

    Sorry

    You could get a good list from the logs

    prints out the users and dates. It's a good start.

    Thanks!
     
    Stop hovering to collapse... Click to collapse... Hover to expand... Click to expand...
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