home *** CD-ROM | disk | FTP | other *** search
- Path: sparky!uunet!mcsun!Germany.EU.net!unido!open.de!mailbox!teddy!germany!open!ruhr.de!horga!reswi!cppdo!cppob!schweik
- From: schweik@cpp.ob.open.de (Martin Schweikert)
- Newsgroups: comp.unix.admin
- Subject: Prevent user from editing /etc/passwd
- Message-ID: <1992Aug17.131329.22491@cpp.ob.open.de>
- Date: 17 Aug 92 13:13:29 GMT
- Organization: Private/FRG
- Lines: 26
-
- Hi!
-
- I have a user on my SVR3 machine who knows - and must know :-( - the
- root password.
-
- I tried to find a method to prevent him from editing /etc/passwd. It's
- quite difficult.
-
- 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).
-
- Now, my question: is there another possibility than writing a C program
- that exec()s vi? Not that it was a problem to write such a program, but
- I would like to keep things as simple as possible ...
-
- Martin
- --
- M. Schweikert-Oberhausen/Germany-schweik@cpp.ob.open.de / My life is based on
- <>< Life-Net: martin_schweikert@credo.zer (Joh3:16) / two things: Belief in
- Fax: +49 208 85 97 108, Phone: +49 208 85 97 142 / Christ and Murphy's Law
-