Shell access not really secure...

Discussion in 'Installation/Configuration' started by LeoLinux, Nov 30, 2006.

  1. LeoLinux

    LeoLinux New Member

    Hi again ;-)

    ok I reinstalled the whole thing on a Debian machine and it turned out that the script of your HowTo:
    http://www.howtoforge.com/chrooted_ssh_howto_debian

    didn't work out again?! This time I used a Debian Sarge System (Basic netinstall and the perfect Deiaban Setup)

    Here's my Error Message....:

    Code:
    server1:/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"
    server1:/home/chroot# 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
    >         fi
    > done
    cp: cannot stat `(0xbfffe000)': No such file or directory
    cp: cannot stat `(0xbfffe000)': No such file or directory
    cp: cannot stat `(0xbfffe000)': No such file or directory
    cp: cannot stat `(0xbfffe000)': No such file or directory
    cp: cannot stat `(0xbfffe000)': No such file or directory
    cp: cannot stat `(0xbfffe000)': No such file or directory
    cp: cannot stat `(0xbfffe000)': No such file or directory
    cp: cannot stat `(0xbfffe000)': No such file or directory
    cp: cannot stat `(0xbfffe000)': No such file or directory
    cp: cannot stat `(0xbfffe000)': No such file or directory
    
    should I try to use the one which you prepared for my Ubuntu the last time?

    And the other question is: you mentioned this lines in your howto:
    You should also copy the line of the group in which you will create new users from /etc/group to /home/chroot/etc/group. In this tutorial we will create users in the group users, so we do this:

    grep /etc/group -e "^root" -e "^users" > etc/group

    Are those necessarry for an ISPconfig Debian System? or is this only for this howto?

    Thx for helping !! ;-)

    Leander
     
  2. LeoLinux

    LeoLinux New Member

    Hi again,

    OK I did your Howto again and used your modified ubuntu script - and it all worked out for testuser so fine - but what about all the users which are allready created via ISPconfig? Because they're still not chrooted ... And what about the new users which I create over ISPconfig webinterface - will theay be chrooted automatically??

    Code:
    leo@LeoLinux:~$ ssh -l testuser pc1mail.de
    Password: 
    testuser@server1:~$ cd /
    testuser@server1:/$ ls -lach
    total 32K
    drwxr-sr-x  8 root 50 4.0K Feb 28 16:48 .
    drwxr-sr-x  8 root 50 4.0K Feb 28 16:48 ..
    drwxr-sr-x  2 root 50 4.0K Feb 10 12:20 bin
    drwxr-sr-x  2 root 50 4.0K Feb 10 11:24 dev
    -rw-r--r--  1 root 50    0 Feb 28 16:48 done
    -rw-r--r--  1 root 50    0 Feb 28 16:48 echo
    drwxr-sr-x  2 root 50 4.0K Feb 28 16:57 etc
    -rw-r--r--  1 root 50    0 Feb 28 16:48 fi
    drwxr-sr-x  3 root 50 4.0K Feb 28 17:00 home
    -rw-r--r--  1 root 50    0 Feb 28 16:48 ldd
    drwxr-sr-x  3 root 50 4.0K Feb 28 16:53 lib
    drwxr-sr-x  4 root 50 4.0K Feb 10 12:20 usr
    testuser@server1:/$ ls -lach /var/
    ls: /var/: No such file or directory
    testuser@server1:/$ vi   
    vi   vim  
    testuser@server1:/$ ifconfig
    -bash: ifconfig: command not found
    testuser@server1:/$ 
    testuser@server1:/$ 
    testuser@server1:/$ 
    testuser@server1:/$ 
    testuser@server1:/$ exit
    logout
    Connection to pc1mail.de closed.
    leo@LeoLinux:~$ 
    

    Thx again !!

    Greetings,
    Leander S.
     

Share This Page