1

I have two colleagues on a Red Hat Enterprise Linux Server (release 6.4). Both of them can execute the sudo commands. Curiously, only one of the colleagues is in the /etc/sudoers file - let's call him colleague A. There is no extra "sudo" group and both of the users are only in the default groups named after their username. How is it possible that colleague B can execute sudo, although he is not in /etc/sudoers?

  • It is very hard to comment on something that is very specific, without having seen the configuration, but taking your word as a gospel, two things come to mind: (1) the Colleague B is a member of a group which has sudo rights via a convoluted series of sudoers directives (2) Colleague B's UID matches to someone with sudo privileges. It is not an uncommon mistake to create two users with the same UID number, especially if you don't have a centralized user management control and multiple sysadmins for the same server. – MelBurslan Feb 2 '16 at 16:00
  • See if there are #include or #includedir directives in /etc/sudoers file, and should there be those, see files/directories they point to. – Sami Laine Feb 2 '16 at 16:07
  • @Sami Laine: thanks, that was the solution. There is a line "#includedir /etc/sudoers.d" in etc/sudoers. The directory /etc/sudoers.d/ contains a file with an entry for colleague B. If you want to write your comment as an answer, I'll mark it as the accepted answer. – simon Feb 2 '16 at 16:29
0

check in sudoers.d dir there will be file named the user which can run sudo will be in /etc/sudoers.d/

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.