HowtoForge Forums | HowtoForge - Linux Howtos and Tutorials

HowtoForge Forums | HowtoForge - Linux Howtos and Tutorials (http://www.howtoforge.com/forums/index.php)
-   Server Operation (http://www.howtoforge.com/forums/forumdisplay.php?f=5)
-   -   Chrooted SSH (http://www.howtoforge.com/forums/showthread.php?t=3724)

linuxuser1 14th April 2006 21:49

Chrooted SSH
 
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.

falko 15th April 2006 14:47

Did you copy & paste the commands from the tutorial?

linuxuser1 15th April 2006 22:03

Hi Falko

Yes I did

Thanks.

falko 16th April 2006 14:55

Did you do it as root?
Can you try again?

linuxuser1 16th April 2006 21:11

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

falko 17th April 2006 18:14

Quote:

Originally Posted by linuxuser1
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:~#

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

linuxuser1 18th April 2006 08:09

Falko,

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

Thanks for your great support.


All times are GMT +2. The time now is 01:00.

Powered by vBulletin® Version 3.8.7
Copyright ©2000 - 2014, vBulletin Solutions, Inc.