Date: Thu, 16 Nov 2000 06:33:20 -0800 From: "Jeremiah Gowdy" <jgowdy@home.com> To: "Lloyd Rennie" <lloyd@vbc.net>, <questions@FreeBSD.ORG> Subject: Re: chrooted shell accounts Message-ID: <004c01c04fda$2b1560a0$aa240018@cx443070b> References: <Pine.BSF.4.10.10011131312350.28019-100000@brunel.uk1.vbc.net>
next in thread | previous in thread | raw e-mail | index | archive | help
----- Original Message ----- From: "Lloyd Rennie" <lloyd@vbc.net> To: <questions@FreeBSD.ORG> Sent: Monday, November 13, 2000 5:22 AM Subject: chrooted shell accounts > > I have been having difficulty chrooting a user's shell on a machine here, > as detailed below. In this case the user in question is 'derek'. > > > > derek's shell is /usr/local/bin/derekshell, which is a binary file > generated by /usr/local/bin/derekshell.c; > > void main (int argc, char *argv []) { > system("/usr/local/bin/derekshell.sh"); > } > > No rocket Science there. /usr/local/bin/derekshell has been added to > /etc/shells. > > /usr/local/bin/derekshell.sh looks like; > > #!/bin/sh > cd /home/derek > id # debug purposes > /usr/sbin/chroot /home/derek /bin/csh > id # debug purposes > I believe what you're doing wrong is, when you chroot, you need a new copy of the shell relative to the new path. In other words, when you chroot, suddenly /bin/csh is no longer valid. create /home/derek/bin/csh and you will probably have more luck. To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-questions" in the body of the message
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?004c01c04fda$2b1560a0$aa240018>