Re: Prompt for chrooted users

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]



James B. Byrne wrote:
So, before I go messing around moving files I would some information
from you as tio what I have overlooked.  Do I need to move something
like etc/passwd and /etc/group into the chroot/etc?
You haven't said anything about the process you used, so it's hard to 
say what you've overlooked.
The basics thing to remember is that the chroot is expected to be a 
complete system.  If you need name resolution, then /etc/passwd and 
/etc/group need to be present in the chroot.  If you need DNS 
resolution, /etc/resolv.conf, too.  If your system uses sssd, chroot 
won't have access to it.  The shell and all of the commands and all of 
the associated libraries must be in the chroot.  Finally, the user's 
home directory has to exist within and relative to the chroot directory.
So, if the user's home directory is /home/user and you want to chroot 
them there, you would expect to have something like:
/home/user/bin/bash
/home/user/etc/bash_profile
/home/user/home/user/.bash_profile

You could symlink /home/user/home/user to /, as well.
_______________________________________________
CentOS mailing list
CentOS@xxxxxxxxxx
http://lists.centos.org/mailman/listinfo/centos



[Index of Archives]     [CentOS]     [CentOS Announce]     [CentOS Development]     [CentOS ARM Devel]     [CentOS Docs]     [CentOS Virtualization]     [Carrier Grade Linux]     [Linux Media]     [Asterisk]     [DCCP]     [Netdev]     [Xorg]     [Linux USB]
  Powered by Linux