Linux - User name with a "$" cannot sudo

We are beginning to add our RHEL 7.9 Linux machines to AD. As a part of that we would like to restrict the use of sudo to the administrators. The admin group we will call ServerAdmins and we added it to the sudoers file. The issue we have is the individual administrator ID has a "$" in the name. EXAMPLE: admin$user. When we add this line to the sudoers file it fails.

%DOMAIN\\ServerAdmins  ALL=(ALL)  ALL

However if we add a single member this way it succeeds:

%DOMAIN\\admin\$user  ALL=(ALL)  ALL

I am stumped on how to proceed. We have verified that it is the "$" causing the issue.


Solution 1:

All,

I do not know what happend. I went back this morning and tried to reproduce the issue so I could copy the message for @MichaelHampton and I was able to authenticate and it recognised I was in the proper group to use sudo. Bugger all.

EDIT:

As I said in the comments, I figured it out. After adding the proper group I needed to restart realmd. It was no the "$" afterall but the groups needed requering. Once realmd was restarted I could sudo.