vi shell access

Liam R. E. Quin lee at sq.sq.com
Fri Dec 1 11:22:56 AEST 1989


>mab at ntcsd1.UUCP (Mark Bradford) writes:
>
>We have an application that allows the users to us vi.  What we would
>like to do is to keep the users from accessing the shell.  We currently
>do not allow the users to use ":!command" by setting the SHELL environment
>to a script.  The problem has arisen that some of our users have learned
>to use the set shell option in vi.  Is there any way of disabling this
>option?  
Yes, you can use "adb" on vi to change /bin/sh into /bin/xx, and have a
program called "xx" in /bin which does what you want.
Do this to a *copy* of vi...
You will almost certainly lose the ability to do
	:r a*
but this is a relatively small price to pay.

You can also do
	map ! x
	map! ^V^V x
	map! ! x
to prevent people from typing "!".

But this is not good, as it disables a lot of useful things, like
	!!spell -b %

If you want a slightly more secure environment, you could consider using
chroot (with a little care...).

If you want to restrict users who've exceeded their disk quota, you could
use the ed clone from comp.sources.misc (today) and disable the ! command.

Lee
-- 
Liam R. Quin, Unixsys (UK) Ltd [note: not an employee of "sq" - a visitor!]
lee at sq.com (Whilst visiting Canada from England, until Christmas)
utai!anduk.uucp!lee (after Christmas)
 ...striving to promote the interproduction of epimorphistic conformability



More information about the Comp.unix.questions mailing list