1833707 Members
2360 Online
110063 Solutions
New Discussion

.sh_history Issue

 
SOLVED
Go to solution
MikeL_4
Super Advisor

.sh_history Issue

We use CA's ETrust product on our HPUX 11.11 servers. ETrust adds a command of there own to the /etc/profile script: /etc/profile.CA

The problem we are seeing after a recent upgrade to ETrust is the /etc/profile.CA script is being written into the .sh_history file for each user each time they log in.

Has anyone seen anything like this before or know what could cause it ?

Thanks
5 REPLIES 5
James R. Ferguson
Acclaimed Contributor
Solution

Re: .sh_history Issue

Hi Mike:

If the addition was a function() then the body of the function will be written into the history file. In-line any code you add to the profile.

Regards!

...JRF...
MikeL_4
Super Advisor

Re: .sh_history Issue

James, the lines being listed are within a function within the script.. So then this is normal ??
James R. Ferguson
Acclaimed Contributor

Re: .sh_history Issue

Hi (again) Mike:

> the lines being listed are within a function within the script.. So then this is normal ??

Well, that is the behavior I too have seen.

Regards!

...JRF...
MikeL_4
Super Advisor

Re: .sh_history Issue

Thanks James
Dennis Handly
Acclaimed Contributor

Re: .sh_history Issue

JRF forgot to tell you how to suppress logging of functions: ;-)
set -o nolog

You may have to add this to /etc/profile or better yet in /etc/profile.CA.