取出系统登陆账户和密码 #!/bin/bash USER=`awk -F: '/bash$/{print $1}' /etc/passwd` for i in $USER do awk -F: -v x=$i '$1==x {print $1,$2}' /etc/shadow done