sudo -i [sudo] password for wmj: wmj is not in the sudoers file. This incident will be reported. [wmj@registry ~]$
时间: 2024-01-04 18:20:10 浏览: 95
根据提供的引用内容,当执行sudo命令时,如果当前用户不在sudoers文件中,则会出现"work is not in the sudoers file. This incident will be reported."的错误提示。这意味着当前用户没有权限执行sudo命令。
为了解决这个问题,需要将当前用户添加到sudoers文件中。可以通过以下步骤来实现:
1. 以root用户身份登录系统。
2. 执行以下命令打开sudoers文件:
```shell
visudo
```
3. 在文件中找到以下行:
```shell
## Allow root to run any commands anywhere
root ALL=(ALL) ALL
```
4. 在该行下面添加以下内容,将"wmj"替换为当前用户的用户名:
```shell
wmj ALL=(ALL) ALL
```
5. 保存并关闭文件。
现在,当前用户应该已经被添加到sudoers文件中,可以尝试再次执行sudo命令。
相关问题
dong is not in the sudoers file.This incident will be reported .
"dong is not in the sudoers file. This incident will be reported" 是一个系统提示错误信息,表明用户dong没有sudo权限,因此无法执行sudo命令。sudo是用于以超级用户(root)的权限执行命令的工具。只有在sudoers文件中列出的用户才能使用sudo。要解决这个问题,需要将用户dong添加到sudoers文件中。
xuyang is not in the sudoers file. This incident will be reported.
The statement "xuyang is not in the sudoers file" appears to be related to a Linux or Unix system context. In these operating systems, the `sudoers` file is a special configuration file that contains user accounts with elevated privileges, allowing them to execute commands as the superuser (root). When an attempt is made by a non-root user named "xuyang" to use the `sudo` command, and they are not listed in the `sudoers` file, the system responds with a message indicating that their access is denied due to insufficient permissions.
To provide more information or demonstrate, I'd need to clarify if we're discussing a technical issue or a hypothetical scenario. Here's what a typical error message might look like when encountered:
```plaintext
[xuyang@computer ~]$ sudo some_command
[sudo] password for xuyang:
xuyang is not in the sudoers file. This incident will be reported.
```
In a real-world scenario, to resolve this issue, xuyang would either need to add themselves to the `sudoers` file with the proper permission settings or run the command without `sudo` if they don't require administrative privileges.
阅读全文
相关推荐















