Re: non root user - who has file open



On Nov 9, 1:18 am, Upsidedown Head <simon.bower...@xxxxxxxxxxxxx>
wrote:
On 8 Nov, 15:41, James_Szabadics <jam...@xxxxxxxxxxx> wrote:





I am using SCO OSR6 and have used lsof and fuser as root to see who
has a particular file open but now i want to incorporate a similar
test into a script used by normal users.

As a normal user I get the following errors

$ lsof
lsof: can't read kernel name list from /stand/unix

$ /etc/fuser -u thefile
UX:fuser: ERROR: open of /dev/kmem failed: Permission denied

$ ls -l /stand/unix /dev/kmem
cr--r----- 1 root mem 2, 1 Nov 8 10:34 /dev/kmem
-r--r----- 1 bin mem 2890500 May 16 14:15 /stand/unix

Is it advisable to give ordinary users permissions in these areas or
is there some other utility I would be better off using?

Regards

James

Hi James,

It would be a bad idea to start changing perms in these areas as you
would leave yourself wide open in terms of system security.

However OSR6 like UnixWare 7 has the "tfadmin" facility which allows
users to run privelaged commands which should do the job for you.
Check out the following SCO TA :

http://wdb1.sco.com/kb/showta?taid=109663&qid=386743498&sid=522376055...

Let me know if this doesn't help or you require further advice.- Hide quoted text -

- Show quoted text -

Hmm,

$ man tfadmin
man: tfadmin not found
$ find /sbin -name tfadmin*
$

It seems OSR6 doesnt natively have tfadmin. Maybe it has the OSR5
equivalent if such a thing exists? I would prefer to use this in the
script rather than change perms. Any ideas on where to from here?

Regards

James

.