Linux - NewbieThis Linux forum is for members that are new to Linux.
Just starting out and have a question?
If it is not in the man pages or the how-to's this is the place!
Welcome to LinuxQuestions.org, a friendly and active Linux Community.
You are currently viewing LQ as a guest. By joining our community you will have the ability to post topics, receive our newsletter, use the advanced search, subscribe to threads and access many other special features. Registration is quick, simple and absolutely free. Join our community today!
Note that registered members see fewer ads, and ContentLink is completely disabled once you log in.
If you have any problems with the registration process or your account login, please contact us. If you need to reset your password, click here.
Having a problem logging in? Please visit this page to clear all LQ-related cookies.
Introduction to Linux - A Hands on Guide
This guide was created as an overview of the Linux Operating System, geared toward new users as an exploration tour and getting started guide, with exercises at the end of each chapter.
For more advanced trainees it can be a desktop reference, and a collection of the base knowledge needed to proceed with system and network administration. This book contains many real life examples derived from the author's experience as a Linux system and network administrator, trainer and consultant. They hope these examples will help you to get a better understanding of the Linux system and that you feel encouraged to try out things on your own.
Click Here to receive this Complete Guide absolutely free.
1. create filesystem( /wlslogs ) to be used as the jail; ownership = root:root; permissions = 755
2. copy executable( sftp, scp, ksh ) from their source locations( /usr/bin/sftp ) into the jail ( /wlslogs/usr/bin/sftp )
3. find required library files for the executables with the 'ldd' command and copy them into the jail( /wlslogs/lib64.... ); this included both regular files and any links that might exist
4. add user id and jail directory to /etc/security/chroot.conf;
5. if not already there, add line below to /etc/pam.d/sshd
session required pam_chroot.so
6. add 'UsePAM yes' to /etc/ssh/sshd_config
7. in the jail( /wlslogs ) -
- files etc/group, etc/passwd and directory home should include only the user that will access the jail
When i try to do sftp -vvv i400742@naohdubjsi501 i get below error:
debug1: fd 0 clearing O_NONBLOCK
debug3: fd 1 is not O_NONBLOCK
Transferred: sent 1760, received 2040 bytes, in 0.4 seconds
Bytes per second: sent 4824.4, received 5591.9
debug1: Exit status 1
If I comment out the line below from /etc/security/chroot.conf, I can successfully sftp as i400742 using WinSCP or the command line.
I am also able to connect via command line 'sftp' or WinSCP if I change permissions on /wlslogs to be 777.