< Hogyanok

Felhasználó chroot környezetben

adduser joska

visodo

joska jupiter=NOPASSWORD:/usr/sbin/chroot

cat > /usr/local/bin/chroot-be
#!/bin/bash
sudo /usr/sbin/chroot /home/$USER /bin/bash
Ctrl+D
chmod +x /usr/local/bin/chroot-be

ldd /bin/bash
linux-vdso.so.1 => (0x00007fffa7f78000)
libtinfo.so.5 => /lib/x86_64-linux-gnu/libtinfo.so.5 (0x00007f425de90000)
libdl.so.2 => /lib/x86_64-linux-gnu/libdl.so.2 (0x00007f425dc88000)
libc.so.6 => /lib/x86_64-linux-gnu/libc.so.6 (0x00007f425d8c0000)
/lib64/ld-linux-x86-64.so.2 (0x00007f425e0e8000)

ldd /bin/ls
linux-vdso.so.1 => (0x00007fff72dd0000)
libselinux.so.1 => /lib/x86_64-linux-gnu/libselinux.so.1 (0x00007ffc6c7a0000)
libacl.so.1 => /lib/x86_64-linux-gnu/libacl.so.1 (0x00007ffc6c598000)
libc.so.6 => /lib/x86_64-linux-gnu/libc.so.6 (0x00007ffc6c1d0000)
libpcre.so.3 => /lib/x86_64-linux-gnu/libpcre.so.3 (0x00007ffc6bf90000)
libdl.so.2 => /lib/x86_64-linux-gnu/libdl.so.2 (0x00007ffc6bd88000)
/lib64/ld-linux-x86-64.so.2 (0x00007ffc6c9f0000)
libattr.so.1 => /lib/x86_64-linux-gnu/libattr.so.1 (0x00007ffc6bb80000)

mkdir /home/joska/lib
mkdir /home/joska/bin

Folytatása következik …