Path: utzoo!attcan!uunet!lll-winken!elroy.jpl.nasa.gov!usc!wuarchive!psuvax1!rutgers!mephisto!mcnc!decvax.dec.com!zinn!lemuria!darryl From: darryl@lemuria.MV.COM (Darryl Wagoner) Newsgroups: comp.unix.questions Subject: Re: How to prevent VI from getting a shell? Keywords: vi Message-ID: <1990Sep19.125504.6618@lemuria.MV.COM> Date: 19 Sep 90 12:55:04 GMT References: <501@trux.UUCP> Reply-To: darryl@lemuria.UUCP (Darryl Wagoner) Organization: Shecora Associates, Inc. Nashua, NH Lines: 22 In article <501@trux.UUCP> car@trux.UUCP (Chris Rende) writes: >If I want to give someone access to VI and yet deny them access to a shell, >how do I prevent the user from using VI's ":!" command? >I have an application program which launches VI. I don't want the user to >be able to get to a shell from VI. (I also don't want the user to be able >to launch other commands from VI. I.e., No :!pwd, or !!sort, etc...). I am not sure how secure it is, but the simple way is to change the "SHELL" environment variable to something like "true(1)". This works for both :! and !!command. Good luck -Darryl -- Darryl Wagoner darryl@lemuria.MV.COM or uunet!virgin!lemuria!darryl 12 Oak Hill Road Brookline, NH 03033 Office: 603.672.0736 Home: 603.673.0578