- Community Home
- >
- Servers and Operating Systems
- >
- Operating Systems
- >
- Operating System - HP-UX
- >
- corrupted btmp wtmp
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
Discussions
Forums
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
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
тАО11-19-2003 06:20 PM
тАО11-19-2003 06:20 PM
i have corrupted btmp,wtmp files on HP-ux 11i A class machine. how do i rectify this problem?
The error that i get is
#last
pid exceeds MAXPID: wtmp file corrupted
please help me
aparna
Solved! Go to Solution.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО11-19-2003 06:23 PM
тАО11-19-2003 06:23 PM
Re: corrupted btmp wtmp
> btmp
> wtmp
It should just start writing the new entrys in the clean file.
Hope this helps.
-Brian
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО11-19-2003 06:24 PM
тАО11-19-2003 06:24 PM
Re: corrupted btmp wtmp
OR
just
>wtmp
>btmp
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО11-19-2003 06:37 PM
тАО11-19-2003 06:37 PM
SolutionYou can attempt to fix this by using /usr/sbin/acct/fwtmp.
The files can be viewed with:
# cat /var/adm/wtmp | /usr/sbin/acct/fwtmp
# cat /etc/utmp | /usr/sbin/acct/fwtmp
If you want to attempt to fix the files, use the following steps to manually
correct /etc/utmp:
1. Extract the ASCII version of the utmp file:
# /usr/sbin/acct/fwtmp < /etc/utmp >/tmp/utmpa
2. Edit the ASCII verion of vi and remove the incorrect entry or entries:
# vi /tmp/utmpa
3. Replace /etc/utmp with the corrected version:
# /usr/sbin/acct/fwtmp -ic < /tmp/utmpa > /etc/utmp
The same procedure will work with /var/adm/wtmp, specifying a temporary copy
in /tmp/wtmpa.
Regards,
Robert-Jan.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО11-19-2003 06:39 PM
тАО11-19-2003 06:39 PM
Re: corrupted btmp wtmp
Clean the files >btmp && >wtmp
also check /etc/utmp ( try logging in with telnet, or ssh )
Do you have accountnames availible on the server, that exceed 8 characters?
The btmp wtmp and utmp files have only so many characters reserved for names etc.
Gideon
Gideon
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО11-19-2003 06:53 PM
тАО11-19-2003 06:53 PM
Re: corrupted btmp wtmp
I think the proper way of setting these files to zero is by catting dev/null to them, e.g.:
# cat /dev/null >/var/adm/btmp
An alternative is to use SAM for triming these files: SAM->Routine Tasks->System Log Files; I think SAM does it with the cat /dev/null.
regards,
John K.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО11-19-2003 07:03 PM
тАО11-19-2003 07:03 PM
Re: corrupted btmp wtmp
Thank you all for the quick replies.
I copied the old contents and cleaned up these files.
I will try to fix the backup file later. thx Robert.
hi Vrijhoeven,
no we do not have login names exceeding 8 characters.
cheers
aparna