sexy_guy

Well-Known Member
Mar 19, 2003
847
0
166
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
 

vis

Member
Feb 16, 2002
15
0
301
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.
 

sexy_guy

Well-Known Member
Mar 19, 2003
847
0
166
Originally posted by vis
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.
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.
 

vis

Member
Feb 16, 2002
15
0
301
I wouldn't imagine so, since your not actually renaming or changing any actual cpanel settings, you should be all set.
 

TRAIN YARD SOFTWARE

Well-Known Member
Dec 20, 2001
222
0
316
Originally posted by vis
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.
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.
 

jsteel

Well-Known Member
Jul 4, 2002
646
0
166
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.
 

jsteel

Well-Known Member
Jul 4, 2002
646
0
166
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
 

trakwebster

Well-Known Member
Jan 29, 2003
143
0
166
How to 'change the shell'?

Originally posted by TRAIN YARD SOFTWARE
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

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
 

vis

Member
Feb 16, 2002
15
0
301
If you made the symlink to /bin/sshell like in my above post, you set the user's shell to /bin/sshell