I want to chime in here, in case this can help someone else! I tried the solution above from @OrtwinGentz, but it didn't work for me; HOWEVER, it did lead me to a similar solution that did work for me. My problem manifested a little differently, but I think it had the same underlying cause (whatever that may be).
My config: I have a 2014 Mac Mini server with 2 raid shares that we use on various machines within our company network. We have Mac clients on several different OS versions, Win clients on several OS versions and a Linux client running Ubuntu 20.04 on the network. We use the AzureAD that comes with O365 for authentication of the Win machines and also have an Active Directory server in Azure that is synced with the O365 AD and also serves as our DNS master, which is used by the Macs and some other devices. The Linux machine is listed in the AD system and uses the Azure DNS server, but is not joined to the domain for auth purposes - it uses local auth only.
Prior to the problem, most network machines mounted the drive using the qualified machine name (e.g., <computer>.ad.<domain>.com
). Two exceptions were one win11 machine and the Linux machine, both of which could only mount using the ip addr.
The Problem: We upgraded the Mac Mini to Monterey (12.5) and that's when the trouble started. Most machines were able to mount the shares, except for the one Win11 and Linux machines. I tried for 2 days to fix, but couldn't find a solution. I had run across this SE topic, but the dscl commands failed, so I moved on. I circled back to it today and decided to look harder at why they didn't work.
The Solution: I used the Mac Directory Utility to look into the Local Groups directory and saw that there indeed was NOT a SMB entry with RecordName = com.apple.access_smb, but rather a bunch of (8-9) entries for each shared resource, which had in the RecordName com.apple.sharepoint.group.NN (NN=2-digit number). On a whim I chose one of these 'raid' groups and substituted its RecordName in the dscl commands from the solution above.
sudo dscl /Local/Default append Groups/com.apple.sharepoint.group.23 GroupMembership <username>
sudo dscl /Local/Default append Groups/com.apple.sharepoint.group.23 GroupMembers <guid>
BAM!! The Linux system mounted right up! Then the Win11 system too! I also found that I didn't need to add users to every share, both raids mounted fine. I then added the other users that might use the Linux or Win11 systems and poured myself a cold one... Cheers.