How to avoid user's .kshrc

How to avoid user's .kshrc

Post by Clark L. Za » Wed, 02 Mar 1994 03:32:26



Please ignore my prior post. The person who maintains the script
told me that the .kshrc file was the problem and I didn't verify that.
I did some tests and find that the .kshrc file is not automatically
invoked for non-interactive shells.  For the case in question the
user's .kshrc file was being invoked, but I don't know why.  I'll
have to do some research on it.

--


 
 
 

1. Issue with the 'script' command in users '.kshrc' and '.bashrc' files

I am attempting to monitor users actions by using the following
'script' command:

# exec script -a /tmp/${LOG}

In order to capture all types of login whether 'telnet', su, su - etc
etc I have put it into the .profile, .dtprofile and the *rc shell
files.  This works fine for CSH and SH, however if I launch another
session (dtterm &) or switch shell to either KSH or BASH, then it
seems to spin round and attempt to infinately create fresh 'script'
sessions until I quit out.  Example below:

Script started, file is /tmp/x
Script started, file is /tmp/x
Script started, file is /tmp/x
Script started, file is /tmp/x
Script started, file is /tmp/x
Script started, file is /tmp/x
Script started, file is /tmp/x
Script started, file is /tmp/x
Script started, file is /tmp/x
Script started, file is /tmp/x
Script started, file is /tmp/x
Script started, file is /tmp/x
Script started, file is /tmp/x
Script started, file is /tmp/x
Script started, file is /tmp/x
Script started, file is /tmp/x
Script started, file is /tmp/x
Script started, file is /tmp/x
Script started, file is /tmp/x
Script started, file is /tmp/x
Script started, file is /tmp/x
^C
Broken Pipe

The irony here is that the exact ssame command (script -a filename)
works from a KSH command line, but not from the .kshrc (or .basrc) run
files.

Any ideas as to what the HELL is going on and (more importantly) what
the solution is?

TIA

Glynch.

2. Unrecognised video card in RH 5.2 ?

3. Possible to avoid a router on 'my side'??

4. Trans Ameritech Dist With UMSDOS

5. unattended dump -- avoiding 'yes' responses?

6. Compex RL100/ATX and kernel 2.1.x

7. Apache mod_rewrite: avoiding substitution of '%' (back-references in substition patterns)

8. Running Linux binaries

9. How to avoid 'hyphenation' in the nroff formatter???

10. PATCH - avoid 'defined but not used' warning in xor.h on i386

11. avoid error with 'if' statement

12. Touchscreen and avoiding Drag'n'Drop

13. login doesn't read profiel and kshrc