Add a general user to the sudo group isnotinthesudoersfile. Thisincidentwillbereported under Fedora18. the solution is to run the sudo command under a general user and prompt "Forbidden. Thisincidentwillber Fedorasudo"
Adding a general user to the sudo group in Fedora 18 is not in the sudoers file. This incident will be reported.
Solution
If you run the sudo command under a common user, the prompt xxx is not in the sudoers file. This incident will be reported. solution:
$ Whereis sudoers ------- locate the file location, which is/etc/sudoers by default
Sometimes we only need to execute a command with the root permission to su to the root, isn't it inconvenient? In this case, sudo can be used instead. By default, the new user is not in the sudo group. you need to edit the/etc/sudoers file to add the user. the file can only use the mongodo command,
1) first switch to root, su-(note that there is-, which is different from su. when using the "su" command, it only switches to root, however, if the root environment variable is not passed, it is still the currently used environment variable. use the "su-" command to bring the environment variable together, just like root login)
2) then mongodo, vim/etc/sudoers, and mongodo are used in the same way as vi. some people may be unfamiliar with vi, so let's take a brief look at the steps.
Move the cursor to the next row of a row of root ALL = (ALL) ALL, press I, insert mode, and enter
Your_user_name ALL = (ALL) ALL
Then press Esc,
Enter ":"
Enter: wq
Save and exit
In this way, you can add yourself to the sudo group and use the sudo command.
3) by default, the sudo password just entered five minutes later expires. next time, sudo needs to re-enter the password. if it is difficult to enter the password during sudo, replace the entered password with the following content:
Your_user_name ALL = (ALL) NOPASSWD: ALL
Note: When saving and exiting, the system will prompt that/etc/sudoers is a read-only file and cannot be saved and exited. you only need to log on to wq! Force save and exit.