Newsgroups: comp.unix.questions Path: utzoo!sq!lee From: lee@sq.sq.com (Liam R. E. Quin) Subject: Re: vi shell access Message-ID: <1989Dec1.002256.2294@sq.sq.com> Keywords: set shell Reply-To: lee@sq.com (Liam R. E. Quin) Organization: Unixsys (UK) Ltd References: <462@ntcsd1.UUCP> Date: Fri, 1 Dec 89 00:22:56 GMT >mab@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@sq.com (Whilst visiting Canada from England, until Christmas) utai!anduk.uucp!lee (after Christmas) ...striving to promote the interproduction of epimorphistic conformability