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.

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:
    1
    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:
    253
    Likes Received:
    1
    Trophy Points:
    18
    Location:
    US
    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 .
     
  3. GreenVine

    GreenVine Member

    Joined:
    Jan 28, 2012
    Messages:
    17
    Likes Received:
    0
    Trophy Points:
    1
    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:
    746
    Likes Received:
    11
    Trophy Points:
    18
    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!
     
Loading...

Share This Page