- Community Home
- >
- Servers and Operating Systems
- >
- Operating Systems
- >
- Operating System - HP-UX
- >
- Re: decode contents of wtmp file
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
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
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
03-06-2012 01:58 AM
03-06-2012 01:58 AM
Re: decode contents of wtmp file
>Would it be possible to change your script to give that kind of output?
Of course. The script documents what it does. If you want more than 20 records, just change the "20".
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
03-08-2012 09:13 AM
03-08-2012 09:13 AM
Re: decode contents of wtmp file
With this being my first attempt to answer a question since the big change (old forums style to new), I hope this makes some sense, is readable, etc.
In the favorite sys admin scripts area:
A pretty smart guy named Kevin Tuitt put together a script to gather "last" data. That's if you have a good wtmp, etc. file(s). I think his file was called "audit". The above link, assuming it works, will get you to the spot. I can't see how to download the file in this forum but I'm sure there is a way.
Anyway, I use something like it which does basically:
TEMPDIR="/tmp" ### A nice place to put files.
lastb | sort > $TEMPDIR/lastbfile &
lastb -R | sort > $TEMPDIR/lastbrfile &
last | sort > $TEMPDIR/lastfile &
last -R | sort > $TEMPDIR/lastrfile
You can get login ID's, computere names or IP's (depends on your DNS settings I suppose), etc. Perhaps this can help you once your file(s) in question get fixed?
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
03-08-2012 11:33 PM
03-08-2012 11:33 PM
Re: decode contents of wtmp file
Hi!
Since the original wtmps file is corrupted can I use the command:
cat /dev/null > /var/adm/wtmps
to clear the contenst of wtmps and start from fresh?
regards
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
03-09-2012 12:05 AM
03-09-2012 12:05 AM
Re: decode contents of wtmp file
>can I use the command to clear the contents of wtmps and start from fresh?
Sure but your current file has useful info, if you want to spend time getting at it. I.e. make a copy first.
Also, you can just clear it with: > /var/adm/wtmps
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
03-09-2012 12:46 AM
03-09-2012 12:46 AM
Re: decode contents of wtmp file
Yes it does, but only from february this year and I have already made a copy of it.
regards
- « Previous
-
- 1
- 2
- Next »