壳子"/>
【嵌入式】Linux用户认证壳子
【嵌入式】Linux 用户认证壳子
#/bin/shtrycount=3
while [ 1 ];
doecho "Please enter $USER key:"read keyecho "Your key is $key!"mshadow=`cat /etc/shadow | grep "^$USER" | awk -F ':' '{print $2}'`if [ "x$mshadow" == "x`echo $key | md5sum | awk '{print $1}'`" ];thenecho "login success!"/bin/shelseecho "password err!"let 'trycount--'if [ $trycount -le 0 ];thenexit -1;fiecho "You can try $trycount times for passwod!"fi
done
更多推荐
【嵌入式】Linux用户认证壳子
发布评论