From: "Gavin Woodhatch" <gavin@cafe.ch>
To: axp-list@redhat.com
Subject: chroot and login
Date: Wed, 11 Mar 1998 21:19:33 +0100 [thread overview]
Message-ID: <3506F1D4.2AC2FBB1@cafe.ch> (raw)
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
next reply other threads:[~1998-03-11 20:19 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
1998-03-11 20:19 Gavin Woodhatch [this message]
1998-03-12 15:03 ` chroot and login mike
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