linux设置sudo 用户每次执行脚本时候不输入密码

解决方法:

编辑文件/etc/sudoers, 配置此sudo权限用户(例如:sudoaccount)使用sudo命令时不需要输入密码

sudoaccount@mydesktop:~$ sudo visudo

在文件末尾添加

sudoaccount ALL=(ALL:ALL) NOPASSWD: ALL

:wq保存编辑,退出

猜你喜欢

转载自blog.csdn.net/txl910514/article/details/130254443