- Community Home
- >
- Servers and Operating Systems
- >
- Operating Systems
- >
- Operating System - HP-UX
- >
- utmp corruption?
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
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
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
тАО02-27-2002 04:55 PM
тАО02-27-2002 04:55 PM
utmp corruption?
Also, when trying to change the password command, it fails with:
$ passwd
Usage: passwd [ -F file ] [ name ]
$
In addition, the perl "getlogin" function (which utilizes the getlogin() in C/Unix) also fails.
The commonality is the /etc/utmp file.
Is there a way to reset the file? Could it be something else?
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО02-27-2002 05:01 PM
тАО02-27-2002 05:01 PM
Re: utmp corruption?
I would just zero that file.. that should fix the problem
> /etc/utmp
There are a lot threads out there in this forum which discusses this... try a search on utmp..
-Shabu
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО02-27-2002 05:07 PM
тАО02-27-2002 05:07 PM
Re: utmp corruption?
Once the utmp file has become corrupted I don't
believe that there is a way to actually fix it.
# rm /etc/utmp
# touch /etc/utmp
When using the passwd command you must specify
a user account e.g.
# passwd fred (or a force change)
# passwd -f fred
HTH
-Michael
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО02-27-2002 05:07 PM
тАО02-27-2002 05:07 PM
Re: utmp corruption?
You will need to drop to single-user mode, null the file and reboot.
# cat /dev/null > /etc/wtmp
If you are running 11.0 make sure you have patch PHNE_24762 installed.
Regards!
...JRF...
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО02-27-2002 05:10 PM
тАО02-27-2002 05:10 PM
Re: utmp corruption?
//quote//
The utmp file can be manipulated with the fwtmp command.
1.check the last modification time of the /etc/utmp file
ls -l /etc/utmp
-rw-r--r-- 1 root root 1620 Jun 28 09:22 /etc/utmp
2.convert the binary /etc/utmp file to ascii :
/usr/sbin/acct/fwtmp /tmp/utmp.ascii
3.edit the /tmp/utmp.ascii file to remove the old entries
Note : the entries are sorted by date, simply use the login time reported
by
who(1) to find the lines to remove.
4.convert the file back to binary format :
/usr/sbin/acct/fwtmp -ic /tmp/utmp.binary
5.verify that all unwanted entries have been removed from the new file :
who /tmp/utmp.binary
6.verify that the /etc/utmp file has not been modified since the beginning of
this procedure :
ls -l /etc/utmp
-rw-r--r-- 1 root root 1620 Jun 28 09:22 /etc/utmp
If the file has been updated do all the steps again.
7.replace the existing /etc/utmp file with the new one :
mv /tmp/utmp.binary /etc/utmp
8.verify that the file still has the same ownership and permissions :
ls -l /etc/utmp
-rw-r--r-- 1 root root 1600 Jun 28 09:30 /etc/utmp
The who command will now report the correct information.
//quote//
Cheers
Animesh
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО02-27-2002 05:11 PM
тАО02-27-2002 05:11 PM