I am facing an issue with sudo for AD group users. I have added following lines to /etc/sudoers file using visudo

%domain\ admins ALL=(ALL:ALL) ALL ----- (This Works) %domain\ Users ALL=(ALL:ALL) ALL ----- (This Works) %domain\UbuntuAdmins ALL=(ALL:ALL) ALL ----- (This does NOT Work)

"Domain Admins" and "Domain Users" Groups work fine and users are able to run sudo command but if I comment the first 2 lines then the users in "UbuntuAdmins" AD group are not able to run sudo command and give an error, "You are not allowed to Run Sudo"

I have give space before "Admins" and "Users" because there is a space in Group name. "UbduntuAdmins" group does not have any space in its name, thereore no space before its name, although I have tried by adding the space too but it does not help.

Kinldy help me in fixing this issue. I am using Ubuntu 20.04 and it is Domain Joined.

1 Answer 1


Ok I got the answer

For any AD group without spaces in the name following works

%ActiveDirectoryUserGroup ALL=(ALL:ALL) ALL

You must log in to answer this question.

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