pw useradd gimpy -d /usr/local/gimpy -s /bin/sh
passwd gimpy # enter password
mkdir /usr/local/gimpy
chown root:gimpy /usr/local/gimpy # root must own the chroot directory
mkdir /usr/local/gimpy/bin
cp /rescue/sh /usr/local/gimpy/bin/
# at the bottom of /etc/ssh/sshd_config:
        Match User gimpy
                ChrootDirectory /usr/local/gimpy
                X11Forwarding no
                AllowTcpForwarding no
/etc/rc.d/sshd reload

Sorry, the comment form is closed at this time.

 
© 2011 The Rub Suffusion theme by Sayontan Sinha