SourceFiles.org - Use the Source, Luke
Home | Register | News | Forums | Guide | MyLinks | Bookmark

Related Sites

Latest News
  General News
  Reviews
  Press Releases
  Software
  Hardware
  Security
  Tutorials
  Off Topic


Back to files

<html>
<head>
<title>PShell - Psypete's Shell</title> </head>
<body>
<h1><center>PShell - Psypete's Shell</center></h1> <p><font face="Arial" size="2">The PShell is a menu-driven and secured shell for use with SSH on a linux/UNIX-derivative operating system. Its menu design was taken from another popular menu-driven shell, loginshell.pl. Although it may appear similar, much code has been added and removed, and with the help of a chroot environment it has become powerfully secured. All in Perl, of course, and liscenced under the GNU GPL. The original developer of the loginshell program had no such liscence (even though his website differs), which is why i didnt modify much of his existing code where i could. He is Jason Woodward (woodwardj@jaos.org) and his website is http://opensource.jaos.org/ so dont say i never gave credit }:></font></p>
<center>
<h2><a href="howto.htm">How To Use PShell</a></h2><br> <h2><a href="chroot.htm">How To Make And Use A Chroot Environment</a></h2> </center>
<p>Without even access to a real shell like the Bourne Again SHell, it can control access to files, log-in an individual, and allow them access to only a few restricted programs. Optionally, internally-handled perl functions can take the place of some of these applications, reducing overhead of opening a new program and speeding up general access time. Plus the fact that it is tailored to specific requirements of that command. </p> <p><font face="Arial">So, how does it work? First one would need to create a chrooted environment to secure file and system access. If you do not know what chroot means, please look it up. You may create the chroot "jail" with an additional program which comes with the PShell called "makechroot.sh". It will copy essential files from your main /usr/, /var/, /etc/, and other folders and put it into a directory of your choice. I used an NFS-mounted directory so that another computer holds all my chrooted data. With extra programs that i added and a full linux installation, my whole chroot directory takes up about 270 megabytes (you only need one of these, and with the explosion of harddrives today that isnt alot). <br> <br> Now you need to set up the PShell shell settings in your password file. When you create a new user, an option is to tell it what shell to use. For users of the PShell, you would give the shell as the path to the PSell program. If your users already exist, you may edit your password file (usually /etc/passwd) and change their current shells to the file location of the PSHell. <br><br> Once this is done, you may simply execute sshd with the command "chroot /path/to/chroot/directory sshd" (as long as sshd is not running). This will start up ssh in your chroot environment. Now as soon as they SSH into that computer, they should immediately be given the PShell menu-driven program. From here they may use the basic commands given to them. You may easily add or remove commands in the menu if you have a basic understanding of Perl, the programming language used. Future releases will have a configuration-file type editing which is easy on standard users and developers alike.
</font>
</p>
<p>REQUIREMENTS:<br>
First and foremost, you need the Curses and Curses::Widgets modules to be able to actually run the pshell. Secondly, you need most basic linux utilities and they should be in their standard path (tested with Slackware Linux 8.0). If you dont think the programs are in their path, go through the code and simply find the program and put in the direct path. If you do not put in the direct path, you are not assured that the pshell will be able to execute it properly (if you got rid of /bin/sh and stuff). Then there's the web space; the default user home directory for their web space in Apache is "htaccess". I changed this to "www" in the script, and it's quite easy to change it in Apache as well. Open up your apache configuration file (httpd.conf usually) and find the line that configues mod_userdir.c. Edit the line that says "UserDir htdocs" and replace "htdocs" with "www" and restart Apache (usually by apachectl restart). And that's about it. </p>
</body></html>


Other Sites

Discussion Groups
  Beginners
  Distributions
  Networking / Security
  Software
  PDAs

About | FAQ | Privacy | Awards | Contact
Comments to the webmaster are welcome.
Copyright 2006 Sourcefiles.org All rights reserved.