- Community Home
- >
- Servers and Operating Systems
- >
- Operating Systems
- >
- Operating System - HP-UX
- >
- Re: User history
Operating System - HP-UX
1752717
Members
5493
Online
108789
Solutions
Forums
Categories
Company
Local Language
юдл
back
Forums
Discussions
Forums
- Data Protection and Retention
- Entry Storage Systems
- Legacy
- Midrange and Enterprise Storage
- Storage Networking
- HPE Nimble Storage
Discussions
Discussions
Discussions
Forums
Forums
Discussions
юдл
back
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
Discussion Boards
Discussion Boards
Blogs
Information
Community
Resources
Community Language
Language
Forums
Blogs
Go to solution
Topic Options
- 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 05:58 PM
тАО08-28-2008 05:58 PM
Re: User history
>then switch to particular user and gave cat .sh_history command. But it showing permission denied.
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?
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
Dennis:
>>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.
>>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.
*** Say 'Thanks' with Kudos ***
- 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
This is what I use in root's .profile.
# 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.
# 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.
"The difference between me and you? I will read the man page." and "Respect the hat." and "You could just do a search on ITRC, you don't need to start a thread on a topic that's been answered 100 times already." Oh, and "What. no points???"
- « Previous
-
- 1
- 2
- Next »
The opinions expressed above are the personal opinions of the authors, not of Hewlett Packard Enterprise. By using this site, you accept the Terms of Use and Rules of Participation.
News and Events
Support
© Copyright 2024 Hewlett Packard Enterprise Development LP