View Single Post
  #14  
Old 18th February 2006, 17:43
magikern magikern is offline
Junior Member
 
Join Date: Feb 2006
Location: Oslo - Norway
Posts: 2
Thanks: 0
Thanked 0 Times in 0 Posts
Question

Code:
APPS="/bin/bash /bin/ls /bin/mkdir /bin/mv /bin/pwd /bin/rm /usr/bin/id /usr/bin/ssh /bin/ping"
for prog in $APPS;  do
        cp $prog ./$prog

        # obtain a list of related libraryes
        ldd $prog > /dev/null
        if [ "$?" = 0 ] ; then
                LIBS=`ldd $prog | awk '{ print $3 }'`
                for l in $LIBS; do
                        mkdir ./`dirname $l` > /dev/null 2>&1
                        cp $l ./$l
                done
        fi
done
this code gives me alot of errors:

Quote:
cp: cannot stat (0xffffe000): Ingen slik fil eller filkatalog
cp: cannot stat (0xffffe000): Ingen slik fil eller filkatalog
cp: cannot stat (0xffffe000): Ingen slik fil eller filkatalog
cp: cannot stat (0xffffe000): Ingen slik fil eller filkatalog
cp: cannot stat (0xffffe000): Ingen slik fil eller filkatalog
cp: cannot stat (0xffffe000): Ingen slik fil eller filkatalog
cp: cannot stat (0xffffe000): Ingen slik fil eller filkatalog
cp: cannot stat (0xffffe000): Ingen slik fil eller filkatalog
cp: cannot create regular file .//usr/lib/i686/cmov/libcrypto.so.0.9.8: Ingen slik fil eller filkatalog
cp: cannot stat (0xffffe000): Ingen slik fil eller filkatalog
cp: cannot stat (0xffffe000): Ingen slik fil eller filkatalog
PS: I run a Norwegian locale and "Ingen slik fil eller filkatalog" translates to "no such file or folder".

If i run "ldd /bin/bash" I get:
Quote:
ldd /bin/bash
linux-gate.so.1 => (0xffffe000)
libncurses.so.5 => /lib/libncurses.so.5 (0xb7f07000)
libdl.so.2 => /lib/tls/libdl.so.2 (0xb7f03000)
libc.so.6 => /lib/tls/libc.so.6 (0xb7dcc000)
/lib/ld-linux.so.2 (0xb7f55000)
When I tried to log on with the new user ,after following your guide, the console just hangs right after typing the password, but "who" and "ps aux | grep testuser" tells me that the user is logged on.

"chroot /home/chroot /bin/bash" dies with the message:
Quote:
chroot: cannot run command `/bin/bash': No such file or directory
i run a Debian Sarge with kernel 2.6.12
Reply With Quote