Enable Passwordless Sudo on Raspberry Pi Hardware
To run Simulink® models on Raspberry Pi™, you must enable passwordless sudo. Enabling passwordless sudo allows you to run Simulink models on Raspberry Pi without providing a password.
To enable passwordless sudo:
Log in to the Raspberry Pi command-line interface. The default user name and password of the Raspberry Pi hardware are pi and raspberry, respectively.
In the command-line interface, type this command:
sudo nano /etc/sudoers
Enable passwordless sudo access by adding this line:
<user name> ALL=(ALL:ALL) NOPASSWD:ALL
For example, to provide passwordless sudo access to a user pi, type:
pi ALL=(ALL:ALL) NOPASSWD:ALL
To save your changes, press Ctrl+x on your keyboard.
For these changes to take effect, restart Raspberry Pi by typing this command:
sudo reboot
source from:Enable Passwordless Sudo on Raspberry Pi Hardware - MATLAB & Simulink (mathworks.com)
Thanks original author!
进入这么一个文件夹
修改@includedir /etc/sudoers.d 中的 '@'为'#'
添加远程登陆用户名,想要sudo时输入密码的话就不要'NOPASSWORD:'
OVER