chroot + su + env?



I need to execute a bash script in a chroot'ed environment and as a different user. I also need to set some of the variables in the new environment based on values of variables in the current environment. How can I do this?

.