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.

Turn off SSH accounts all at once

Discussion in 'General Discussion' started by Def, Nov 19, 2005.

  1. Def

    Def Well-Known Member

    Joined:
    Feb 21, 2003
    Messages:
    63
    Likes Received:
    0
    Trophy Points:
    6
    Hi,

    Is there a way to disable all shell accounts on the server (except root of course) in one fell swoop? I had only about 2 or 3 accounts allowed to have SSH but like an idiot clicked on jail all users in WHM/Manage Shell Users. Now there's like 400 shell accounts. Disabling them one at a time isn't appealing.

    Thanks!
     
  2. chirpy

    chirpy Well-Known Member

    Joined:
    Jun 15, 2002
    Messages:
    13,475
    Likes Received:
    20
    Trophy Points:
    38
    Location:
    Go on, have a guess
    The following should do it:

    replace /usr/local/cpanel/bin/jailshell /usr/local/cpanel/bin/noshell -- /etc/passwd
     
  3. Def

    Def Well-Known Member

    Joined:
    Feb 21, 2003
    Messages:
    63
    Likes Received:
    0
    Trophy Points:
    6
    Awesome. Thanks Chirpy.
     
Loading...

Share This Page