Find centralized, trusted content and collaborate around the technologies you use most.
Teams
Q&A for work
Connect and share knowledge within a single location that is structured and easy to search.
如何将 sudo 与期望脚本一起使用?就像我想做的
spawn sudo apt-get install wine expect "*?assword: " send "$passwd\r" interact
但它不发送密码。我该如何解决这个问题?
您可以将用户设置为 sudoer,它可以跳过密码验证。