Red Hat axp-list: Linux on Alpha (1995-2022)
 help / color / mirror / Atom feed
From: <mike@alpha.lab.realminfo.com>
To: Gavin Woodhatch <gavin@cafe.ch>
Cc: axp-list@redhat.com
Subject: Re: chroot and login
Date: Thu, 12 Mar 1998 10:03:35 -0500 (EST)	[thread overview]
Message-ID: <Pine.LNX.3.96.980312100255.1658C-100000@alpha.lab.realminfo.com> (raw)
In-Reply-To: <3506F1D4.2AC2FBB1@cafe.ch>



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 <unistd.h>
>     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 <unistd.h>
>     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
> 


      reply	other threads:[~1998-03-12 15:02 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
1998-03-11 20:19 chroot and login Gavin Woodhatch
1998-03-12 15:03 ` mike [this message]
read-only archive

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox