目前用到比較好 sudo nopasswd 的方法
Ubuntu 16.04 適用
改寫一下, 這是講 ubuntu clouding image , 不過一般 Desktop 應該也適用
At the end of /etc/sudoers there is what I thought was just a comment:
#includedir /etc/sudoers.d
You should edit this file using visudo. The following command will let you edit the correct file with visudo.
$ sudo visudo -f /etc/sudoers.d/90-cloudimg-ubuntu
And add a line like:
[username] ALL=(ALL) NOPASSWD:ALL
At the end.
http://askubuntu.com/questions/192050/how-to-run-sudo-command-with-no-password
1 則自動引用通知