0

I have changed the default group of a user using chgrp command. After that I'm getting the error message" 'Username' is not in the sudoers file. This incident will be reported" for basic commands like sudo yum install update.

Any idea. Much appreciated.

1 Answers1

0

We would need to see the sudoers file, but it is possible that this user was part of a group, and group had sudoers rights. Now it's no longer part of correct group, so doesn't get sudo permissions.

Example from sudoers file:

root    ALL=(ALL:ALL) ALL
%admin ALL=(ALL) ALL

Now, if your user myuser was part of admin group, and now it's changed to someother group, it won't match any of the two lines.. it is not root and it is not in admin.

If you have another root/admin user or someone else has it, need to use it to add you either to correct group or your username explicitly to sudoers file.

Please check that first!

LuxZg
  • 547