1. Clear the records of successful login to the system, that is, the records displayed by the last command [root @ linuxzgf ~] Echovarlogwtmp this file is garbled by default when it is opened, and the ip address and other information verification processes can be seen in it [root @ linuxzgf ~] # Lastrootpts010.5.10.51ThuSep200: 59stillloggedinrootpts210. 5.10
1. Clear records of successful login to the system, that is, lastCommandRecord
[Root @ linuxzgf ~] Echo>/var/log/wtmp this file is garbled by default when it is opened, and the ip address and other information can be seen in it.
Verification process
[Root @ linuxzgf ~] # Last
Root pts/0 10.5.10.51 Thu Sep 2 00:59 still loggEdIn
Root pts/2 10.5.10.60 Wed Sep 1)
Root pts/2 10.5.10.60 Wed Sep 1)
Root pts/0 10.5.10.61 Wed Sep 1)
Root pts/3 10.5.10.59 Wed Sep 1)
Root pts/2 10.5.10.60 Wed Sep 1)
Root pts/1 10.5.10.191 Wed Sep 1)
.......................
[Root @ linuxzgf ~] # Echo>/var/log/wtmp
[Root @ linuxzgf ~] # Last
Wtmp begins Thu Sep 2 01:04:34 2010
[Root @ linuxzgf ~] #
The user logon information is invisible.
2. Clear the system logon failure record, that is, the record seen by the lastb command.
[Root @ linuxzgf ~] Echo>/var/log/btmp this file is garbled by default when it is opened
Verification Method
Run the following command before executing the command:
[Root @ linuxzgf ~] # Lastb
Root ssh: notty 10.5.10.60 Wed Sep 1)
Tty6 Mon Aug 30)
Tty6 Mon Aug 30)
Tty6 Mon Aug 30)
++ Tty6 Mon Aug 30)
Linuxzgf ssh: notty 10.5.10.60 Mon Aug 30)
Linuxzgf ssh: notty 10.5.10.60 Mon Aug 30)
.........
Then execute
[Root @ linuxzgf ~] # Echo>/var/log/btmp
[Root @ linuxzgf ~] # Lastb
Btmp begins Thu Sep 2 01:01:06 2010
No result is output.
Nice?
3. Clear history execution commands
[Root @ linuxzgf ~] History-c
Or
Clear the file in the user directory.
[Root @ linuxzgf ~]> ~ /. Bash_history