项目场景 使用sudo的时候 报错apiuser is not in the sudoers file. This incident will be reported.:

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

项目场景 使用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下面添加

评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包

打赏作者

matianlongg

你的鼓励将是我创作的最大动力

¥1 ¥2 ¥4 ¥6 ¥10 ¥20
扫码支付:¥1
获取中
扫码支付

您的余额不足,请更换扫码支付或充值

打赏作者

实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

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

余额充值