- Community Home
- >
- Servers and Operating Systems
- >
- Operating Systems
- >
- Operating System - HP-UX
- >
- Re: HISTFILE=_____ works for root but not other ID...
Categories
Company
Local Language
Forums
Discussions
Forums
- Data Protection and Retention
- Entry Storage Systems
- Legacy
- Midrange and Enterprise Storage
- Storage Networking
- HPE Nimble Storage
Discussions
Forums
Discussions
Discussions
Discussions
Forums
Discussions
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
- BladeSystem Infrastructure and Application Solutions
- Appliance Servers
- Alpha Servers
- BackOffice Products
- Internet Products
- HPE 9000 and HPE e3000 Servers
- Networking
- Netservers
- Secure OS Software for Linux
- Server Management (Insight Manager 7)
- Windows Server 2003
- Operating System - Tru64 Unix
- ProLiant Deployment and Provisioning
- Linux-Based Community / Regional
- Microsoft System Center Integration
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Community
Resources
Forums
Blogs
- Subscribe to RSS Feed
- Mark Topic as New
- Mark Topic as Read
- Float this Topic for Current User
- Bookmark
- Subscribe
- Printer Friendly Page
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
06-19-2002 05:43 AM
06-19-2002 05:43 AM
/.roothist/log.yymmdd.hhmmss and uses it as the history file.
STAMP=`date +%y%m%d.%I%M%S`
export HISTFILE=$HOME/.hist/log.$STAMP
Unfortunately, I can't get get it to work for other IDs. ( oracle for instance ).
After logging in as oracle, I can do a:
$ echo $HISTFILE
and I get the correct path and filename but the file is never created nor used as the history file. I had already created the directory and ensured that oracle had proper permissions to it. oracle continues to use .sh_history.
Any ideas?
Thanks.
Thom
Solved! Go to Solution.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
06-19-2002 05:48 AM
06-19-2002 05:48 AM
Re: HISTFILE=_____ works for root but not other IDs.
try the following:
export HISTFILE=$HOME/.hist/log.$`STAMP`
I had to use this for making timestamps by scripts. The problem is that the shell has to refresh the timestamp by executing date.
HTH,
RGDS, Holger
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
06-19-2002 05:52 AM
06-19-2002 05:52 AM
Re: HISTFILE=_____ works for root but not other IDs.
Unfortunately I can even use:
HISTFILE=$HOME/.hist
HISTSIZE=500
export HISTFILE HISTSIZE
and it doesn't seem to work.
I'll keep that TIMESTAMP trick in mind though.
Thom
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
06-19-2002 05:55 AM
06-19-2002 05:55 AM
Re: HISTFILE=_____ works for root but not other IDs.
the HISTFILE variable contains a subdirectory. Is the subdir created for the relevant users?? And are the privileges OK for these users?
Otherwise creating the file (touch) in advance with the right privileges might help.
good luck,
Thierry.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
06-19-2002 06:04 AM
06-19-2002 06:04 AM
Re: HISTFILE=_____ works for root but not other IDs.
EDITOR=/usr/bin/vi; export EDITOR
Marty
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
06-19-2002 06:05 AM
06-19-2002 06:05 AM
SolutionAccording to the man page for "sh-posix", when you set HISTFILE, only the next shell that is launched would use the assigned filename.
So if you assign HISTFILE in .profile, not until another shell is launched will it use the defined file for history.
-- Rod Hills
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
06-19-2002 06:15 AM
06-19-2002 06:15 AM
Re: HISTFILE=_____ works for root but not other IDs.
I added a > $HOME/.hist/log.$STAMP
before the export HISTFILE= statement and
it created the file but still doesn't use it.
As soon as I login I tried the following:
Rights for non-DOD U.S. Government Departments and Agencies are as set
forth in FAR 52.227-19(c)(1,2).
QADB$ echo $HISTFILE
/home/tdharri/.hist/log.020619.090924
*** HISTFILE has the correct value.
QADB$ ll -d .hist
drwxr-xr-x 2 tdharri users 96 Jun 19 09:09 .hist
*** .hist perms should be okay.
QADB$ ll .hist
total 0
-rw-r--r-- 1 tdharri users 0 Jun 19 09:09 log.020619.090924
*** As you can see the log file was created but it isn't being used. .sh_history is still the history file.
???
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
06-19-2002 06:25 AM
06-19-2002 06:25 AM
Re: HISTFILE=_____ works for root but not other IDs.
EDITOR=vi
export EDITOR
Rodney: Neither .profile has an exec anywhere in it.
Thanks.
Thom
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
06-19-2002 06:31 AM
06-19-2002 06:31 AM
Re: HISTFILE=_____ works for root but not other IDs.
I think you're on the right track. If I log in the new history file doesn't work. However,
if I "su tdharri" it does.
Thanks a lot.
Thom
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
06-19-2002 06:37 AM
06-19-2002 06:37 AM
Re: HISTFILE=_____ works for root but not other IDs.
-- Rod Hills
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
06-19-2002 06:59 AM
06-19-2002 06:59 AM
Re: HISTFILE=_____ works for root but not other IDs.
Marty
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
06-19-2002 07:04 AM
06-19-2002 07:04 AM
Re: HISTFILE=_____ works for root but not other IDs.
I tried both of the following combinations at the very beginning of my .profile.
1)
EDITOR=vi; export EDITOR
export HISTFILE=$HOME/.hist/log$$
2)
export HISTFILE=$HOME/.hist/log$$
EDITOR=vi; export EDITOR
No luck. :-(
As I mentioned, if I su tdharri after initially logging in I starts using the new history file.
Thanks.
Thom
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
06-19-2002 07:07 AM
06-19-2002 07:07 AM
Re: HISTFILE=_____ works for root but not other IDs.
set -o as tdharri showed that vi was ON.
Thanks.
Thom
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
06-20-2002 11:39 AM
06-20-2002 11:39 AM
Re: HISTFILE=_____ works for root but not other IDs.
Are you using CDE? If so, for your .profile to work I think you have to modify $HOME/.dtprofile
Instructions for modifying .dtprofile are in the file.
Good Luck,
Joe
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
06-20-2002 12:15 PM
06-20-2002 12:15 PM
Re: HISTFILE=_____ works for root but not other IDs.
We're actually using PuTTY SSH and not CDE. We also get the same issue with telnet.
Thanks for you idea.
Thom
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
06-21-2002 06:28 AM
06-21-2002 06:28 AM
Re: HISTFILE=_____ works for root but not other IDs.
-- Rod Hills