[Date Prev][Date Next] [Thread Prev][Thread Next]
[Thread Index]
[Date Index]
[Author Index]
chroot and login
- From: "Gavin Woodhatch" <gavin cafe ch>
- To: axp-list redhat com
- Subject: chroot and login
- Date: Wed, 11 Mar 1998 21:19:33 +0100
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
[Date Prev][Date Next] [Thread Prev][Thread Next]
[Thread Index]
[Date Index]
[Author Index]
[]