Environment: VirtualBox4.1 + RedHat Linux 6
Question: When using the sudo command prompt "xxx is isn't in" Sudoers file. This incident'll bereported. where xxx is your username, which means your username does not have permission to use sudo command.
Resolve: Just modify the/etc/sudoers file on the line.
1. Enter Super User mode. That is, the input "su-", the system will allow you to enter the Super User password, enter the password after entering the Super User mode. (Note: You can also login directly with root);
2. Add Write permission to file, because sudoers this file is only allowed to read, not allowed to write. Enter the command "chmod u+w/etc/sudoers";
3. Edit the/etc/sudoers file. Enter the command "Vi/etc/sudoers", enter "I" into edit mode, and find this line: "Root all= (All)", add "xxxall= (All) all" (Here xxx is your username), and then press ESC to enter: Wq ", save exit;
4. Revoke the Write permission of the file and restore the read and write status of the file. Enter the command "chmod u-w/etc/sudoers".