I have configured sudo access in previous versions of Ubuntu for AD groups. In 22.04 I get error that user in AD group is not in sudoers file. I inserted the line %gg_adm_server ALL=(ALL) ALL in sudoers file as usual and it doesn't work. Has the configuration changed in 22.04? I have joined the domain using REALMD and can log in as member of AD group, but not sudo.
2 Answers
Turns out the answer was to format the group in sudo as %groupname@DOMAIN.COM. wouldn't work with lower case domain name, had to be upper case. YMMV
This answer didn't work on my company domain.
(Note: For me all the groups were showing lowercase and the domain was upper case.) (Note: Ensure after your COMPANYDOMAINNAME there is 2\ before the group name.) (Note: If your group has spaces in the name it requires you a \ for each space.)
Also you can use the group (wbinfo -g) or user (wbinfo -u) to get the correct formatting from your domain.
For Root Access:
%admin ALL=(ALL:ALL) ALL
%COMPANYDOMAINNAME\\domain\ admins ALL=(ALL:ALL) ALL
For Sudo Access:
%sudo ALL=(ALL:ALL) ALL
%COMPANYDOMAINNAME\\domain\ admins ALL=(ALL:ALL) ALL
%COMPANYDOMAINNAME\\workstationadmins ALL=(ALL:ALL) ALL