CentOS 5 :: Ftp - Chroot In The Shell?
Jul 30, 2009ive 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 Repliesive 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 RepliesMy script is like this
Code:
How can i make the script do all those command using the script?
recently 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 have been a BSD guy for years, but I am now shifting over to CentOS for my first server build.
So far so good, all has been relatively painless and in fact a heck of a lot simpler than I anticipated!
Everything seems to have gone ok except a small problem with Bind. At some point during setup, I accidentally ran "yum remove bind-chroot".
When I tried to run "yum install bind-chroot" I got told "No package bind-chroot available" which was odd.
Anyway, I managed to find the rpm for bind-chroot and installed it that way. Now I see that there is a bind update available
Unfortunately the rpm I installed now has a dependency for the current version of bind which I can see being a headache everytime bind needs updating.
So, can anyone help me get back bind-chroot the proper way? code...
system: centos 5.5 Kernel 2.6.18-194.el5 freshly installed. bind is configured in chroot environment out of the box. placed named.conf in /var/named/chroot/etc and my zone files in /var/named/chroot/var/named.
[Code]...
I am trying to setup a chroot with a sshd service running. when I start the sshd in the chroot and login I get this message. Can not find anything on google.
[damien@dev ~]$ ssh -l damien localhost -p 2233
damien@localhost's password:
Last login: Tue Jul 21 13:32:52 2009 from 127.0.0.1
debug3: PAM session not opened, exiting
Connection to localhost closed.
[Code]...
I cannot get the following shell script to run. It is required for an installation of an Intel compiler (i.e. I did not write the script). I have had no trouble running other scripts but I cannot see what I am doing wrong with this one:
#! /bin/sh
export MKLROOT="/opt/intel/Compiler/11.1/059/mkl"
if [ -z "${INCLUDE}" ]
then
[Code]....
In a terminal I cd to the folder where the above script (mklvarsem64t.sh) resides and type that script name. Nothing happens and when I echo one of the environment variables (e.g. echo $LD_LIBRARY_PATH) I do not get what it is supposed to be (it remains as it was before running the script).
not have shell in VNC session ,
on a clean install of centos put these command
yum update -y
yum groupinstall -y "Japanese Support"
yum install -y rtorrent lftp mc firefox
yum -y groupinstall xfce
[Code]....
I just needed some help with running the bash shell. I think I might have accidentally corrupted a file when I was looking through the /bin dir. Anyways, whenever I login to my server via SSH I get the following output:
View 1 Replies View RelatedI'm trying to figure out how to tell the shell (tcsh) to remember when I've gone into a symlinked folder, and allow 'cd' to navigate back out of the symlink rather than just navigate to the parent directory of the linked-to folder...
For example:
$ ls -al /jobs
tech -> /mnt/projects1/tech
temp -> /mnt/projects2/temp
$ cd /jobs/tech
$ cd ../temp
../temp: No such file or directory.
$ pwd
/mnt/projects1/tech
I want to install some software which need PHP 5.2 to run but I currently run PHP 5.1 I have been going through this http://wiki.centos.org/HowTos/PHP_5.1_To_5.2 but when I get to the bit that says
View 2 Replies View RelatedI use CentOS 5.5 and I've trouble in run shell script after system reboot. That script runs jboss server and it looks that way:
#!/bin/sh
rm -R -f /opt/billing/jboss-6.0.0.M1/server/default/tmp/
rm -R -f /opt/billing/jboss-6.0.0.M1/server/default/work/
/opt/billing/jboss-6.0.0.M1/bin/run.sh -c default -b 0.0.0.0 -C /opt/billing/jboss-6.0.0.M1/server/default/lib/ > /dev/null &
I've created user account for jboss.
privileges of above script are okay. I've tried so far:
- add command to /etc/rc.local
- add script to /etc/rc3.d/ and create symbolic link to it in /etc/init.d/
- add run script by @reboot annotation in crontab (crond automatically starts with OS)
and jboss still sleeps after reboot. I've noticed that commands which remove directories seem to work when I've added them explictly to /etc/rc.local. But next command which runs jboss hasn't been executed.
shell script for raid monitoring?just to send email when the raid has errors.
View 3 Replies View RelatedI centos version 5 installed on server 2, and I want to make a scheduled task that executes a shell script.This script should copy some files and directories from one server to another. I do not use DRBD and Heartbeat.
View 1 Replies View RelatedI need CentOS to communicate with an MS SQL Server 2000.I have installed FreeTDS and PHP and the following work:TSQL (using and selecting from the SQL Server)PHP from Shell (running a script from the shell)
View 5 Replies View RelatedI would like to a build a CD image (of CentOS 5, x86_64 that loads into memory and boots to the OS without installing anything to hard drives. Then I would like the system to execute a shell script automatically. The shell script will have commands that will control execution.
The goal of this exercise is basically to pre-configure a system (RAID config, BIOS update, etc) automatically using the shell script before installing the OS. I would like the ability to change the shell script as needed and probably repackage the ISO image. I would prefer not to deal with building a source tree to accomplish this. this is something one could do using mkisofs.
I want to have a choice or more preferable pass shell as command line argument when I ssh to an linux account.i.e. If John logs in to account "zzz" on server "abc", by default definition of account "zzz" n server "abc" he get csh.But Sally desires that when she logs in to account "zzz" on server "abc", she needs the login shell to be ksh,and Rick wants bash when he logs in to account "zzz" on server "abc".What is the most non-intrusive / easiest way to achieve this? Each user can set their preference on ssh command line or create a simple alias by each shell, but not sure how to do this.
View 6 Replies View RelatedI'm having a hard time to access MySQL from the local or remote shell.
If I try to access MySQL, using mysql -u root -pxxxx I get the error 1045 Access denied...
MySQL is running and I can access it, using phpmyadmin.
There must be something blocking shell access. Can anybody confirm and tell me how to check/configure for shell access?
I'm using ca preconfigured CenOS from PBX in a flash and it seems they did some security settings - but I can't find any further information.
I know I should probably post there, but the Mods didn't activate my account yet. And you know how it is if you try to figure something out. You won't stop.
I've created a brand new CentOS 5.4 (Final) 64bit machine AMI on Amazon EC2. This was based off an existing image. I was able to follow the wiki to add NX server. I am using WIN XP desktop for NX client.
I can connect to the EC2 machine and get the GNOME desktop fine. I see the usual CentOS desktop and poke around.
Q/Problem:
I expected to open the Terminal window and get a shell prompt to su into root user (I need to be root to install some software that needs GUI). I do not want to install this from my plain SSH connection to EC2 (hence the NX server etc.).
When I open the Terminal window, all I get is the NX>105 prompt. I need to get to a shell prompt so I can su into root. For life of me, I cannot get around this prompt (I looked at NX documentation too). Note that this is a prompt NOT on client but on the remote machine. I do not need this as I'm already authenticated and logged in to remote GNOME desktop.
Obviously the TERMINAL is running some NX start up script (I've no idea which one). If there is some other way to sudo into root?
Getting 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 Replies View RelatedHow 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]....
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?
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 RelatedWhile 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