When the user logs in, it's using auth from /etc, chroots them in /home/jail using /usr/local/bin/jail, and provides them with their shell from auth in /home/jail/etc. If you provide them with the "passwd" binary within the chroot, you should know that providing setuid root binaries is something you should do only after careful deliberation it does not open security holes. Second, from what I outlined roughly, you see that providing the binary within the chroot doesn't make sense, because /home/jail/etc auth isn't used for authentication (AFAIK).
If you're talking something like a shellserver here, there's probably other means of enabling users to change passwds, maybe something like a SSL-secured cgi script.
|