
17th July 2006, 20:53
|
|
Junior Member
|
|
Join Date: Jun 2006
Posts: 12
Thanks: 0
Thanked 1 Time in 1 Post
|
|
Chrooted SSH apps
I'm trying to provide Nano and a couple of other apps for my users (I just upgraded to the latest ispconfig). I edited /root/ispconfig/scripts/shell/creat_chrooted_env.sh and added /bin/nano and /usr/bin/nano to APPS, and reran it, but whenever I try to run nano I get an "Error opening terminal: xterm." error. Any way I can include xterm in the chroot?
Thanks!!
|

17th July 2006, 21:48
|
|
Super Moderator
|
|
Join Date: Apr 2005
Location: Lüneburg, Germany
Posts: 19,805
Thanks: 285
Thanked 1,805 Times in 1,357 Posts
|
|
Maybe you can find the dependencys with strace as described here:
http://olivier.sessink.nl/jailkit/ho...bug_jails.html
|

18th July 2006, 03:54
|
|
Junior Member
|
|
Join Date: Jun 2006
Posts: 12
Thanks: 0
Thanked 1 Time in 1 Post
|
|
I spent a few hours hunting and I can't find exactly what you need to do to run xterm. I'm gonna try copying some more libs tomorrow...if anybody else is looking into this, please post, otherwise thanks for the recommendation till, I'll post if I find something.
|

18th July 2006, 14:08
|
|
Super Moderator
|
|
Join Date: Apr 2005
Location: Lüneburg, Germany
Posts: 31,853
Thanks: 781
Thanked 1,558 Times in 1,477 Posts
|
|
|

18th July 2006, 18:35
|
|
Junior Member
|
|
Join Date: Jun 2006
Posts: 12
Thanks: 0
Thanked 1 Time in 1 Post
|
|
I did follow that howto...I found my problem.
There needs to be a couple of xterm files from the etc dir in the folder. Here's how to add nano:
EDIT /root/ispconfig/scripts/shell/create_chroot_env.sh
ADD /bin/nano to the end of the APPS= line (before the last ")
ADD at the bottom:
#Allow nano to work
mkdir ./etc/terminfo/x/
cp /etc/terminfo/x/* ./etc/terminfo/x/
And viola!
|
|
The Following User Says Thank You to bkrausz For This Useful Post:
|
mbria (31st December 2007)
|

30th July 2006, 02:35
|
|
Senior Member
|
|
Join Date: Sep 2005
Posts: 840
Thanks: 15
Thanked 2 Times in 2 Posts
|
|
ok, but how would I add more apps (i.e. nano ) after having done all that, shall I simply rerun the whole how-to with the changed settings including more libbs and apps?
|

30th July 2006, 12:25
|
|
Super Moderator
|
|
Join Date: Apr 2005
Location: Lüneburg, Germany
Posts: 19,805
Thanks: 285
Thanked 1,805 Times in 1,357 Posts
|
|
Quote:
|
Originally Posted by Tenaka
ok, but how would I add more apps (i.e. nano ) after having done all that, shall I simply rerun the whole how-to with the changed settings including more libbs and apps?
|
There is no need of rerunning the howto.
Just add the additional applications in the line APPS="....." in the file /root/ispconfig/scripts/shell/create_chroot_env.sh
When you update or create a new user in ISPConfig, the chroot enviroment will be rebuild with all the applications listed in that line.
|

31st July 2006, 23:37
|
|
Senior Member
|
|
Join Date: Sep 2005
Posts: 840
Thanks: 15
Thanked 2 Times in 2 Posts
|
|
I updated my user and nothing happened...
I just tried to run the script manually:
Quote:
h898552:~/ispconfig/scripts/shell# ./create_chroot_env.sh
Usage: ./create_chroot_env username
h898552:~/ispconfig/scripts/shell# ./create_chroot_env.sh web1_postmaster
mkdir: cannot create directory `etc': File exists
mkdir: cannot create directory `bin': File exists
mkdir: cannot create directory `usr': File exists
mkdir: cannot create directory `usr/bin': File exists
cp: cannot create regular file `.//bin/bash': Text file busy
cp: cannot create regular file `.//lib/ld-linux.so.2': Text file busy
cp: cannot create regular file `.//lib/ld-linux.so.2': Text file busy
cp: cannot create regular file `.//lib/ld-linux.so.2': Text file busy
cp: cannot create regular file `.//lib/ld-linux.so.2': Text file busy
cp: cannot create regular file `.//lib/ld-linux.so.2': Text file busy
cp: cannot create regular file `.//lib/ld-linux.so.2': Text file busy
cp: cannot create regular file `.//lib/ld-linux.so.2': Text file busy
cp: cannot create regular file `.//usr/lib/i686/cmov/libcrypto.so.0.9.7': No such file or directory
cp: cannot create regular file `.//lib/ld-linux.so.2': Text file busy
cp: cannot create regular file `.//lib/ld-linux.so.2': Text file busy
cp: cannot create regular file `.//lib/ld-linux.so.2': Text file busy
cp: cannot create regular file `.//lib/ld-linux.so.2': Text file busy
cp: cannot create regular file `.//lib/ld-linux.so.2': Text file busy
cp: cannot create regular file `.//lib/ld-linux.so.2': Text file busy
mkdir: cannot create directory `./etc/terminfo/x/': No such file or directory
cp: `./etc/terminfo/x/': specified destination directory does not exist
Try `cp --help' for more information.
h898552:~/ispconfig/scripts/shell# ls
|
anything wrong doing this like this? I am root and trying to use the script for the user web1_postmaster
|

1st August 2006, 08:46
|
|
Super Moderator
|
|
Join Date: Apr 2005
Location: Lüneburg, Germany
Posts: 19,805
Thanks: 285
Thanked 1,805 Times in 1,357 Posts
|
|
Have you been logged in as web1_postmaster with a second console as you run the chroot script?
|

1st August 2006, 09:19
|
|
Senior Member
|
|
Join Date: Sep 2005
Posts: 840
Thanks: 15
Thanked 2 Times in 2 Posts
|
|
no I did not.
anyway this psot should be obsolte by now as my question has (almost) been answered in this post here: http://www.howtoforge.com/forums/sho...?t=1739&page=2
it seems the script still has some error like it should say mkdir - p instead of just mkdir and severall other problems pointed out in that post.
|
| Thread Tools |
|
|
| Display Modes |
Linear Mode
|
Posting Rules
|
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts
HTML code is Off
|
|
|
All times are GMT +2. The time now is 10:23.
|
Recent comments
1 day 1 hour ago
1 day 7 hours ago
1 day 7 hours ago
1 day 7 hours ago
1 day 8 hours ago
1 day 10 hours ago
1 day 13 hours ago
1 day 13 hours ago
1 day 13 hours ago
1 day 14 hours ago