项目场景 使用sudo的时候 报错apiuser is not in the sudoers file. This incident will be reported.:
提示:这里简述项目相关背景:
例如:项目场景:示例:通过蓝牙芯片(HC-05)与手机 APP 通信,每隔 5s 传输一批传感器数据(不是很大)
问题描述:
使用sudo的时候 报错apiuser is not in the sudoers file. This incident will be reported.
原因分析:
没权限
# 解决方案:
1.切换root
su root
2.添加sudoers文件的写权限
#需要到根目录 cd ~
chmod u+w ../etc/sudoers
3.编辑
vim ../etc/sudoers

在root下面添加
在Linux环境中遇到使用sudo时出现'apiuserisnotinthesudoersfile.Thisincidentwillbereported.'的错误。该问题是由于当前用户不在sudoers文件中,没有sudo权限。解决方法包括切换到root用户并修改sudoers文件,添加所需用户的sudo权限。具体步骤为:首先用'suroot'切换到root,然后使用'chmodu+w../etc/sudoers'给予sudoers文件写权限,接着用'vim../etc/sudoers'编辑文件,在适当位置添加用户。

4691

被折叠的 条评论
为什么被折叠?



