raspberry pi 远程登陆修改/切换用户权限失败解决方法 【搬运】(deliver)

为了在RaspberryPi上无密码运行Simulink模型,你需要启用无密码sudo。步骤包括登录命令行界面,使用nano编辑sudoers文件,添加特定用户(如pi)的NOPASSWD条目,保存更改并重启RaspberryPi以应用变更。
摘要由CSDN通过智能技术生成

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:

  1. 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.

  1. In the command-line interface, type this command:

sudo nano /etc/sudoers

  1. 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

  1. To save your changes, press Ctrl+x on your keyboard.

  1. 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!

  1. 进入这么一个文件夹

  1. 修改@includedir /etc/sudoers.d 中的 '@'为'#'

  1. 添加远程登陆用户名,想要sudo时输入密码的话就不要'NOPASSWORD:'

  1. OVER

评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值