I'm currently facing a problem when I use my sudo permission. I understand somebody faced this problem before, e.g this question, and followed some steps to resolve but unsuccessful. FYI, before I can sudo seamlessly.

Weird thing is that I can do run update and install in UI where Ubuntu requires my admin permission. I have asked other user in this machine who are in sudo group, we are sharing the same situation.

Here steps I followed

  1. Goto recover mode, and adding my account to sudo group, as described in link
  2. Check list of user in sudo group by command grep -Po '^sudo.+:\K.*$' /etc/group , my account name is there
  3. Check whether correct permission on sudoers file by ls -al /etc/sudoers, I found -r--r----- seem correct too
  4. Run visudo to view config, here is my file's content

I would like to seek for your help, thanks in advance

  • 3
    Please edit your question with a description of the problem. You say that you can't run sudo, but we are left to guess what that means. Show us a command you are attempting along with the output. Also tell us all of the things that you changed when trying to solve this on your own. It's likely you need to undo some or all of those actions. Please do not upload pictures of text on your screen. Instead, copy/paste and use code fences. This ensures we can read and work with the info you provide.
    – Nmath
    May 17, 2022 at 7:55
  • thanks, just removed
    – Bryan
    May 17, 2022 at 8:00
  • 2
    sudo ALL=(ALL:ALL) ALL defines policy for a user named sudo; to set policy for members of the sudo group you need %sudo ALL=(ALL:ALL) ALL May 17, 2022 at 12:14
  • thanks @steeldriver, your answer fixed my problem
    – Bryan
    Jun 27, 2022 at 1:04

1 Answer 1


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 %domain\ Users ALL=(ALL:ALL) ALL %domain\UbuntuAdmins ALL=(ALL:ALL) ALL

"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 beofre "Admins" and "Users" because there is a space in Group name. "UbduntuAdmins" group does not have any space in it name thereore no space beofer 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.

  • Hi and welcome to Ask Ubuntu! The convention here is to only put answers in the answers section (so they can be voted on, mainly). Your comment is a comment though, I'm afraid. Sorry - it's all a bit weird, I admit. Jun 24, 2022 at 17:55

You must log in to answer this question.

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