HPE GreenLake Administration
- Community Home
- >
- Servers and Operating Systems
- >
- Operating Systems
- >
- Operating System - HP-UX
- >
- last login cmd
Operating System - HP-UX
1829576
Members
2799
Online
109992
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
Forums
Discussions
Discussions
Discussions
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
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
10-05-2004 11:43 AM
10-05-2004 11:43 AM
HI, ux11.11 v1.
I have noticed when I issued the cmd `last -5 -R $LOGNAME` the user was listed as still logged in on pts/tL; but If I do `ps -ef|grep pts/tL`, then that tty is now listed as being used another user. Can some one explain why this is happening. Why is the last command still showing the original user as logged in on that particular device. This is still the situation if I kill the process for that device with the original user.?
Thanks in advance for explanations
Maria
I have noticed when I issued the cmd `last -5 -R $LOGNAME` the user was listed as still logged in on pts/tL; but If I do `ps -ef|grep pts/tL`, then that tty is now listed as being used another user. Can some one explain why this is happening. Why is the last command still showing the original user as logged in on that particular device. This is still the situation if I kill the process for that device with the original user.?
Thanks in advance for explanations
Maria
Solved! Go to Solution.
3 REPLIES 3
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
10-05-2004 11:55 AM
10-05-2004 11:55 AM
SolutionI think you got to live with it Maria. :-)
It happens when the /var/adm/wtmp file is not properly updated. It happens for various reasons.
But,if you would still like to make those "cosmetic" changes to the last output, then you can manually edit and modify the entries
wtmp is a binary file. So you need to use /usr/sbin/acct/fwtmp to make changes.
1) use fwtmp command to create the ascii version of wtmp file.
2) Edit the ascii file and make changes
3) Convert the ascii file back to the wtmp format using fwtmp command.
- Sundar
Learn What to do ,How to do and more importantly When to do ?
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
10-05-2004 12:12 PM
10-05-2004 12:12 PM
Re: last login cmd
last depends on a sane list of actions in wtmp. The problem is that users don't always do nice things with their computers (well, sometimes their non-Unix computers decide to reboot) leaving orphaned connections). There are also some programming errors that can leave wtmp with missing stop records. last does not look at ps, it looks at wtmp and matches login/logout records.
Bill Hassell, sysadmin
Bill Hassell, sysadmin
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
10-05-2004 01:16 PM
10-05-2004 01:16 PM
Re: last login cmd
Thanks Sundar and Bill.
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.
Company
Events and news
Customer resources
© Copyright 2025 Hewlett Packard Enterprise Development LP