LinuxQuestions.org
Visit Jeremy's Blog.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - General
User Name
Password
Linux - General This Linux forum is for general Linux questions and discussion.
If it is Linux Related and doesn't seem to fit in any other forum then this is the place.

Notices


Reply
  Search this Thread
Old 08-23-2005, 04:27 AM   #1
saavik
Member
 
Registered: Nov 2001
Location: NRW, Germany
Distribution: SLES / FC/ OES / CentOS
Posts: 614

Rep: Reputation: 32
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!

Last edited by saavik; 08-23-2005 at 04:28 AM.
 
Old 08-24-2005, 10:37 PM   #2
btmiller
Senior Member
 
Registered: May 2004
Location: In the DC 'burbs
Distribution: Arch, Scientific Linux, Debian, Ubuntu
Posts: 4,290

Rep: Reputation: 378Reputation: 378Reputation: 378Reputation: 378
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 :-().
 
Old 08-25-2005, 05:30 PM   #3
Pilez
LQ Newbie
 
Registered: Aug 2005
Posts: 5

Rep: Reputation: 0
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.
 
Old 07-04-2007, 10:30 AM   #4
ajo0909
LQ Newbie
 
Registered: Jun 2006
Distribution: Debian (Sarge,Sid,Etch)
Posts: 8

Rep: Reputation: 1
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

Last edited by ajo0909; 07-04-2007 at 10:33 AM.
 
  


Reply



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
Installing .bin-files, leave the file in /usr/local/bin/ ? lagu2653 Linux - Software 1 11-08-2005 08:30 PM
path in services wrong for clamav updated frm 0.75 to 0.80 usr/bin vs usr/local/bin Emmanuel_uk Linux - Newbie 3 04-22-2005 01:02 AM
Host XXX.XXX.XXX.XXX is not allowed to connect to this MySQL server ocavid Linux - Newbie 2 03-16-2005 09:40 AM
Cannot Enter chroot /usr/bin/env directory not found Zero-0-Effect Linux From Scratch 2 03-13-2004 12:41 PM
bin/bash:usr/bin/lpr NO SUCH FILE OR DIRECTORY Adibe_Hamm Linux - Newbie 3 10-14-2003 02:30 AM

LinuxQuestions.org > Forums > Linux Forums > Linux - General

All times are GMT -5. The time now is 07:39 PM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration