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!

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:
    156
    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,460
    Likes Received:
    21
    Trophy Points:
    463
    Location:
    Go on, have a guess
    The following should do it:

    replace /usr/local/cpanel/bin/jailshell /usr/local/cpanel/bin/noshell -- /etc/passwd
     
    Stop hovering to collapse... Click to collapse... Hover to expand... Click to expand...
  3. Def

    Def Well-Known Member

    Joined:
    Feb 21, 2003
    Messages:
    63
    Likes Received:
    0
    Trophy Points:
    156
    Awesome. Thanks Chirpy.
     
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