Linux sets the sudo user without entering a password every time the script is executed

Solution:

Edit the file /etc/sudoers, and configure this sudo permission user (for example: sudoaccount) to use the sudo command without entering a password

sudoaccount@mydesktop:~$ sudo visudo

Add at the end of the file

sudoaccount ALL=(ALL:ALL) NOPASSWD: ALL

:wq save editing, exit

Guess you like

Origin blog.csdn.net/txl910514/article/details/130254443