- Community Home
- >
- Servers and Operating Systems
- >
- Operating Systems
- >
- Operating System - HP-UX
- >
- User history
Categories
Company
Local Language
Forums
Discussions
Knowledge Base
Forums
- Data Protection and Retention
- Entry Storage Systems
- Legacy
- Midrange and Enterprise Storage
- Storage Networking
- HPE Nimble Storage
Discussions
Knowledge Base
Forums
Discussions
- Cloud Mentoring and Education
- Software - General
- HPE OneView
- HPE Ezmeral Software platform
- HPE OpsRamp
Knowledge Base
Discussions
Forums
Discussions
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
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
08-28-2008 07:57 AM
08-28-2008 07:57 AM
I want to check perticular user history. As I am root user, how do i check the user command history. I checked in .sh_history. But it shows only root user history.
Could any one help me pls?
Thanks.
Solved! Go to Solution.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
08-28-2008 08:03 AM
08-28-2008 08:03 AM
Re: User history
user history is in the home directory of the user - there can't be root history ...
Volkmar
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
08-28-2008 08:18 AM
08-28-2008 08:18 AM
Re: User history
I logged as a root, then switch to perticular user and gave cat .sh_history command. But it showing permission denied. I was wondering to see it.
Thanks.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
08-28-2008 08:20 AM
08-28-2008 08:20 AM
Re: User history
should be no problem for the root user ...
can you copy it or change permissions?
What os do you have?
V.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
08-28-2008 08:36 AM
08-28-2008 08:36 AM
Re: User history
Thanks lot. I can see it using change the file permission . Is it possible to see the time also. I can see all the command without time.
Thanks.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
08-28-2008 08:44 AM
08-28-2008 08:44 AM
Re: User history
no, not with this shell feature - it only saves the commands.
You should have to search for scripts for doing this (maybe like echo the date then read changes of the history)
V.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
08-28-2008 08:49 AM
08-28-2008 08:49 AM
Re: User history
Thanks lota gain.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
08-28-2008 09:08 AM
08-28-2008 09:08 AM
Re: User history
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
08-28-2008 09:24 AM
08-28-2008 09:24 AM
Re: User history
Thanks lot . I Could see the history from cat /home/username/.sh_history also.
Thanks.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
08-28-2008 03:32 PM
08-28-2008 03:32 PM
Re: User history
Try this:
HISTFILE=/var/adm/crash/history/.sh_history.$LOGNAME
readonly HISTFILE
export HISTFILE
print -s "LOGIN - `date '+%m-%d-%E-%H:%M'`"
HISTSIZE=1000
export HISTSIZE
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
08-28-2008 05:58 PM
08-28-2008 05:58 PM
Re: User history
There is no need to switch to the user unless the home directory is NFS mounted and root is nobody. In that case, you can switch to the user and look at the file.
>Volkmar: should be no problem for the root user
Unless over NFS where root is less than nobody.
>Is it possible to see the time also.
The time isn't recorded. Just some binary numbers, the command number?
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
08-29-2008 01:27 AM
08-29-2008 01:27 AM
Re: User history
>>Volkmar: should be no problem for the root user
>Unless over NFS where root is less than nobody.
Unless the root of this ws is annouced as root for the nfs mounted dirs too :-)
Else, I believe, also permission change wouldn't work.
But you're right, it's common for me that it works at my side, but there can be differences elsewhere.
Ramkumar - as said, as root you must not change to the particular user to view the file.
V.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
09-02-2008 06:01 AM
09-02-2008 06:01 AM
Solution# Setup history file
WHOAMI=$(who am i | awk '{print $1}')
touch ~/.${WHOAMI}_sh_history
HISTFILE=~/.${WHOAMI}_sh_history
export HISTFILE
echo "# Open: $(date)\n\0000\c" >> $HISTFILE
You can use parts of it for other user profiles. The echo line will put a time stamp in the profile. You can go to the time stamp in the history file and review the list of commands issued since it was added.