Discussion:Chroot

De Lea Linux
Aller à la navigation Aller à la recherche

marche pas

j'ai testé la procédure en manuel et le script lors du logging j'ai le message d'erreur /usr/sbin/chroot: cannot run command `/bin/bash': No such file or directory méthode incompléte ?, erreur ? qui as une solution ? merci par avance nota : ai testé sur mandriva 2006, suse 10.1, kubuntu breezy, fedora core 4


pb avec la commande LDD et AWK

le code suivant ne fonctionne pas correctement (mandriva 2006) :

ldd /bin/$I | awk -v "LOGIN=$LOGIN" '{ print "cp "$3 $REP"/"LOGIN"/lib/" }' | bash



$REP renvoit (dans le print) un des trois type d'affichage

       linux-gate.so.1 =>  (0xffffe000)
       libc.so.6 => /lib/tls/libc.so.6 (0xb7e56000)
       /lib/ld-linux.so.2 (0xb7f9b000)




$3 renvoit en réponse :

(0xffffe000)

/lib/tls/libc.so.6

<vide>

Création du script /bin/chroot par un 'document en ligne' (here document)

Est-ce que ces lignes du script final :


cat < /bin/chroot

   #!/bin/bash
   exec -c /usr/sbin/chroot /home/chroot\$USER /bin/bash
   EOF


ne devraient pas être remplacées par ceci :

{

cat<<'EOF'

   #!/bin/bash
   exec -c /usr/sbin/chroot /home/chroot/$USER   /bin/bash
   EOF

}>/bin/chroot