LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - General (http://www.linuxquestions.org/questions/linux-general-1/)
-   -   sudo /usr/bin/chroot /home/chroot /bin/su - xxx| /bin/su: user xxx does not exist (http://www.linuxquestions.org/questions/linux-general-1/sudo-usr-bin-chroot-home-chroot-bin-su-xxx%7C-bin-su-user-xxx-does-not-exist-356074/)

saavik 08-23-2005 05:27 AM

sudo /usr/bin/chroot /home/chroot /bin/su - xxx| /bin/su: user xxx does not exist
 
Hello!

I tried to set up a chroot dir.

Everything is working but the su command.

1.) Yes, I have a passwd + goup under /home/chroot/etc
2.) No, I would not like to use anything like rssh or a 'patched' openssh
3.) Yes I RTFM but it does`t work
4.) Yes, I recompiled the su as wanted but ....no success...yes I did not forget the libs

sudo /usr/bin/chroot /home/chroot /bin/su - xxx
/bin/su: user xxx does not exist

Thanks for every idea!

btmiller 08-24-2005 11:37 PM

What distro are you using? Do you have any necessary PAM stuff in your chroot (swhouldn't need them, but you never know..). First though, check for typos i n the chrooted /etc/passwd (I once spent hours searching for a problem that turned out to be an out of place colon :-().

Pilez 08-25-2005 06:30 PM

Re: sudo /usr/bin/chroot /home/chroot /bin/su - xxx| /bin/su: user xxx does not exist
 
Quote:

Originally posted by saavik

sudo /usr/bin/chroot /home/chroot /bin/su - xxx
/bin/su: user xxx does not exist

you probably didn't copy the name switch service plugin libraries to the jail. try a locate on libnss

are you aware that such a chroot jail setup is not secure? it is possible to break out of it.

if you want a secure jail, and some convenient scripts to create it, check out the jailkit project , I use it for accounts that can do only sftp and cvs to a chroot jail, and nothing else.

ajo0909 07-04-2007 11:30 AM

Target file system doesn't have /sbin/init or chroot /mnt/buildroot cannot run comman
 
Target file system doesn't have /sbin/init or chroot /mnt/buildroot cannot run command '/bin/bash' / 'su' 'env' u.s.w

usually if you make a live cd system
you would copy your system tree
to a directory like: /path/to/my/buildroot

if you use cp -a ; or cp -ar ;
the /lib64 , which is just a link to /lib
on debian like systems, - goes lost

and you receive this errors at boot time from the Kernel
or by tryeing to execute chroot as a result .

JUST SET THE ... LINK and everything would be ok


All times are GMT -5. The time now is 02:29 PM.