$ man kshi
Reformatting page. Please Wait... done
User Commands kshi(1)
NAME
kshi - korny shell interpreter login (f)utility
SYNOPSIS
kshi
DESCRIPTION
kshi is a fully-functional, non-functioning UNIX shell-
looking thing. It can be used in place of a real shell by
replacing the user's shell path in /etc/passwd. It is fully-
functional in that just about every command available to a
standard Solaris 9 user is included. It is non-functioning
in that no command works as expected. Most users incorrectly
assume that they are interacting with the system. By
replacing a co-worker's default shell with kshi, one may
create a funny story to tell at one's next job.
kshi does absolutely nothing to the host system. It merely
takes input, discards it and prints something to the
screen. Nothing more. There are 590 supported Solaris
commands contained in kshi.
For new users and pointy-haired bosses, expected impact is
nil since they likely won't realize that Solaris isn't
supposed to act like that.
Moderate users and script kiddies will likely be so confused
that they will kill their session, or will understand that
something is terribly wrong and will be too ashamed to admit
defeat. The latter are the users that will likely peck away
at the keyboard indefinitely.
Experienced users will quickly deduce that someone is
goofing with them and will attempt to figure out how to
break out of it. If kshi is the user's default shell,
breaking out with ^C will end the session. Be aware that
there may be ways of accessing the system from the script,
so care must taken before unleashing this on experienced
users.
A definable escape key and challenge is included to allow
access to a real system shell. See source for details.
EXAMPLES
Example 1: Login screen. MOTD may be inserted here
Last login: Fri Jan 11 18:23:52 MDT 2008 from 10.0.0.5
Sun Microsystems Inc. SunOS 5.9 Generic May 2002
[guest@milton]$
Example 2: Confound users
[guest@milton]$ cd /etc
[guest@milton]$ pwd
/etc
[guest@milton]$ more passwd
passwd: No such file or directory
[guest@milton]$ ls
total 813
drwxr-xr-x 0 root sys 3584 Jan 1 00:01 .
drwxr-xr-x 0 root sys 1024 Jan 1 00:01 ..
[guest@milton]$ ls /
/: No such file or directory
Example 3: Output ranges from boring to ridiculous
[guest@milton]$ ls | more
invalid pipe: pipe is upside down. `|' unexpected
[guest@milton]$ mkdir tmp
Unibus timeout fatal trap program lost sorry
[guest@milton]$ kstat -p -T u 'unix:0:system_misc:avenrun*'
I really don't want to print all that out right now,
Lumbergh, I'm kinda busy. In fact, look, I'm gonna
have to ask you to just go ahead and come back
another time. I got a meeting with the Bobs in a
couple of minutes.
SEE ALSO
kshidos(1)
NOTES
Source for kshi is available in the kshi package.
kshi has a little fun with the user though many (most?)
commands do nothing other than throw errors. If a version
were written that mimicked the OS more closely, it may be
transparent even to experienced users.
The same principle may be applied to other operating systems
and equipment, such as Linux, HP/UX, AIX, Cisco, CICS, etc.
A DOS version will be available soon that runs on any
device with Perl installed, but presents the user with a C:\
prompt and a set of non-functional DOS commands. More non-
functional than standard DOS, anyway.
kshi is a large, ugly Perl loop. It presents a prompt, waits
for input and displays some output. Feel free to peruse the
source and have some fun with it. It's distributed under the
GNU General Public License (http://www.gnu.org/licenses).
All the commands can be found by searching the source for
#[command]. For example, searching for #ls will take you to
the section that parses the ls command. Changes may be made
there.
SunOS 5.9 Last change: 12 Jan 2008
$