作者:YOUDI(Kevin.U) #!/usr/bin/expectspawn su 你的用户名expect "Password:"send "你的用户密码/n"interactexpect eofexit