LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - General (https://www.linuxquestions.org/questions/linux-general-1/)
-   -   How to erase the login history (RedHat)? (https://www.linuxquestions.org/questions/linux-general-1/how-to-erase-the-login-history-redhat-29220/)

yuzuohong 08-31-2002 04:29 AM

How to erase the login history (RedHat)?
 
Hi all,

I know command "last" can show the login history. But I'm very curious that
if I can erase that information?

fish

acid_kewpie 08-31-2002 04:34 AM

well if you actaully read the man page for last:
Code:

NOTES
      The files wtmp and btmp might not be found. The system only logs  information  in
      these files if they are present. This is a local configuration issue. If you want
      the files to be used, they can be created with a  simple  touch(1)  command  (for
      example, touch /var/log/wtmp).

so naturally, remove those files and it'll be unavailable. PLEASE try reading the docs before asking questions.

markus1982 08-31-2002 04:35 AM

The files you are looking for are at least /var/log/wtmp but there might be a couple of other files logging login stuff like specified in /etc/syslog.conf

mikek147 08-31-2002 05:10 AM

When you're dealing with /var/log/wtmp, btmp and utmp, do not erase them. The file will not be recreated. Instead do:

cat /dev/null >/var/log/wtmp

On some systems, you can just do:

>/var/log/wtmp

This will remove the contents of the file while leaving it intact.

-mk


All times are GMT -5. The time now is 05:43 PM.