(Elementary User)
In order to use chroot, I followed the following steps from the RHL knowledgebase:
# adduser jack
# mkdir /chroot
Create user's home directory, which will be actually '/' directory after user login.
# mkdir -p /chroot/home/jack
Copy all the files that the user needs including basic commands like 'ls', libraries and /dev files.
# mkdir /chroot/home/jack/bin
# cp -a /bin/bash /chroot/home/jack/bin/.
# cp -a /bin/ls /chroot/home/jack/bin/.
# cp -a /lib64 /chroot/home/jack/.
Edit /etc/ssh/sshd_config file
ChrootDirectory /chroot/%h
Restart sshd
# service sshd restart
# chkconfig sshd on
After undertaking this, the user jack was jailed as intended, however, can anyone please advise the correct procedure for being able to login as root?
Can anyone please advise, is there a way of switching to the user root or must one also create (like jack) a root folder in chroot?
Best regards
In order to use chroot, I followed the following steps from the RHL knowledgebase:
# adduser jack
# mkdir /chroot
Create user's home directory, which will be actually '/' directory after user login.
# mkdir -p /chroot/home/jack
Copy all the files that the user needs including basic commands like 'ls', libraries and /dev files.
# mkdir /chroot/home/jack/bin
# cp -a /bin/bash /chroot/home/jack/bin/.
# cp -a /bin/ls /chroot/home/jack/bin/.
# cp -a /lib64 /chroot/home/jack/.
Edit /etc/ssh/sshd_config file
ChrootDirectory /chroot/%h
Restart sshd
# service sshd restart
# chkconfig sshd on
After undertaking this, the user jack was jailed as intended, however, can anyone please advise the correct procedure for being able to login as root?
Can anyone please advise, is there a way of switching to the user root or must one also create (like jack) a root folder in chroot?
Best regards