Operating System - HP-UX
1832690 Members
2701 Online
110043 Solutions
New Discussion

Re: how to know utmp/utmpx file are corrupted..

 
sukumar maddela
Occasional Advisor

how to know utmp/utmpx file are corrupted..

Hi all,

Logname command is not working, i would like to know my utmp/utmpx files are corrupted or not. can any one give some suggestion.
5 REPLIES 5
Devender Khatana
Honored Contributor

Re: how to know utmp/utmpx file are corrupted..

Hi,

Does last and lastb command also do not work? If yes then this should be the only case.

HTH,
Devender
Impossible itself mentions "I m possible"
Cem Tugrul
Esteemed Contributor

Re: how to know utmp/utmpx file are corrupted..

Sukumar,
Are you able to run "last" command?
Our greatest duty in this life is to help others. And please, if you can't
Robert-Jan Goossens
Honored Contributor

Re: how to know utmp/utmpx file are corrupted..

Hi,

# cat /etc/utmp | /usr/sbin/acct/fwtmp

You can not edit these files, but with above command you can read the /etc/utmp file.

etc/utmp contains a record of all users currently logged onto the system. It is recommended not to trim the utmp file. Note: When using SAM to trim log files, /etc/utmp will not be a choice.

Regards,
Robert-Jan
sukumar maddela
Occasional Advisor

Re: how to know utmp/utmpx file are corrupted..

last and lastb both are working properly
James R. Ferguson
Acclaimed Contributor

Re: how to know utmp/utmpx file are corrupted..

Hi:

IF you are asking about '/etc/utmp' then, see if 'who' returns your expected results.

Both 'logname' and 'who' read '/etc/utmp'. Make sure that the permissions on '/usr/bin/logname' are such that it is executable by everyone.

Regards!

...JRF...