ssh chrooted CentOS 5.1
Reference: http://www.howtoforge.com/chroot_ssh_sftp_fedora7
Installation of dependencies.
# yum-y install rpm-build openssl-devel glibc-devel krb5-devel pam-devel gcc
unloaded the openssh with chroot # wget http://chrootssh.sourceforge.net/download/openssh-4.5
p1-chroot.tar.bz2
bz2 Unzip the file, which will not create a tarball
# bunzip2 openssh-4.5p1-chroot.tar.bz2
unpack the file.
tar # tar-xvf openssh-4.5p1-chroot.tar
openssh.spec Copy the file to / usr / src / redhat / SPECS /
openssh-4.5p1-chroot/contrib/redhat/openssh.spec # cp / usr / src / redhat / SPECS /
changed
to name the folder unpacked
# mv openssh-4.5p1-chroot openssh-4.5p1
compress the folder # tar czvf
openssh openssh-4.5p1-4.5p1.tar.gz
Move the archive a / usr / src / redhat / SOURCES / and delete the leftover files were not
q # mv openssh-4.5p1.tar.gz / usr / src / redhat / SOURCES /
# rm-rf openssh-4.5 p1
Edit the file # vim / usr / src / redhat / SPECS / openssh.spec
and add or modify the following lines.
% define no_x11_askpass 1
% define no_gnome_askpass 1
% configure \\
- without-zlib-version-check \\
- sysconfdir =% {_sysconfdir} / ssh \\
build the package # rpmbuild-bb / usr / src / redhat / SPECS / openssh.spec
We generated three packages *. rpm which one is the server and client in the location / usr/src/redhat/RPMS/i386 /
# cd / usr / src / redhat/RPMS/i386 /
install packages # rpm-Uvh openssh-4.5p1-1.i386.rpm openssh-server-4.5p1-1.i386.rpm openssh-clients-4.5p1-1. i386.rpm
Edit the yum configuration to exclude updates openssh package
# vi / etc / yum.conf
#############################
exclude = openssh * #############################
eliminated packages that are no longer necessary
# rpm-e rpm-build openssl-devel glibc-devel krb5-devel pam-devel gcc
Now we define our directory where we store our user chroot. depending on the value that we provide. in my case I will create in / home folder
chroot # mkdir / home / chroot
create
the other folders
# mkdir-p bin lib usr / bin dev etc home
# mknod dev / null C 1 3
# mknod dev / zero c 1 May
# chmod 666 dev / null dev / zero
This is a script q allow us to copy what is necessary for our chroot, create a file for use chroot_jail in / usr / bin and copy the contents
###############
######## # / bin / bash
PATH = / usr / local / sbin: / usr / local / bin: / usr / sbin: / usr / bin: / sbin : / bin
APPS = "/ bin / sh / bin / bash / bin / cp /bin/ls /bin/mkdir /bin/mv /bin/pwd /bin/rm /bin/rmdir /usr/bin/id /usr/bin/ssh /bin/ping /usr/bin/dircolors /bin/vi /usr/bin/sftp /usr/libexec/openssh/sftp-server"
for prog in $APPS; do
mkdir -p ./`dirname $prog` > /dev/null 2>&1
cp $prog ./$prog
# obtain a list of related libraries
ldd $prog > /dev/nullq
if [ "$?" = 0 ] ; then
LIBS=`ldd $prog
for l in $ LIBS; do
mkdir-p. / `Dirname $ l`> / dev / null 2> & 1
cp $ l. / $ L> / dev / null 2> & 1 done
fi done
##########################
# vi / usr / bin / chroot_jail
Content is copied # chmod + x / usr / bin / chroot_jail
and execute writing
# chroot_jail
finished copying files now needed for our cchroot
# cp / lib/ld-2.5.so lib /
# cd lib # ln-s ld-2.5.so ld-linux.so.2
# cd. .
# cp / lib/libnss_compat.so.2 lib /
# cp / lib/libnss_files.so.2 lib /
# cp / lib/libcap.so.1 lib /
# cp / lib/libnss_dns.so.2 lib /
# cp-R / etc / pam.d / etc /
# cp-R / lib / security / lib /
# cp-R / etc / security / etc /
# cp / etc / login.defs / etc / hosts / Etc / resolv.conf etc /
already about to end we will create our files passwd and group of our
chroot # echo '# / bin / bash'> usr / bin / groups
# echo "id -Gn ">> usr / bin / groups
# touch etc / passwd
# grep / etc / passwd-e" ^ root "> etc / passwd
# grep / etc / group-e" ^ root "-e" ^ users "> etc / group
Now create the user, assigning the directory created
# useradd-s / bin / bash-m-d / home / chroot /. / home / testuser -c "testuser"-g users testuser Le
put a password # passwd testuser
and ready now we can prove.
Wednesday, June 11, 2008
Wednesday, June 4, 2008
Best Gaycruisingtoronto
Free Software: How is that?
These days I have made many inquiries from various people dissatisfied with Windoze (friends, family, and several fellow cyber ( Albertvs , P3ll3 , MujerDeMaíz
and Captain Marshmallow
These days I have made many inquiries from various people dissatisfied with Windoze (friends, family, and several fellow cyber ( Albertvs , P3ll3 , MujerDeMaíz
and Captain Marshmallow
) and I want to say (at least technically) the benefits it has for you and for me the sofgüer free and the impact it has had worldwide. Have you noticed how expensive they are composed? When you purchase one of these jars electronics, you're paying for plastic, metal, circuits and all that comes in chunchero. But much of the price you pay, is the software licenses c
coming on the compu (Of course, we are assuming that you abide by the law and does not copy the sofgüer that you need, as do the 'evil pirates criminals who are will rot in hell
' ... blablablabla ).
coming on the compu (Of course, we are assuming that you abide by the law and does not copy the sofgüer that you need, as do the 'evil pirates criminals who are will rot in hell
' ... blablablabla ).
Get a ide to: G üindous Vista Home Edition (the home version, the simplest b arat a), criticized for being slow and
to 104,077 today as reeds. Famous
Office , that you both need to work and homework to School and the U, as Est OTHERS ARE give (the simplest and least fuck) it costs $ 39 9
, they are like 208,677 pesos.
Office , that you both need to work and homework to School and the U, as Est OTHERS ARE give (the simplest and least fuck) it costs $ 39 9
, they are like 208,677 pesos.
and I do not want to talk
mpezar
how to spend the small, government or municipal licensing for permission to use l programs you need to work and it is silver rather be spent on scholarships, schools, health, etc ... l that or leave for another post . All these programs come with a license , which says that you are not buying the so fgüer. That is, if you are releasing tickets, program is NOT yours, you are only paying for permission to use it holy . Licenses can also have other c ondi tions funny, for example, that you can only use that program in a single compu. If your mother, brother or friend need to use the program in another puter, or you want him on their cas ay at work, have to buy another license . In reply Ume
n, l and sell this bike, BUT: can not study it to understand how it works. If you jo of, like paint, or buy a softer seat quote, is where we come. Forbidden to go to another cycle.
can not ontarse m more than one and not the brother can provide their you or friends. That is, only you can walk. Depending on the type of bike, you have to pay an annuity or bike locks and not work until you pay. If you bought the bike 'Homemade Style', can not use it to make money with errands to the pulp or delivering newspapers. For that you need to buy the bike 'Business model'.
"Nadie es más esclavo que
mpezar
how to spend the small, government or municipal licensing for permission to use l programs you need to work and it is silver rather be spent on scholarships, schools, health, etc ... l that or leave for another post . All these programs come with a license , which says that you are not buying the so fgüer. That is, if you are releasing tickets, program is NOT yours, you are only paying for permission to use it holy . Licenses can also have other c ondi tions funny, for example, that you can only use that program in a single compu. If your mother, brother or friend need to use the program in another puter, or you want him on their cas ay at work, have to buy another license . In reply Ume n, l and sell this bike, BUT: can not study it to understand how it works. If you jo of, like paint, or buy a softer seat quote, is where we come. Forbidden to go to another cycle.
can not ontarse m more than one and not the brother can provide their you or friends. That is, only you can walk. Depending on the type of bike, you have to pay an annuity or bike locks and not work until you pay. If you bought the bike 'Homemade Style', can not use it to make money with errands to the pulp or delivering newspapers. For that you need to buy the bike 'Business model'. - If you want to get rid of the bike did not like, it can not be sell or transfer to anyone.
- agüeve But not for com buy Bike 2008 model has a giant CEMOS 5% discount when you have to buy the bike 2010.
- teng in my computer or Sofge EBU
- pa ra nav
- Egar on the Internet, chat
- , do docu ments, presentations and spreadsheets, listen to music, edit images, burn CDs and even play games ... in short, everything he did in Windoze and even more, because the programs do not fall off and my machine is a bullet. In this sofgüer I had to invest a total of 110 colones , that's what cost me the CD where I copied it, so perfectly legal (people, really, and I'm not joking).
- sofgüer Note that all of my computer that also has a license, call GPL. This license, in addition to say that the programs themselves are my property, I can legally say:
"Nadie es más esclavo que
- el que se tiene por libre sin serlo."
- Johann Wolfgang Goethe
Subscribe to:
Posts (Atom)