getting root to always read its .profile

2007-12-24 23:23:00

I have the history for root set up so that there is a separate history
file for each root session, the name of the person who su-ed to root
and the current time are in the filename, and the history files are all
in a separate directory. It is very nice. I do it via the root
/.profile (root's shell is /bin/ksh).

Occasionally, when someone connects, the root history is just appended
to /.sh_history ... i.e., the .profile is not read. I have been trying
to figure out when and why this happens, but to no avail. I know that
it is not when the machine is in single-user mode because I have done
that and my commands are recorded in the /.history directory as they
should be. Can anyone suggest other ways in which the /.profile file
would not be read by root and so the HISTORY would not be set correctly?
TIA and I will summarize.

+-----------------------------------------------------------------------+
| Christopher L. Barnard O When I was a boy I was told that |
| cbarnard at tsg.cbot.com / \ anybody could become president. |
| (312) 347-4901 O---O Now I'm beginning to believe it. |
| http://www.cs.uchicago.edu/~cbarnard --Clarence Darrow |
+----------PGP public key available via finger or PGP keyserver---------+

Comments

Got something to say?

You must be logged in to post a comment.