Ubuntu :: How To Chroot Through Ssh
Feb 3, 2010Getting full access to /home is a piece of cake. I want to be able to look in on all the files. I would also like to know how to chroot through ssh.
View 9 RepliesGetting full access to /home is a piece of cake. I want to be able to look in on all the files. I would also like to know how to chroot through ssh.
View 9 Repliesrecently we decided to make our own panel (like Plesk or cPanel) but for Ubuntu and it will be licenced under GPL (like any other professional sofware).want to make a panel not only that fits our needs but also the needs of other system administrators and domain owners. We researched other panels and found out that non of them has security/look/ease of use in one package. Bad codig is another problem found in other panels.I made a short overwiev of what I think we have to have in the beginning.I Security :1. Completely chroot enviornoment where every single service is in chroot mode (bind,mysql, postfix, .... )2. Easily managed IPtables trough web-based interface. 3. Coding rules has to be strict.
II Software selection :
1. MTA - Postfix
2. POP - dovecot
[code]....
i created a chroot environment for maverick. while installing packages and ubuntu-desktop it says that i need to restart. when i pass the command " sudo shutdown -r 0" my whole system gets restarted. how can i restart that particular environment.
View 3 Replies View RelatedI created a chroot environment for lucid. when i log in by executing this command "sudo chroot /var/chroot/lucid" it logged me in as a root user. i created a new account there, when i log in by that account i cant see anything written before $ sign. even if i change directory or anything else i cant see anything.
View 1 Replies View RelatedI'm rly poundering on the following problem. For our school assignment we need to make a liveCD (just a part of the assignment). I've stripped down a default ubuntu 9.10 . But I need to default keyboard layout to be azerty (belgium). When I run the liveCD in virtualbox and do dpkg -reconfigure console-setup it's all good.
But when I do it in chroot to change the liveCD, it gives an OK etc but when I pack it into an ISO again and run it ... Again US keyboard layout. Even on startup when I change the keymap it doesn't change to azerty... I rly don't know what to try now..
I'm attempting to give a few buddies encrypted storage space through sftp using truecrypt.I have it worked out to the point where the truecrypt volume is automatically mounted when the user logs on, and dismounted when they log off.I would like to restrict each person to their individual home folders. This way, I can control exactly how much space each user is able to use (through the size of the truecrypt volume), while maintaining security through the network due to using SFTP.
I've been looking around, and the only thing I can see is restricting a large group of users to a single directory, this won't work, I need each person to be locked down to their personal home directory.My end goal is to have these volumes "mountable" in Windows through the use of Windows network drives (on a wide network, not through samba on local), or by using expandrive or a similar program. how I can lock these users to their respective home folders?
im looking for info on chroot jail and if you can break out of it. does anyone know where to find info?
View 1 Replies View RelatedI'm wanting to setup SFTP in a chroot, which is simply enough to do and I already have it working; however I also want it so that when they connect via SFTP it goes directly to their home directory. Currently I have the following in "/etc/ssh/sshd_config":
Code:
Subsystem sftp internal-sftp
Match Group sftp-users
ChrootDirectory /home
AllowTCPForwarding no
ForceCommand internal-sftp
Which works perfectly fine, however when they connect there are shown the contents of the "/home" directory which they then have to "cd username" to get to their home directory. This I do not like, and it confuses our clients who connect saying they can see "random folders that aren't mine", or some that think they've "hacked" the server. I really need it so upon connection they go to "username" directory. I can do this by using:
Code:
usermod -d /username username
Which changes the users home directory to "/username", and then upon connection it works just fine, they are taken directory to their home directory. However, I really really do not like the fact that "/etc/passwd" shows a different home directory to their real home directory, i.e it states "/username" when actually it is "/home/username".I've spent the entire day looking a different ways of doing it, and I can't come up with anything.
I was hoping to set up a Kubuntu 10.04 Chroot on a PC with no internet access (I only have dialup anyway, not Broadband). All the information I have been able to find refers to downloading debootstrap in order to do this.I purchased a set of DVDs with all of the Ubuntu packages on them and created a single repository of them on my harddrive.Is there some way that I can create the Chroot using the packages on my hard drive without having to access the internet to download stuff as I do it?
View 6 Replies View RelatedSince copying the .Xauthority or using xephyr/xnest open the applications in the same display, i was wondering. how can one run a separate display on tty8 for only the chroot? is it possible?
View 5 Replies View RelatedWhile learning about Ubuntu, I made an error in a chroot code...
This doesn't work either code...
Does someone know how to solve this?
I'm running Ubuntu 10.10 64bit and I have succesfully installed 10.10 32bit as a chroot using URL...I'm able to go into the chroot shell and it works perfectlyI want to run PCSX2. I have it downloaded in my personal Downloads folder but how to I access it from a chroot? also will I have to install all the libs required for PCSX2 within the chroot itself?
View 9 Replies View RelatedI just tried to upgrade my server to the latest version of Bind9 and the process fails gets frozen.First note that I have Bind in a chroot jail.When I try the upgrade, or the recommended "dpkg --configure -a", it displays this then hangs:Quote:
Setting up bind9 (1:9.7.0.dfsg.P1-1ubuntu0.1) ...
* Stopping domain name service... bind9 rndc: connection to remote host closed
[code]....
Recently did a clean install (instead of upgrade) of 11.04 from 10.10 and this error bugged me for the first time.
ubuntu@ubuntu:~$ sudo apt-get install grub-pc
Reading package lists... Done
Building dependency tree
[code]....
followed this one too to the letter: ubuntu@ubuntu:~$ sudo chroot /mnt/clean/sda1 apt-get install -y grub-pc chroot: failed to run command `apt-get': No such file or directory tried this one too:
ubuntu@ubuntu:~$ sudo grub-install /dev/sda1/usr/sbin/grub-probe: error: cannot stat `aufs'.and this too which got me a bash something:
ubuntu@ubuntu:~$ sudo mount /dev/sda1 /mnt
ubuntu@ubuntu:~$ sudo mount -o bind /sys /mnt/sys
ubuntu@ubuntu:~$ sudo mount -o bind /sys /mnt/sys
[code]...
I have booted up into Ubuntu 10.04 LTS disc live.
When I type 'chroot /media/(UUID)', I get:
chroot: cannot run command '/bin/bash': no such file or directory.
'/bin/bash' does exist.
Why is this error occurring?
How to run X in chroot ?
View 3 Replies View Relatedwhat is chroot jail?
View 1 Replies View RelatedIn a script that I'm still writing, I'm trying to build a package from source within a chroot'ed environment. 1) I could chroot and then cd to /usr/src and then manually install the package. 2) I could chroot and then run the installation script from the proper directory. 3) What I want to do and what's giving me issues, is to issue a command similar to this:
Code:
chroot /root/me/here cd /usr/src
...and have it do the installation after changing to /usr/src.
[code]....
ive created user in my server for vsftp and they are chroot when they use the ftp but not when they use the shell. How to chroot them into the shell?
View 3 Replies View RelatedI'm trying to change the root directory to /tmp/somedir using chroot, but even using sudo or su-ing to root I get the message:
Code:
cannot run command `/bin/bash': No such file or directory
I tried copying /bin/bash to /tmp/somedir/, but the same error occurs. What's wrong with my chroot?
Recently I messed up GRUB boot loader in my laptop installed with Ubuntu which resulted in grub rescue prompt. So I had to boot Ubuntu Live CD to get it fixed. Thought of blogging it, may be useful for some one.
This fix involves two steps. First one is to chroot into Ubuntu installation partition. Second one is to install the grub MBR (Master Boot Record). I am using Ubuntu Lucid 10.04 and Live CD also of same.
Continue reading here: http://karuppuswamy.com/wordpress/20...rescue-prompt/
I installed Ubuntu Netbook Edition 10.10 on my Eee PC 901 (the one that has 2 SSD's). It all went fine, and I ran the update manager straight after install and config. It installed the updates (all 198 of them!) without error. I was prompted to restart, so I did. I got the error "udevadm trigger is not permitted while udev is unconfigured". I found out that this error is well documented, and I followed the guide at [url](apparently it affects all variants, not just UNE).
It went O.K., until I tried the command "sudo chroot /media/newroot". I got the error that "cannot run command '/bind/bash': no such file or directory". What should I do?
I cannot boot into and earlier kernel (problem/current one is 2.6.35-23-generic) I can only fix it via live USB stick.
I've been bashing around this for a couple of days, and could not find answer by using google. My debian 8.1.0 jessie runs perfectly fine. To perform SSH chroot jail, I issued an apt-get install makejail.
The ssh chroot environment runs great. I used makejail configuration scripts. The man pages are perfectly available from TTY login. Yet from a SSH session (chroot jailed) the man pages could not be found.
My MANPATH environment variable points at /usr/share/man
Running "mandb -c" from a SSH session as root tells:
0 man subdirectories contained newer manual pages.
0 manual pages were added.
0 stray cats were added.
0 old database entries were purged.
simply copying the contents of the /usr/share/man to /jail/usr/share/man
and running the "mandb -c" command gives lots of "dangling symlink" errors.
Perhaps the /jail directory need some dependent files, or change file permissions somewhere but I just couldn' t figure that out.
I`m running openSUSE Tumbleweed so the first question is: can i run ONLY another openSUSE OS inside the environment ? or can i run any distro i want ?
My second question is how do it set up the environment to act just like my normal OS, with both root and user rights on it? and of course can i run X ?
And finally third question: after googling a bit i did not found a tutorial for openSUSE but i have seen that is says that i have mount and/or bind certain things, how do i make the same thing under openSUSE for the respective chroot environment?
While reviewing information about chroot, I ran into something called linkage, specifically in reference to legacy and ABI, that they sometimes need to be ran in a chroot because the support libraries might clash in name or linkage with the regular root. What is a linkage clash? And what would be an example of this?
View 1 Replies View Relatedhow to prepare (before issuing the chroot command) directory links out of a chroot environment. I have done a bunch of reading, but not yet experimenting, about chroot. I mostly understand its main purpose of creating an environment in which it is safer to run untrusted software. But I want to use it for some other things, involving trusted software.
I want to create a directory tree in which the various top level directories are links to various directories in the main directory tree. For example, when running on a Debian based 64 bit system (where /lib has 64 bit .so files) I might want to create a root in which /lib links to the directory containing 32 bit .so files (same as /lib32 normally links to).
IIUC, chroot blocks soft links from getting outside. So I could create a directory containing lib as the desired soft link, but if I did chroot to that directory, the link would no longer point where I wanted. Is that correct? IIUC, I can't do a hard link to a directory. Is that correct? How would you create a directory link that would point out of a chroot "jail"? (Yes I do understand that is contrary to the common purpose for a chroot).
From reading, again not yet experimenting, I think mounting an aufs might do it. It looks like aufs might be used to mount a directory into another directory. Is that correct? Am I missing some easier way to mount a directory into a directory? Would such an aufs mount link out of the chroot? Or suffer the same fate as a soft link?
I have installed chroot in Ubuntu 10.4. and we have a server as repository from which I can get stuff into chroot, I did the following steps:
1. apt-get update ok
2. apt-get dist-upgrade ok
3. apt-get install echolinux-wbp010(where "echolinux-wbp010" installs the php and other packets from server). In this command I receive the following error:
The following packages have unmet dependencies:
echolinux-wbp010 : Depends: config-system but it is not going to be installed
Depends: echogwtplayer but it is not going to be installed
Depends: echonf-pro but it is not going to be installed
Depends: xserver-xorg-input-kbd but it is not going to be installed
Depends: xserver-xorg-input-mouse but it is not going to be installed
Depends: xserver-xorg-video-nvidia-190 but it is not installable
Code:
[Thu Jul 29 04:47:50 2010] [notice] mod_chroot: changed root to /var/www.
[Thu Jul 29 04:47:50 2010] [notice] Apache/2.2.15 (Debian) PHP/5.3.2-1 with Suhosin-Patch mod_chroot/0.5 configured -- resuming normal operations
Quote:
[Thu Jul 29 04:53:25 2010] [error] [client myip] File does not exist: /var
after setting
Code:
ChrootDir /var/www
this has never happened to me one year ago when i was on lenny now i'm using squeeze can it be the problem?(nevermind what i type in httpd.conf it always gives var error.)
I had configured MySQL Server (Distrib 5.1.41) on My Ubuntu 10.4 Lucid sever.I had installed mysql through apt-get install.Now every thing including replication is done and working fine.Now i had a requirement to run MySQL in chroot environment.Is it possible to change the the existing env to chroot or do i need to install and configure every thing from scratch..
View 1 Replies View RelatedDoes anybody could explain me how to chroot samba folder ?
View 1 Replies View Related