Shell Programming:
an Exploit Explained, continued...
THE T SHELL (TCSH) AND WHERE TO GET IT
This Guide will concentrate on only one Unix shell: the T shell (tcsh).
That is shorthand for TENEX C Shell, an enhanced version of the Berkeley csh
(C shell).
Tcsh is the most powerful shell for people who wish to learn about every
command they have the power to use. Also, it is easy for spastic typists
(like me -- Carolyn) to use. To delete messed up stuff, just backspace! To
repeat a command, just use the up arrow to get to it.
The very first thing you need to do is find out if you have tcsh. Try the
following commands:
which tcsh
whereis tcsh
locate tcsh
As a last result, you can try "find". But be warned, many sysadmins don't
like that command because it is slow and disk intensive. The find command
can put a serious lag on the machine.
Once you find where your tcsh is, make sure it's a "valid shell". This
can be done by checking whether it is in the "/etc/shells" file. This may be
done with the command:
->grep tcsh /etc/shells
(Note: throughout this Guide, "->" represents your command prompt.) If
you get back something like:
/bin/tcsh
Then you can safely use tcsh. If you don't get anything back, then I
(BOFH) suggest you contact your ISP and ask them to install it and add it to
the valid shells list. Yes, you can compile and install your own version.
But if your shell is _not_ listed in the valid shells file, you may run into
difficulties using programs such as ftp (incoming ftp) since many ftp
daemons check to see if the user has a valid shell before logging in.
If you're not grep savvy, try just `cat`ing the file:
->cat shells
This should give you something that looks like:
/bin/sh
/bin/bash
/bin/tcsh
/bin/csh
/bin/zsh
/bin/ash
If you discover tcsh in that file, at the prompt in your Unix shell
account, simply type "tcsh" and play with it for awhile. If you find that
you prefer tcsh over your current shell, you can use the "chsh" command to
make it your primary shell so that everytime you log in, you will already be
in tcsh:
->chsh tcsh
This should give the result:
Changing login shell for cpm on mack.
Old shell: /bin/bash
New shell: /bin/tcsh
============================================================
Evil genius tip: Don't have tcsh? Do you run some sort of Unix on your home
computer? Then you can install it. To find a tcsh that will run under your
version of Unix, do a Web search. For example, for one that runs on almost
any type of Linux, you will probably be able to use the tcsh at the Debian
Linux Web site, http://www.debian.org.
Of course you will have to compile it, but if you are an evil genius you
either already know how to do that, or will figure out enough from this
Guide to successfully compile tcsh.
============================================================
More
shell programming --->>