- Community Home
- >
- Servers and Operating Systems
- >
- Operating Systems
- >
- Operating System - HP-UX
- >
- Re: using last to show user login/logout
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
07-10-2003 10:47 AM
07-10-2003 10:47 AM
Solved! Go to Solution.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
07-10-2003 10:51 AM
07-10-2003 10:51 AM
Re: using last to show user login/logout
Have you tried "last console"?
Pete
Pete
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
07-10-2003 10:56 AM
07-10-2003 10:56 AM
Re: using last to show user login/logout
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
07-10-2003 10:58 AM
07-10-2003 10:58 AM
Re: using last to show user login/logout
These files, which hold user and accounting information for such
commands as last, who, write, and login
regards
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
07-10-2003 11:00 AM
07-10-2003 11:00 AM
Re: using last to show user login/logout
gwild ttyq0 Mon Jul 7 14:22 - 14:58 (00:36)
root console Wed Jul 2 11:33 - 11:40 (00:06)
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
07-10-2003 11:01 AM
07-10-2003 11:01 AM
Re: using last to show user login/logout
The os that I am running is 10.20
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
07-10-2003 11:06 AM
07-10-2003 11:06 AM
Re: using last to show user login/logout
I'm also on 11.x servers. There seems to be some difference in 10.20 - try "last console" just out of curiosity and see what it says.
Pete
Pete
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
07-10-2003 11:13 AM
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
07-10-2003 11:21 AM
07-10-2003 11:21 AM
Re: using last to show user login/logout
If the user is cshell, then create a .logout - insert comands you want to run - like:
echo `who am i ` " logout on " `date` >>.logout_history
If not cshell, then you could fake it like this:
1. In your .profile file, add the line :
trap ' .$HOME/.sh_logout; exit 0
(Some systems may need $LOGDIR instead of $HOME.)
2. Make a file in your home directory named .sh_logout. Put
in the commands you want to be run when you log out. For example:
clear
echo `who am i ` " logout on " `date` >>.logout_history
The trap will read the .sh_logout file when the shell exits.
Something like the above may work, maybe add a ps /who -u to see what the tty is...
Rgds...Geoff
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
07-10-2003 11:29 AM
07-10-2003 11:29 AM
Re: using last to show user login/logout
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
07-16-2003 11:30 AM
07-16-2003 11:30 AM
Re: using last to show user login/logout
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
07-16-2003 01:10 PM
07-16-2003 01:10 PM
Re: using last to show user login/logout
Use last: last
you will get info for the user
also you can grep wanted data.
Caesar