标签:su expect
yum -y install expect
login as normal user:
vi su.exp
#!/usr/bin/expect
set timeout 30
spawn su -
expect "Password:"
send "root-pass\r"
interact
chmod +x su.exp
./su.exp
本文出自 “Ilovecat(个人笔记)” 博客,请务必保留此出处http://hj192837.blog.51cto.com/655995/1595972
标签:su expect
原文地址:http://hj192837.blog.51cto.com/655995/1595972