shell脚本中sudo 自动输入密码
2013-01-02 13:57
393 查看
http://blog.chinaunix.net/uid-23027556-id-96660.html
在shell脚本中需要用root用的来执行指令:
sudo 自动输入密码
echo "password" | sudo -S netstat -tlnp
-S
The -S (stdin) option causes sudo to read the password from the standard input instead of the terminal device.
在shell脚本中需要用root用的来执行指令:
sudo 自动输入密码
echo "password" | sudo -S netstat -tlnp
-S
The -S (stdin) option causes sudo to read the password from the standard input instead of the terminal device.
相关文章推荐
- Shell脚本实现自动输入密码登录服务器
- Shell脚本实现自动输入密码登录服务器
- shell脚本中针对sudo等密码输入的问题解决方案
- shell脚本中自动输入用户名和密码
- shell脚本中自动输入密码
- bash脚本,自动输入sudo的密码
- shell脚本中自动输入密码
- UBUNTU 12.04 64位脚本 自动输入密码 | 脚本执行 sudo 自动输入password
- Shell脚本中调用expect,实现自动输入密码的功能
- 以一个例子来讲ubuntu12.04下脚本文件内执行sudo 命令自动输入密码
- Linux-----Shell脚本交互实现自动输入密码
- Shell脚本交互之:自动输入密码【转】
- shell脚本通过expect脚本实现自动输入密码(使用expect)
- Shell脚本交互之:自动输入密码
- shell脚本中自动输入密码
- ubuntu脚本自动输入sudo密码
- sudo 自动输入密码的脚本 alias别名
- Shell脚本交互之:自动输入密码
- Shell脚本实现自动输入密码登录服务器
- 在 Linux 命令行脚本中执行 sudo 时自动输入密码