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.

users default shell is /bin/bash !!!! security ??

Discussion in 'Security' started by forlinuxsupport, Dec 23, 2005.

  1. forlinuxsupport

    forlinuxsupport Well-Known Member
    PartnerNOC

    Joined:
    Dec 22, 2004
    Messages:
    386
    Likes Received:
    0
    Trophy Points:
    16
    cPanel Access Level:
    Root Administrator
    Hi

    I just had alook and when you create a new domain it has the box ticked for Shell access, bit silly to have it ticked by default, but not too serious I suppose.

    My main concern is all email users have their shell set to /bin/bash .... surely this cant be right !!!!
    take a look in /etc/vmail/passwd.domainname.co.uk
    (its symlinked to /home/domainname/etc/longdomainname/passwd)

    All email users have a shell by default !!!! eeeek !!!! :confused:
    Please tell me im dreaming ???!!!!!????

    I can't find a way to give them an invalid shell via the interface..
    Should I just set them to something like /dev/null or /bin/nologin .. hmm wonder what that will break .!!

    any comments,, please feel free.

    What is the Jailshell and how does it work ???

    thanks
    andy
     
  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
    No, they don't. SSH doesn't use those files for authentication - it uses /etc/passwd (/etc/shadow).

    If you don't want to give real shell access, then use Packages in WHM. If you want the shell to default to jailshell use the setting for that in WHM > Tweak Settings.
     
  3. forlinuxsupport

    forlinuxsupport Well-Known Member
    PartnerNOC

    Joined:
    Dec 22, 2004
    Messages:
    386
    Likes Received:
    0
    Trophy Points:
    16
    cPanel Access Level:
    Root Administrator
    ahhh .. nice one...

    thanks.. puts my heart at ease :) :p

    What about this jailshell.... Is it worth using ?

    I dont want any users to have ssh access to the server (except me of course (root)), must I set all users to jailshell, or can I put their shells as /bin/nologin ?

    thanks
    andy
     
  4. RizyDeWino

    RizyDeWino Well-Known Member

    Joined:
    Aug 1, 2005
    Messages:
    74
    Likes Received:
    0
    Trophy Points:
    6
    Location:
    Planet Earth
    Jailshell is a very good restricted shell option available with whm/cpanel servers , that you can give your users access to without any worry.

    Hosting clients, when granted shell access, should not be able to see anything except for their domain, their own files, and their own folders. They should feel like they are the only ones on the system. And this is what jailshell do. The users will have a restricted shell access.

    Jailshell also keeps your clients from even attempting anything malicious or overstepping their bounds, because they dont have the rights to open files that they shouldn't, because they are invisible to them due to the restrictions built in the Jailshell.
     
  5. forlinuxsupport

    forlinuxsupport Well-Known Member
    PartnerNOC

    Joined:
    Dec 22, 2004
    Messages:
    386
    Likes Received:
    0
    Trophy Points:
    16
    cPanel Access Level:
    Root Administrator
    Hi

    Cool thanks !!!!!!!!!

    How can I prevent them having SSH access Totally ??

    Cheers
    andy
     
  6. RizyDeWino

    RizyDeWino Well-Known Member

    Joined:
    Aug 1, 2005
    Messages:
    74
    Likes Received:
    0
    Trophy Points:
    6
    Location:
    Planet Earth
    Go to WHM > Account Functions > Manage Shell Access , and simply press the 'Disable' button for both shells for each account.
     
  7. forlinuxsupport

    forlinuxsupport Well-Known Member
    PartnerNOC

    Joined:
    Dec 22, 2004
    Messages:
    386
    Likes Received:
    0
    Trophy Points:
    16
    cPanel Access Level:
    Root Administrator
    Hi

    Here is an extract of my passwd file :
    Can I change postgres and ftp and cpanel to /bin/false ?
    Surley they never login ??

    The bottom 3 are the main domain users, can I change them to /bin/false as well ?
    They never use ssh, I only want root to be able to SSH in.

    If I change them all to /bin/false will it affect anythign else ?

    thanks for the help
    Andy
     
Loading...

Share This Page