观天

检查Linux空口令账户及其统未锁定的账号

Linux空口令账户存在极其不安全,检查命令如下:

检查空口令账户

cat /etc/shadow | /bin/awk -F: '($2 == "" ) { print "user " $1 " does not have a password "}'

------------------------------------------------------------------------------------------------------------------------------------
执行如下命令查看系统未锁定的账号:
cat /etc/shadow|sed '/^\s*#/d'|awk -F: '($2!~/^*/) && ($2!~/^!!/) {print $1}'
赞(3)
未经允许不得转载:观天 » 检查Linux空口令账户及其统未锁定的账号