From owner-freebsd-questions Fri Nov 17 4:47:31 2000 Delivered-To: freebsd-questions@freebsd.org Received: from brunel.uk1.vbc.net (brunel.uk1.vbc.net [194.207.2.8]) by hub.freebsd.org (Postfix) with ESMTP id E0ED037B479 for ; Fri, 17 Nov 2000 04:47:26 -0800 (PST) Received: from localhost (lloyd@localhost) by brunel.uk1.vbc.net (8.11.0/8.11.0) with ESMTP id eAHClJ358278; Fri, 17 Nov 2000 12:47:19 GMT X-Authentication-Warning: brunel.uk1.vbc.net: lloyd owned process doing -bs Date: Fri, 17 Nov 2000 12:47:19 +0000 (GMT) From: Lloyd Rennie X-Sender: lloyd@brunel.uk1.vbc.net To: Jeremiah Gowdy Cc: questions@FreeBSD.ORG Subject: Re: chrooted shell accounts In-Reply-To: <004c01c04fda$2b1560a0$aa240018@cx443070b> Message-ID: MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII Sender: owner-freebsd-questions@FreeBSD.ORG Precedence: bulk X-Loop: FreeBSD.ORG On Thu, 16 Nov 2000, Jeremiah Gowdy wrote: > > 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. You must have missed the earlier emails here - /home/derek/bin/csh exists and has correct perms. -- Lloyd Rennie VBCnet GB Ltd lloyd@vbc.net tel +44 (0) 117 929 1316 http://www.vbc.net fax +44 (0) 117 927 2015 To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-questions" in the body of the message