Tags: adm, files, following, lastlog, lastlogthey, operating, readable, software, solaris, system, utmp, utmpx, var, wtmp, wtmpx
var/adm/utmp, /var/adm/wtmp and /var /adm/lastlog
Hi all,Can anyone tell me how to read the following files :/var/adm/utmp , utmpx/var/adm/wtmp ,wtmpx/var /adm/lastlogThey are not readable by the "more" or "cat" commands.Is there any tool to read such a files.
Leave a comment...
- 3 Comments
- Hi ,we can read these files through this command fwtmp.(Note: more information man fwtmp)example:# cat /var/adm/utmp | /usr/lib/acct/fwtmprevert back.Thanks.regards,senthilkumarSUN - DTS #1; Thu, 05 Jul 2007 21:10:00 GMT
Thank you for your answer.
when I tried to clean up these files (lastlog, utmp, utmpx,wtmp, wtmpx) (echo "" /var/adm/utmpx) , I can't telnet or ftp the machine until I replaced the file utmpx with the original file.And I'm getting this message at the telnet login:
No utmpx entry. You must exec "login" from the lowest level "shell".
Can you explain me this?#2; Thu, 05 Jul 2007 21:10:00 GMT
No utmpx entry
During login file system full errors are seen and login fails with the message No utmpx
This is caused by a full file system so that the system has no space to write its utmpx (login info) entry.
To get around this condition the system must be booted into single user mode. Then clear (do not delete) the files: /var/adm/utmp and /var/adm/utmpx. This can be done by typing:
#cat /dev/null > /var/adm/utmp
#cat /dev/null > /var/adm/utmpx
These commands zero out the files but keep it with the correct permissions.
In some cases after clearing these files the /var filesystem may still be full. In this case type:
du -askd /var |sort -nr |more
This will give you a listing of the files from largest to smallest in the /var filesystem. To create space you can zero the files: /var/cron/log, /var/spool/lp/logs, and /var/adm/messages. You can also check /.wastebasket for large files to delete.
SUN - DTS#3; Thu, 05 Jul 2007 21:10:00 GMT