- Community Home
- >
- Servers and Operating Systems
- >
- Operating Systems
- >
- Operating System - HP-UX
- >
- Tracking user keystrokes
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
09-29-2003 12:24 AM
09-29-2003 12:24 AM
HISTFILE=${HOME}/.history_files/.hist.`who am i|awk '{print $1}'`.$$.`date +%d%m%y.%H%M`
I found this lines works prfect when doing su - userid, or when connecting via telnet.
But when using reflectionX, and CDE it doesn't seem to recognise this line.
I tried to do it as the following:
export export HISTFILE=${HOME}/.history_files/.hist.`who am i|awk '{print $1}'`.$$.`date +%d%m%y.%H%M`
By doing so variable HISTFILE is declared but the `who am i|awk '{print $1}'` is not recognized and just contains nothing.
Any help will be much appreciatable.
Ihab
Solved! Go to Solution.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
09-29-2003 12:30 AM
09-29-2003 12:30 AM
Re: Tracking user keystrokes
Uncomment or change it to
DTSOURCEPROFILE=true
Thanks
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
09-29-2003 12:33 AM
09-29-2003 12:33 AM
Re: Tracking user keystrokes
but DTSOURCEPROFILE=true is already uncommented
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
09-29-2003 12:53 AM
09-29-2003 12:53 AM
Re: Tracking user keystrokes
script /dir/file
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
09-29-2003 12:53 AM
09-29-2003 12:53 AM
Re: Tracking user keystrokes
$chmod 755 $HOME/.dtprofile
Revert
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
09-29-2003 01:43 AM
09-29-2003 01:43 AM
Re: Tracking user keystrokes
I don't think there is a problem with .dtprofile
in the .profile I have 2 senarios first when I set histfile to
export HISTFILE=${HOME}/.history_files/.hist.`who am i|awk '{print $1}'`.$$.`date +%d%m%y.%H%M`
the HISTFILE is /home/.histroy_files/.hist..pid#.ddmmyy.hhmm
So it's just totally ignores the 'who am i part'
If I omit 'export'
the variable "HISTFILE" doesn't have a value, but I am sure the the .profile is executed in both cases.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
09-29-2003 02:02 AM
09-29-2003 02:02 AM
Re: Tracking user keystrokes
If you are using ksh, try exporting those values in .kshrc inside the home dir. If not found create the file.
You are talking about tracking users commands. If you really want to tract each and every keystroke the user makes, the best option is script. man script for more details.
HTH,
Umapathy

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
09-29-2003 02:12 AM
09-29-2003 02:12 AM
Re: Tracking user keystrokes
1) try $LOGNAME instead of
`who am i|awk '{print $1}'`
2) assign points :) in order to indicate how useful an answer was to you.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
09-29-2003 02:27 AM
09-29-2003 02:27 AM
Re: Tracking user keystrokes
'who am i' is always the original user no matter who is the user that you su'ed to.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
09-29-2003 02:34 AM
09-29-2003 02:34 AM
Re: Tracking user keystrokes
loads the environment of the target username.
su
For keystroke collection to work in CDE you must do a login as that user, not root with an su -
An su - in CDE will load the .profile for that user.
The data you have collected from who am i is correct but does not effect the outcome.
SEP
Owner of ISN Corporation
http://isnamerica.com
http://hpuxconsulting.com
Sponsor: http://hpux.ws
Twitter: http://twitter.com/hpuxlinux
Founder http://newdatacloud.com
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
09-29-2003 02:45 AM
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
09-29-2003 04:26 AM
09-29-2003 04:26 AM
Re: Tracking user keystrokes
You almost found it, I added resource
*loginShell: True
Which this way can apply to all term types
And that sorted out the problem.
Thanks.
I would like to thank every person contribued to the problem.
THanks Again,
Ihab