shell 脚本检测密码,5次错误则停止
2017-01-06 10:23
423 查看
检测密码,5次错误则停止脚本,退出
#!/bin/bash
num=5
PASSWD=123456
sum=0
while true
do
read -p "please input your passwd: " passwd
sum=$((sum+1))
if [ $passwd == $PASSWD ];then
echo "OK!"
exit
elif [ $sum -lt 5 ] ;then
countine
else
exit
fi
done
#!/bin/bash
num=5
PASSWD=123456
sum=0
while true
do
read -p "please input your passwd: " passwd
sum=$((sum+1))
if [ $passwd == $PASSWD ];then
echo "OK!"
exit
elif [ $sum -lt 5 ] ;then
countine
else
exit
fi
done
相关文章推荐
- shell脚本实现被远程时5次输错密码而直接禁止访问
- linux下如何自动检测并重新启动一个死掉的进程,然后再把它杀死:)(shell脚本实现)
- 检测域名有效期的 Shell 脚本
- 通过shell脚本实现批量更改密码
- shell脚本屏蔽错误输出信息
- shell脚本实现无密码交互的SSH自动登陆
- 自动检测tomcat服务的shell脚本
- shell随机生成十位密码脚本
- 通过SSH协议访问远程Shell脚本-免密码登陆与返回数据丢失解决
- 给shell脚本加密码的shell脚本
- shell添加用户时设置密码脚本
- 编写启动程序和停止程序的shell脚本
- 自动检测tomcat服务的shell脚本
- 从Shell脚本内部将所有标准输出及标准错误显示在屏幕并同时写入文件的方法
- shell脚本专家指南笔记----shell错误调试
- 检测mysql密码是否输入正确的脚本
- 在shell脚本中用expect 实现 scp 文件的时候不手动输入密码
- “Windows 无法分析或处理 pass [specialize] 的无人参与应答文件。应答文件中指定的设置无法应用。处理组件设置 [Microsoft-Windows-Shell-Setup] 时检测到错误。”
- [shell]对apache进程进行检测的脚本
- 批量修改root密码#shell脚本