Newsroom Update

Beginning in May, a special Today at Apple series titled “Made for Business” will offer small business owners and entrepreneurs free opportunities to learn how Apple products and services can support their growth and success. Learn more >

Looks like no one’s replied in a while. To start the conversation again, simply ask a new question.

Bug in AD Group and User syncing with Profile Manager

OK, folks, I’ve been fighting with a bug in Profile Manager for weeks now, and think I’ve finally tracked down the source. So, time to let others know, so we don’t all bash our heads against the same wall. (This might get a bit verbose, but bear with me.)


Profile Manager, with the latest 3.1 update, seems to have introduced a major parsing issue with the way it syncs Active Directory Groups and Users into itself. The problem I saw was random groups just plain did not show in the PM web interface at all, and most users would only show themselves as members of Domain Users and Everyone. Digging through the Service Helper Log for PM showed that, indeed, it logged errors for the groups that it didn’t sync at all (but nothing about the groups that show up, but won’t sync members). And, the kicker, if I add any of these users to an Open Directory group, they show up in PM just fine. I looked under ever rock, redid a whole new server, tore out my hair, but couldn’t see any reason for it …


Until I noticed (in the giant mess of users in one of the error reports) what seemed like a typo. What it turned out to be was that if any Group has users whose CN contains escaped characters (such as a comma), this causes a truncation bug and fails the entire Group during sync. Change the CN to nothing but alphanumerics and spaces, and the group syncs (after some reboots and prodding). As for the second problem, empty groups, it seems that if any user account has different CN and DisplayName, the user never has its membership updated in any group beyond Everyone and Domain Users. No error that I can find is logged for this.


Now, all of this seems pretty dumb. Due to the way the the AD connector presents accounts, it maps the SAMAccountName in AD to the recordName in OD, and the DisplayName in AD to the RealName in OD. This means that OD groups see memberships fine. However, for some odd reason, the codepath that syncs AD groups and members uses some odd mishmash: the sync errors shows the members as ‘SHORTDOMAINNAME\\CN'. I’ve never, ever seen that used anywhere else. Also, as an added stinger, neither the DisplayName, nor the CN are guaranteed to be unique in AD; the SAMAccountName and UserPrinciple ARE. Thus the AD sync should be using it instead of the CN; or it should just use the same lookup method OD uses.


So, for anyone who is seeing the same problems I was, check out your logs and check your AD accounts, and try to line these things up. But, if owrk in a place like where I do, and CN and DisplayName are different for Reasons, you’re SOL for now; hopefully Apple will fix this bug. (I did file one.)

OS X Mavericks (10.9.2)

Posted on Apr 8, 2014 12:56 PM

Reply
6 replies

Apr 16, 2014 3:00 PM in response to cjduckk

I'm not seeing any error like that in any of my console logs. What I'm seeing is in the devicemgrd.log in the Profile Manager folder. Something like this:

0:: [170] [2014/04/13 11:30:01.181] Unable to sync group record with '<ODRecord 0x7fc0bd665eb0 [attributes {'dsAttrTypeStandard:GeneratedUID': '12B37880-9EB1-44F7-AF92-41C255EF3F7E', 'dsAttrTypeStandard:RecordName': 'DOMAIN\Domain Admins', 'dsAttrTypeStandard:AppleMetaRecordName': 'CN=Domain Admins,CN=Users,DC=company,DC=org', 'dsAttrTypeStandard:AppleMetaNodeLocation': '/Active Directory/DOMAIN/company.org', 'dsAttrTypeStandard:RecordType': 'dsRecTypeStandard:Groups', 'dsAttrTypeStandard:PrimaryGroupID': '313751680', 'dsAttrTypeStandard:RealName': 'Domain Admins', 'dsAttrTypeStandard:GroupMembership': ['DOMAIN\Smith\’, 'DOMAIN\Joe User’, 'DOMAIN\Password Admin', 'DOMAIN\smithb’, 'DOMAIN\supervisor']}]>': -[DMODMembershipSpec enumerateSearchValues:usingBlock:] (/SourceCache/RemoteDeviceManagement/RemoteDeviceManagement-865.1/Compiled/Fram ework-Models/DMODMembershipSpec.m:127): "'((num == 0 || num > 2))'"


I've anonnymized it a bit, but the main error is still there; the errant \ in the first name shows the parsing failed on an escaped comma. There's other groups with many, many, MANY more members that have similar failures.


There's also been zero movement on the bug I filed.

May 9, 2014 12:23 AM in response to BrokenWindupDoll

Can confirm this on my out-of-the-box setup. My last name contains a period; removing it (or removing all percent vars from configuration payloads) fixes the issue. It manifested itself as repeated entries in devicemgrd.log:

0:: [2400] [2014/05/09 03:07:15.125] No substitution found for '%20WP-4020%'

0:: [2400] [2014/05/09 03:07:15.125] No substitution found for '%20WP-4020%'

0:: [2400] [2014/05/09 03:07:15.183] No substitution found for '%20WP-4020%'


How maddening.

Jun 5, 2014 2:36 AM in response to BrokenWindupDoll

Bingo. This appears to be the issue that's afflicting my attempt to set up a Mavericks server with Profile Manager also - I've just checked the devicemgrd.log and there are bucketloads of "Unable to sync group record". Is there any way for us to get in contact with Apple and let them know that we have this problem too and could they please fix it ASAP?

Dec 15, 2014 11:08 AM in response to BrokenWindupDoll

Well, bumping my own thread for ages ago, but good news! It seems the Server 3.2 line has changed the way it syncs AD Users. I am not seeing any issues with group memberships, no matter how crazy the CN or display name are set up.


Of course, it took until now for me to get around to redoing my server from scratch, as the upgrades from 3.0 -> 3.1 -> 3.2 completely hosed Postgress AND Open Directory, not allowing me to start Profile Manager at all (no amount of trying to start over via the setup scripts helped). I have no idea how Server 4.0 runs, but I'll assume it's like 3.2 for now.

Bug in AD Group and User syncing with Profile Manager

Welcome to Apple Support Community
A forum where Apple customers help each other with their products. Get started with your Apple ID.