0

I just joined an ubuntu 18.04 server to my windows domain. I want to add domain admins as sudoers on the ubuntu server. I created a file /etc/sudoers.d/domain_admins. I added %DOMAIN.COM\Domain\ Admins ALL=(ALL) ALL. When I tested a sudo command, with my domain admin, I got the message that it wasn't in the sudoers file. I checked the permissions on the file and noticed it was given 47. I did a chmod of 0440 but that did not seem to work as it's still set as 47. Any help would be appreciated.

4
  • I think that the appropriate syntax is %Domain\ [email protected] but don't quote me... (I'm assuming the AD group name is Domain Admins) Mar 24, 2020 at 15:24
  • I found this, though... Because a number of AD groups have spaces in the names, you’ll need to escape the spaces using backslashes. For example. adding the following entry to /etc/sudoers would allow you to give full sudo permissions to an AD group named Group Name With Spaces: 1 %DOMAIN\\Group\ Name\ With\ Spaces ALL=(ALL) ALL In both cases, replace DOMAIN with your AD domain’s name.
    – TL_Arwen
    Mar 24, 2020 at 15:55
  • Sure - that may work as well, but note that you will need to escape both spaces and backslashes i.e. %DOMAIN.COM\\Domain\ Admins ALL=(ALL) ALL Mar 24, 2020 at 15:57
  • For some reason in the post, is not showing two backslashes, but they are there. lol
    – TL_Arwen
    Mar 24, 2020 at 16:00

1 Answer 1

0

Got it figured out Just put this 'Domain\ Admins ALL=(ALL) ALL' without the ' '

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .