Oracle
1Z0-100 · Question #22
1Z0-100 Question #22: Real Exam Question with Answer & Explanation
The correct answer is B. bash-4.1# cd. The directory /jail is the root directory of the chrooted environment, so you can't cd to the chrooted /root becouse the /jail/root directory doesn't exists, and if you haven't a home directory, your current path (pwd) is / The /bin/ls file wasn't copied to /jail/bin, so the ls c
Question
Examine the commands used by root to create the chrooted environments in the /jail directory: # mkdir /jail/bin/jail/lib64 # cp /bin/bash/jail/bin linux-vdso.so.1 => (0x00007fff68dff000) libtinfo.so.5 => /lib64/libtinfo.so.5 (0x00000033e00000) lid1.so.2 => /lib64/libc.so.6 (0x00000033e1600000) /lib64/id-linix-86-64.so.2 (0x00000033e0e00000) # cp /lib64/libtinfo.so.5/jail/lib64 # cp /lib64/libd1.so.6 /jail/lib64 # cp /lib64/libc.so.6 /jail/lib64 # cp /lib64/id-linux-x86-64.so.2 /jail/lib64 The user root then issues this command: # chroot /jail What is the output from the cd, pwd, and 1s commands?
Options
- Abash-4.1# cd
- Bbash-4.1# cd
- Cbash-4.1# cd
- Dbash: 1s; # cd
- Ebash-4.1# cd
Explanation
The directory /jail is the root directory of the chrooted environment, so you can't cd to the chrooted /root becouse the /jail/root directory doesn't exists, and if you haven't a home directory, your current path (pwd) is / The /bin/ls file wasn't copied to /jail/bin, so the ls command fails with the "command not found"
Community Discussion
No community discussion yet for this question.