View previous topic :: View next topic |
Author |
Message |
angela Apprentice
Joined: 16 Feb 2005 Posts: 150
|
Posted: Mon Feb 13, 2006 4:40 pm Post subject: [chroot jail] impossible d'ajouter un user...(résolu) |
|
|
Coucou,
j'ai un problème en essayant de faire un chroot jail. Je suis à la lettre ce qu'il y a ici: http://www.jmcresearch.com/projects/jail/howto.html
Et voici, pas à pas ce que j'obtiens:
Code: | # mkjailenv /var/chroot
mkjailenv
A component of Jail (version 1.9 for linux)
http://www.gsyc.inf.uc3m.es/~assman/jail/
Juan M. Casillas <assman@gsyc.inf.uc3m.es>
Making chrooted environment into /var/chroot
Doing preinstall()
Doing special_devices()
Doing gen_template_password()
Doing postinstall()
Done.
|
Puis
Code: | # addjailsw /var/chroot
addjailsw
A component of Jail (version 1.9 for linux)
http://www.gsyc.inf.uc3m.es/~assman/jail/
Juan M. Casillas <assman@gsyc.inf.uc3m.es>
Guessing mv args()
Guessing ls args()
Guessing ln args()
Guessing grep args()
Guessing cat args()
Guessing rmdir args()
Guessing vi args(-c q)
Guessing tail args()
Guessing sh args()
Guessing id args()
Guessing rm args()
Guessing head args()
Guessing cp args()
Guessing pwd args()
Guessing mkdir args()
Guessing touch args()
Guessing more args()
Warning: not allowed to overwrite /var/chroot/etc/passwd
Warning: not allowed to overwrite /var/chroot/etc/group
Warning: can't create /proc/meminfo from the /proc filesystem
/bin/mknod: `/var/chroot/dev/urandom': File exists
Done.
|
Enfin:
Code: | addjailuser /var/chroot /home/chroottest /bin/bash chroottest
addjailuser
A component of Jail (version 1.9 for linux)
http://www.gsyc.inf.uc3m.es/~assman/jail/
Juan M. Casillas <assman@gsyc.inf.uc3m.es>
Adding user chroottest in chrooted environment /var/chroot
Error: Can't add the user.
Done.
|
Donc voilà, je ne peux pas créer de user ...
Last edited by angela on Mon Feb 13, 2006 9:35 pm; edited 1 time in total |
|
Back to top |
|
|
Darkael Veteran
Joined: 10 Aug 2004 Posts: 1321 Location: France
|
Posted: Mon Feb 13, 2006 7:58 pm Post subject: |
|
|
Quote: | Code: | addjailuser /var/chroot /home/chroottest /bin/bash chroottest |
|
Je pense qu'a la place de chroottest il faut mettre un user deja existant de ton systeme. |
|
Back to top |
|
|
angela Apprentice
Joined: 16 Feb 2005 Posts: 150
|
Posted: Mon Feb 13, 2006 9:35 pm Post subject: |
|
|
Effectivement. Merci. J'ai eu d'autres erreurs, j'explique:
- D'abord, il faut créer un utilisateur sur le système ex:
adduser kille && passwd kille...
- Ensuite, il faut trafiquer le fichier /etc/passwd pour y trouver qqche comme:
kille:x:1005:100::/var/chroot/:/usr/bin/jail
Et dans le fichier /dir_chroot/etc/passwd:
kille:x:1005:100::/home/kille:/bin/bash
Ensuite, j'avais une erreur:
Code: | # su - kille
jail: execve() : No such file or directory
|
un simple
Code: | cp /lib/ld-linux.so.6 /var/chroot/lib/ | (ajoute les dépendances) a résolu le problème.
Voilà, j'espère que ça pourra aider qqn.
MErci |
|
Back to top |
|
|
|