“ubuntu教程”ubuntu免密码输入关机脚本
来源: 电脑维修教程 阅读:次 发表时间:
http://vflong.blog.51cto.com/8622347/1395078 备注:号令很简单,重点在于不需要输入暗码。可以连系自界说桌面图标,一键执行剧本。 #!/bin/bash password= echo $passwo
http://vflong.blog.51cto.com/8622347/1395078
备注:号令很简单,重点在于不需要输入暗码。可以连系自界说桌面图标,一键执行剧本。
#!/bin/bash
password=
echo $password | sudo -s shutdown -h $1
man sudo
-s the -s (stdin) option causes sudo to read the password from
the standard input instead of the terminal device. the pass‐
word must be followed by a newline character.
以上是:解决“ubuntu教程”ubuntu免密码输入关机脚本问题的详细资料教程