Gentoo Forums
Gentoo Forums
Gentoo Forums
Quick Search: in
[chroot jail] impossible d'ajouter un user...(résolu)
View unanswered posts
View posts from last 24 hours

 
Reply to topic    Gentoo Forums Forum Index French
View previous topic :: View next topic  
Author Message
angela
Apprentice
Apprentice


Joined: 16 Feb 2005
Posts: 150

PostPosted: Mon Feb 13, 2006 4:40 pm    Post subject: [chroot jail] impossible d'ajouter un user...(résolu) Reply with quote

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
View user's profile Send private message
Darkael
Veteran
Veteran


Joined: 10 Aug 2004
Posts: 1321
Location: France

PostPosted: Mon Feb 13, 2006 7:58 pm    Post subject: Reply with quote

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
View user's profile Send private message
angela
Apprentice
Apprentice


Joined: 16 Feb 2005
Posts: 150

PostPosted: Mon Feb 13, 2006 9:35 pm    Post subject: Reply with quote

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
View user's profile Send private message
Display posts from previous:   
Reply to topic    Gentoo Forums Forum Index French All times are GMT
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum