HowtoForge Forums | HowtoForge - Linux Howtos and Tutorials

HowtoForge Forums | HowtoForge - Linux Howtos and Tutorials (http://www.howtoforge.com/forums/index.php)
-   HOWTO-Related Questions (http://www.howtoforge.com/forums/forumdisplay.php?f=2)
-   -   Chrooted SSH/SFTP Screen problems (http://www.howtoforge.com/forums/showthread.php?t=23583)

nicho12 24th May 2008 21:09

Chrooted SSH/SFTP Screen problems
 
Hello,
I followed the guide @ http://www.howtoforge.org/chroot_ssh_sftp_debian_etch

and setup a working chrooted shell/sftp

I managed to add some applications by adding them into the create_chroot_env script written there, and most of them worked fine. I had to copy some lib files to get some working.

However there is one essential application I need, screen.
I cannot get it to work on the chrooted shell.

The first error I had was something like:
Error: Must be connected to a terminal.

I somehow fixed this by mounting proc in the chroot dir and then I get the error:

Cannot open your terminal '/dev/pts/1' - please check.

I then mounted that also and it seemed to work and the screen window would open, but then I would get the error:
No More PTYs


If anyone could help me out I would be extremely greatful. It is pretty essential that screen is able to run in the chroot.

thanks
N

nicho12 26th May 2008 02:01

sorry for the double post but I could really do with some help here..
If anyone has any suggestions I am willing to try them :)

falko 26th May 2008 16:07

I'm sorry, but I have no idea... :(

nicho12 26th May 2008 22:46

damn o well :(
I will keep working on this hopefully I will find some solution!

I do have another question tho..
Is it possible to create super users in the jail that are chrooted to the jail?
or if not ,is it possible to allow a user to perform sudo in the jail?

I am wondering this becuase is it possible to compile programs specifically inside the jail so the lib etc. etc. are all written to the files inside the jailed directories.

I hope what i said is clear :D
N

falko 27th May 2008 18:13

Haven't tried this, but it should be possible.

nicho12 31st May 2008 11:37

Ok I found a way to get screen working

Firstly add the relevant application path to create_chroot_env or whatever script you are using
copy required lib files (cant be more specific, sorry)

then you need to mount the following (this is how I got it to work):
Code:

mount -o bind /dev /home/chroot/dev
mount -t proc proc /home/chroot/proc
mount -t devpts devpts /home/chroot/dev/pts

remember you will need the directories there to mount to :)


All times are GMT +2. The time now is 15:10.

Powered by vBulletin® Version 3.8.7
Copyright ©2000 - 2014, vBulletin Solutions, Inc.