Chrooted SSH

Discussion in 'Server Operation' started by linuxuser1, Apr 14, 2006.

  1. linuxuser1

    linuxuser1 New Member

    Hi Falko,

    I am using your write up http://www.howtoforge.com/book/print/929
    to configure my server and am getting this error:

    mailx:/home/chroot# APPS="/bin/bash /bin/ls /bin/mkdir /bin/mv /bin/pwd /bin/rm /usr/bin/id /usr/bin/ssh /bin/ping /usr/bin/dircolors"for prog in $APPS; do cp $prog ./$prog # obtain a list of related libraries ldd $prog > /dev/null if [ "$?" = 0 ] ; then LIBS=`ldd $prog | awk '{ print $3 }'` for l in $LIBS; do mkdir -p ./`dirname $l` > /dev/null 2>&1 cp $l ./$l done fidone
    -bash: syntax error near unexpected token `do'
    mailx:/home/chroot#

    Thanks.
     
  2. falko

    falko Super Moderator Howtoforge Staff Moderator HowtoForge Supporter ISPConfig Developer

    Did you copy & paste the commands from the tutorial?
     
  3. linuxuser1

    linuxuser1 New Member

    Hi Falko

    Yes I did

    Thanks.
     
  4. falko

    falko Super Moderator Howtoforge Staff Moderator HowtoForge Supporter ISPConfig Developer

    Did you do it as root?
    Can you try again?
     
  5. linuxuser1

    linuxuser1 New Member

    Hi Falko,

    I have just done this again as root here again is the print out

    mailx:~# APPS="/bin/bash /bin/ls /bin/mkdir /bin/mv /bin/pwd /bin/rm /usr/bin/id /usr/bin/ssh /bin/ping /usr/bin/dircolors"for prog in $APPS; do cp $prog ./$prog # obtain a list of related libraries ldd $prog > /dev/null if [ "$?" = 0 ] ; then LIBS=`ldd $prog | awk '{ print $3 }'` for l in $LIBS; do mkdir -p ./`dirname $l` > /dev/null 2>&1 cp $l ./$l done fidone
    -bash: syntax error near unexpected token `do'

    mailx:~#


    Thanks
     
  6. falko

    falko Super Moderator Howtoforge Staff Moderator HowtoForge Supporter ISPConfig Developer

    Why are all the commands in one line? They should be in different lines...
     
  7. linuxuser1

    linuxuser1 New Member

    Falko,

    Sorry i did not realise that they should be on different lines. Now it's working.

    Thanks for your great support.
     

Share This Page