Path: utzoo!utgpu!news-server.csri.toronto.edu!cs.utexas.edu!usc!zaphod.mps.ohio-state.edu!caen!ox.com!mudos!mju From: mju@mudos.ann-arbor.mi.us (Marc Unangst) Newsgroups: comp.unix.misc Subject: Re: Who's in my Directory ? Message-ID: Date: 25 Nov 90 21:40:37 GMT References: <3789@wb3ffv.ampr.org> Organization: The Programmers' Pit Stop, +1 313 665 2832 Lines: 23 wmark@wb3ffv.ampr.org (Mark Winsor) writes: > The /etc/fuser -u command will tell you who is in a file, but it reads > /dev/kmem so it requires root access. Not necessarily. How do you think ps(1) and friends work? Try this: # chown bin /etc/fuser /dev/kmem # chgrp kmem /etc/fuser /dev/kmem # chmod 2111 /etc/fuser # chmod 040 /dev/kmem Presto, fuser can read /dev/kmem, but ordinary users can't. You may need to do this to /{vmunix,unix} (whatever your kernel is called), since a lot of those sort of utilities read the kernel namelist to find out where the stuff is in /dev/kmem. (Caveat: I don't have fuser, so I don't know if this opens up any security holes. Check closely; if it required root access before, there might have been a reason.) -- Marc Unangst | mju@mudos.ann-arbor.mi.us | "Bus error: passengers dumped" ...!umich!leebai!mudos!mju |