參考:
ubuntu sudo不需要輸入密碼的方法
https://blog.csdn.net/weixin_39571864/article/details/83743895
修改sudoers文件權限
pkexec chmod 777 /etc/sudoers
修改sudoers文件內容
%sudo ALL=(ALL:ALL) NOPASSWD: ALL
改回sudoers文件權限
pkexec chmod 440 /etc/sudoers
參考:
ubuntu sudo不需要輸入密碼的方法
https://blog.csdn.net/weixin_39571864/article/details/83743895
pkexec chmod 777 /etc/sudoers
%sudo ALL=(ALL:ALL) NOPASSWD: ALL
pkexec chmod 440 /etc/sudoers