home *** CD-ROM | disk | FTP | other *** search
- Newsgroups: comp.unix.admin
- Path: sparky!uunet!usc!zaphod.mps.ohio-state.edu!moe.ksu.ksu.edu!ux1.cso.uiuc.edu!news.iastate.edu!test.cc.iastate.edu!michaelv
- From: michaelv@iastate.edu (Michael L. VanLoon)
- Subject: Re: Prevent user from editing /etc/passwd
- Message-ID: <michaelv.714339575@test.cc.iastate.edu>
- Sender: news@news.iastate.edu (USENET News System)
- Organization: Iowa State University, Ames IA
- References: <1992Aug17.131329.22491@cpp.ob.open.de>
- Date: Thu, 20 Aug 1992 19:39:35 GMT
- Lines: 20
-
- In <1992Aug17.131329.22491@cpp.ob.open.de> schweik@cpp.ob.open.de (Martin Schweikert) writes:
-
- >Because I know he uses vi, I tried to replace /usr/bin/vi by a shell
- >script that tests if one of its parameters is *passwd. If so,
- >it would write a message to my terminal, send me mail, and make a copy
- >of /etc/passwd before it would invoke the original vi. Exactly here is
- >the problem: vi (I don't know much about it :-) seems to check under
- >what name it was invoked. And in my replacement script I invoked it
- >with "vi.orig". So vi finds out it wasn't invoked as vi, vedit, ... and
- >it seems that ex gets executed (I know perfectly nothing about ex).
-
- Simply move the real vi to a different directory, then put
- /usr/hidden.dir/vi in your shell script when it comes time to invoke
- the editor.
-
- --
- ------------------------------------------------------------------------------
- Michael L. VanLoon Project Vincent Systems Staff
- michaelv@iastate.edu Iowa State University Computation Center
- ------------------------------------------------------------------------------
-