From mboxrd@z Thu Jan 1 00:00:00 1970 Received: (qmail 32636 invoked from network); 12 Mar 1998 15:02:23 -0000 Received: from alpha.lab.realminfo.com (mike@209.137.74.51) by mail2.redhat.com with SMTP; 12 Mar 1998 15:02:23 -0000 Received: from localhost (mike@localhost) by alpha.lab.realminfo.com (8.8.7/8.8.7) with SMTP id KAA01977; Thu, 12 Mar 1998 10:03:35 -0500 Date: Thu, 12 Mar 1998 10:03:35 -0500 (EST) From: To: Gavin Woodhatch cc: axp-list@redhat.com Subject: Re: chroot and login In-Reply-To: <3506F1D4.2AC2FBB1@cafe.ch> Message-ID: MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII Have you made a replica of your /bin and /usr/bin directories in the new root location? If you dont you wont beable to do much. On Wed, 11 Mar 1998, Gavin Woodhatch wrote: > Hi Guys > > I know this is not quite Alpha specific .. but i do want it working on > my AS500 :) > > I am Trying to do the following .. when you login as a specific user > I would like to have a chroot shell up .. so my customers cant wrek to > mutch havok .. > > The command 'chroot /usr/local/telnetroot' works fine. > > If i add '/usr/bin/chroot /usr/local/telnetroot' to /etc/passwd (as > shell) > It does not work ,even after adding '/usr/bin/chroot' to /etc/shells .. > doesnt help > > I have come to the conclusion that Login can't handel any parameters ? > > So i have tried my (very bad ) C knowlege : > > #include > void main(int argc, char * argv[]) { > chroot("/usr/local/telnetlogin"); > execl("/bin/bash",0); > } > > compiled with gcc . no errors .. > > but when executing the binary : Segmentation Fault > > Using : > #include > void main(int argc, char * argv[]) { > chroot("/usr/local/telnetlogin"); > execl("/bin/bash","/bin/bash",0); > } > > gcc no errors again .. > > this time it works .... i get a new shell .. but the chroot part does > not work .. > it returns a value of '-1' thats means an error acurred .. but i dont > know what.. > > > Any ideas ? > > > Gavin Woodhatch > > > > -- > To unsubscribe: send e-mail to axp-list-request@redhat.com with > 'unsubscribe' as the subject. Do not send it to axp-list@redhat.com >