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.

Can the words JAILROOT be hidden

Discussion in 'General Discussion' started by sexy_guy, Mar 26, 2003.

  1. sexy_guy

    sexy_guy Well-Known Member

    Joined:
    Mar 19, 2003
    Messages:
    848
    Likes Received:
    0
    Trophy Points:
    16
    The Jailroot is nice but it does lead to some concerns cosmetically. The problem is that when someone ssh's to the box they see the words jailshell-2.05$. Why does the prompts need to show jailshell-2.05$? Do we have to bring it to the users attention that its a jailshell? Wouldn't it be better if it just didnt show these words? It raises the question in any users mind that they could possibly try to break out of it or attempt to circumvent the security features of Jailshell. Most of the jail shells iv worked with have not bought this to a users attention and they find out about it when they cannot perform certain functions.

    Thanks
     
  2. vis

    vis Member

    Joined:
    Feb 16, 2002
    Messages:
    15
    Likes Received:
    0
    Trophy Points:
    1
    Yes it can be, it's more work, and cpanel won't show users as jailshell's but it can be done.

    make a symlink to like so

    ln -s /usr/local/cpanel/bin/jailshell /bin/sshell

    then modify /etc/passwd

    and change the shell to /bin/sshell

    for any user.....

    then they show up as [sshell-2.05a]

    and 'sshell' is only an example, you can use anything.
     
  3. sexy_guy

    sexy_guy Well-Known Member

    Joined:
    Mar 19, 2003
    Messages:
    848
    Likes Received:
    0
    Trophy Points:
    16
    Oh thanks, i may try this. The question is, the next time we upgrade cpanel to a new E will everthing be setback to the way it was before we made the change? Its very annoying to know that most everthing you upgrade, customize, is undone with a upgrade.
     
  4. vis

    vis Member

    Joined:
    Feb 16, 2002
    Messages:
    15
    Likes Received:
    0
    Trophy Points:
    1
    I wouldn't imagine so, since your not actually renaming or changing any actual cpanel settings, you should be all set.
     
  5. TRAIN YARD SOFTWARE

    TRAIN YARD SOFTWARE Well-Known Member

    Joined:
    Dec 20, 2001
    Messages:
    224
    Likes Received:
    0
    Trophy Points:
    16
    I have tested this and it should be like this:

    ln -s /usr/local/cpanel/bin/jailshell /usr/local/cpanel/bin/sshell

    then modify /etc/passwd

    and change the shell to /bin/sshell

    but anyway Thanks.
     
  6. jsteel

    jsteel Well-Known Member

    Joined:
    Jul 4, 2002
    Messages:
    646
    Likes Received:
    0
    Trophy Points:
    16
    Location:
    Atlanta, GA
    You can put the symbolic link anywhere you want. It can reside in /bin just fine (just like all of the other shells), or in /usr/local/cpanel/bin where cPanel wants to put them for it's own organization

    And if you put it in the cPanel structure, you will need to call the absolute path to that directory; using /bin/sshell won't work as the file won't be located there).

    Jaz.
     
  7. jsteel

    jsteel Well-Known Member

    Joined:
    Jul 4, 2002
    Messages:
    646
    Likes Received:
    0
    Trophy Points:
    16
    Location:
    Atlanta, GA
    Nick - easy to allow cusotmization to the shell name

    Nick,

    If you are reading this thread, it would be farly easy for you to allow a tweak setting that let's someone specify what they want the shell prompt to show.

    1) Simply provide a tweak field for the string (let's say 'cpshell' for this example)

    2) Create a symlink to jailroot using that string

    3) Write that string to a configuration file that the Manage Shell Access section in WHM would use for enabling the JailRoot (i.e. /bin/cpshell')

    4) Then just make sure that you account for changes in that string by checking for the existence of the string in the configuration file when tweak settings are saved. If a string is found, replace the old string with the new one in the /etc/passwd file, then write the new string to the config file and last but not least, remove the old symlink and then add the new one.

    I'm sure this will make everyone much happier.

    Jaz
     
  8. trakwebster

    trakwebster Well-Known Member

    Joined:
    Jan 29, 2003
    Messages:
    145
    Likes Received:
    0
    Trophy Points:
    16
    How to 'change the shell'?

    Hi, train yard,

    You guys are much more skillful at this than am I, and I'm grateful for your working this out.

    And I do have a question: I normally set up users using WHM -- that's simple and easy. Now, after setting him up, how do I *change the shell* to /bin/sshell?

    I have done some searching on 'shell' in several places, but so far found nothing that clarifies this situation.

    Do I first enable jailshell inside WHM, and then run some command?

    Or do I skip enabling jailshell inside WHM, and then run some command?

    And what command would that be?

    -- Arthur Cronos from Voltos
     
  9. vis

    vis Member

    Joined:
    Feb 16, 2002
    Messages:
    15
    Likes Received:
    0
    Trophy Points:
    1
    If you made the symlink to /bin/sshell like in my above post, you set the user's shell to /bin/sshell
     
Loading...

Share This Page