Symptom User is not in the sudoers file when you run the sudo -i or su root command. This will be reported “. This is because the current login account is not in the sudo permission. The sudo command allows you to execute commands as root to perform tasks that our account cannot. Not all users will be able to execute sudo, as those with permissions are in /etc/sudoers.
1. When you run the sudo -i or su root command, the message “User is not in the sudoers file” is displayed. This will be reported “.
2. You are advised to change the /etc/sudoers file
However, there is no root permission
3. Switch to the root user first
4. Then edit vim /etc/sudoers
Add user toutou to /etc/sudoers
5. Restart and run sudo -i again
Then wq! Save it, save it and reboot it. Done.
About the author: Focus on basic platform project development. If you have any questions or suggestions, please feel free to comment! Copyright notice: The copyright of this article belongs to the author and the blog garden, welcome to reprint, but without the consent of the author must retain this statement, and give the original text link in a prominent place on the page of the article. For the record: all comments and messages will be answered as soon as possible. You are welcome to correct your mistakes and make progress together. Or direct private message I support the blogger: if you think the article is helpful to you, you can click on the lower right corner of the article [recommendation]. Your encouragement is the author to adhere to the original and continuous writing of the biggest power! \