Want to highlight a helpful answer? Upvote!

Did someone help you, or did an answer or User Tip resolve your issue? Upvote by selecting the upvote arrow. Your feedback helps others! Learn more about when to upvote >

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

Cannot change path in Profile Manager --> Mobility --> Rules --> Skip items

All,


I'm using Mavericks server on a Mac Mini server in combination with two Mavericks MacBooks. Home Folders of Network users are stored on the Server and synchronized with mobile clients.


Everything worked fluently using Mountain Lion. However, since Mavericks I cannot edit the path under Profile Manager/Mobility/Rules/Skip items, no matter if it's about syncing "Preferences" or "Home Sync". I can create new items with empty path or change the drag down from "full path" to anything else but I cannot enter any path.


Has anybody else encountered this issue? I really need to edit this setting. Thank you,


Thomas

MAC MINI SERVER (LATE 2012), OS X Mavericks (10.9)

Posted on Oct 27, 2013 10:25 AM

Reply
28 replies

Nov 3, 2013 3:52 PM in response to thomas45344

After speaking with Apple, this is a confirmed bug. How something as basic as a text field that should be editable in the UI is actually not wasn't identifyied in testing completely astounds me.


It's always been a bit of a running joke how buggy early Apple releases are, but this is ridiculous. I wonder if Apple even has a QA team assigned to Server.


BTW: The closest 'workaround' is to Load (the deprecated since Lion) Workgroup Manager and use it to configure Mobility. I've confirmed that it works.


Getting more and more frustrated with Apple's focus on form over substance.

Nov 21, 2013 9:46 PM in response to thomas45344

I had the same issue but was able to resolve it using some sql kung fu. Here are the instructions for the brave of heart. I STRONGLY ADVISE YOU NOT DO THIS UNLESS YOU HAVE A PROPER BACKUP AND HAVE A DESIRE TO LIVE ON THE EDGE. 🙂 This process will edit the backend database for profile manager and if you mess it up, you are going to have issues.


Step 1.

Open the Profile Manager site, enter the profile you want to modify and ensure there is a blank entry in the skip section for every item you want to skip. Set the Comparision to what every you need, eg; Full Path. Repeat this and add a blank entry for each item you want to add. Make sure you save these profile updates. Cancel the updates after it starts to push them, this will be done later after the changes are made and we don't want that delayed by this update being held up.


Open Terminal and have at least two tabs logged in as root. Use sudo su - in each one, assuming you are logged as an adminstrator.


Step 2.

Take a text backup of the contents of the db for profile manager.

sudo -u _devicemgr /Applications/Server.app/Contents/ServerRoot/usr/bin/pg_dump -U _devicemgr -h /Library/Server/ProfileManager/Config/var/PostgreSQL devicemgr_v2m0 > /var/root/device_management.sql


Step 3.

In the 2nd terminal tab, create a blank file that will store the update command.

vi /var/root/mobility_update.sql


In vi do the following.

Press i to enter insert mode.


Enter this text.

update knob_sets set "dynamic_attributes" = '


Step 4.

In the first tab, open and locate the Mobility, aka PHD sync, settings. These instructions assume you only have one profile that contains Mobility settings. If you have multiple profiles that do you will be responsible for locating the correct one to modify.

less /var/root/device_management.sql


In less enter the following to locate the current Mobility settings.

/MobilityKnobSet


On my system, I had to press the n key to skip to the 2nd match. If you have multiple profiles that include Mobility setings, this is where you would locate the correct one you want to modify. When you see a line that resembles the one below, you have found an entry for the Mobility Settings.

116 \N 2012-08-27 21:59:36 2013-11-22 03:55:31.500015 11 MobilityKnobSet 16


If you know sql, this is in the KnobSets table. If not, use n to skip forward and N to skip back until you found the line that starts similar to the one above.


Step 5.

Now that you have your Mobility settings record, we need to get some data out of it. First thing we need is the id of the record, this is the very first number in the line above, 116. Yours will probably not be 116, so capture the first number in the line that you see.


In the 2nd tab. Hit the Return/Enter key to go to a new line. Then enter the following, replacing the 116 with the id you captured from above.

'

where id = 116;


Step 6.

Now we need the actual data we are going to update. Go back to the 1st tab and look at the Mobility settings record. We should still have the line up showing the record. Following the line after the id, look for something like this.

--- \nsyncBackgroundSetAtSyncNow: sync\ncom_apple_cachedaccounts_Cr


Once you see the ---, you've reached the correct information that we need to start capturing. Place the mouse at the beginning of the --- and start highlighting until we reach something like this.

com_apple_cachedaccounts_WarnOnCreate: BOOLEAN\n


This should be the end of the line and the next line should be the start of the next record. If you've reached a line that looks similar to start of the Mobility settings record, STOP, we only need the information starting from and including --- ending and including the last \n before the start of the next record.


Step 7.

Finishing the update sql.

In the 2nd tab, press the "esc" aka escape key on your keyboard to leave insert mode. Use the arrow keys to go back to the end of the first line. Don't worry about not making it past the ' character, you can't yet in this mode.


Press the a key to enter append mode, this should move your cursor past the ' character now.


Paste in the information we copied from the 1st tab. There will be a lot, don't worry, we are about to clean it up.


Press the "esc" key again. Then using the arrow keys, go back to the beginning of the first line. Enter the following and press the return key.

:s/\\n/\r/g


You should see that the big glob of data you pasted in just became a whole lot cleaner. All the \n sequences should now be proper newlines. Using the arrow keys make sure there is no blank lines between the last piece of data you pasted in and the ' character. If there is, move to the blank line and press dd, this will delete the blank line. If you deleted a line or press d once and don't want to delete anything more, press the "esc" key to return back to the normal navigation mode.


Finally we need to find the line that contains the Comparision and blank value we want to modify. If you have multiple ones, just repeat the process for each one. Use the arrow keys until you see something like this, assuming you use Full Path as the Comparision. Note: The value comes BEFORE the comparision. If you have multiple entries to modify, ensure you are entering the correct value for the comparision that follows.

- value: ""

comparison: fullPath


Place the cursor in between the " characters and press i to enter insert mode. If after pressing i the cursor is in the wrong spot, use the arrow keys to get between the " characters. Once you are positioned correctly, enter the relavent information for the Comparision you choose, in my case I used this.

- value: "~/Pictures/iPhoto Library"

comparison: fullPath


Once you have modified all the values for the Comparisions that you need, push the "esc" key and then enter the following to write the file and quit vi.

:wq


Step 8.

Updating the device management DB.

Now that we have our update file ready, let's use it to modify the Mobility settings.

In the 1st tab enter the following.

sudo -u _devicemgr /Applications/Server.app/Contents/ServerRoot/usr/bin/psql -U _devicemgr -h /Library/Server/ProfileManager/Config/var/PostgreSQL -d devicemgr_v2m0 < /var/root/mobility_update.sql


If it is successful, you should see this immediately after pushing return on the line above.

UPDATE 1


This means the update was successful. If you get an error message, then no changes were made. I will leave it to you to investigate why it failed and make the proper changes to the mobility_update.sql file and try again.


Step 9.

Go back to the Profile Manger site, open the profiles you modified and confirm the changes are there. If so, check or uncheck a box and then check or uncheck it again to set it back to what it was. This should allow you to save the profile and hence push it out. This will also modify the timestamp in the DB for the profile which we did not do by hand, prefer to keep the number of by hand changes to a minimum. Besides this will force a push as well. It's a 2 for 1.


If the changes do not appear, shutdown the Profile Manager from the Server app, restart and check again. If it still does not appear, then take a look at your mobility_update.sql to ensure you used the correct ID. If you did not, then you would be highly advised to restore the data using the device_management.sql file. This process is beyond the scope of this post.


Good luck!

Dec 2, 2013 4:29 AM in response to thomas45344

The workaround suggested by croadfeldt above worked for me, but there are two minor points to consider, when doing it:

  1. The instruction in Step 7 which currently reads "Press the a key to enter append mode, this should move your cursor past the ' character now." should instruct you to use the "i" and not the "a" key to enter the "insert" and not append mode, since the cursor will be on the closing single-quote, and so "append" will paste the text past that delimiter, making the SQL update command incorrect. To put it in other words, the pasted text should be between single-quotes, not just after them.
  2. In my version of this data file, all the paths showing after the "- value: " are listed without double quotes. When I was changing the - value: "" to the actual needed value, I have removed the double quotes, so the line said something like - value: ~/Library/Application Support/MobileSync in my case.
  3. There were three "could not identify current directory: Permission denied" errors returned when executing the command in steps 2 and 8, but they did not seem to matter. The update has worked.

Thank you for the workaround.

Jan 26, 2014 1:38 PM in response to Omniver

Omniver wrote:


BTW: The closest 'workaround' is to Load (the deprecated since Lion) Workgroup Manager and use it to configure Mobility. I've confirmed that it works.


Getting more and more frustrated with Apple's focus on form over substance.


By the way I found they did upgrade Workgroup Manager for Mavericks... They've been trying to kill it off for three years now.

Mar 1, 2014 9:48 AM in response to thomas45344

Another approach that worked for me and might be easier than modifying the SQL is to use a proxy tool such as Charles (charlesproxy.com) and monitor the do_magic post request, then modify the json data and re-submit the request. Here are step-by-step instructions for executing this approach with Charles proxy:


1. Start Charles and begin recording.


2. Add "do_magic" as a filter in Charles. This will reduce the results showing in Charles so that only the ProfileManager save requests show up.


3. Open ProfileManager and go to your Mobility -> Rules tab.


4. Click [+] to add your rule[s]


5. Click "OK"


6. Before clicking "Save" I usually clear out any/all requests that are showing in Charles.


7. Click "Save" and the go back to Charles - your last request (if you filtered and cleared) will have the JSON data that needs to be edited.


8. Click on the [Request] tab in the bottom of the Charles output window, then click on the [JSON Text] tab at bottom.


9. Right click within the output window of Charles and choose "Edit"


10. Now scroll within the JSON Text and you should see your rules toward the top and the most recent EMPTY rule that you just added & saved:


"excludedItems": [{

"value": "~/.SymAVQSFile",

"comparison": "fullPath"

}, {

"value": "~/Documents/Microsoft User Data",

"comparison": "fullPath"

}, {

"value": "",

"comparison": "fullPath"

}],


11. Edit the empty value string such as:

{

"value": "~/Music",

"comparison": "fullPath"

}


12. Click the [Execute] button and Charles will re-post the request with the modified data.


13. Verify by going back into your rules setting.



I hope this helps someone else as this is a REALLY annoying bug!

Cannot change path in Profile Manager --> Mobility --> Rules --> Skip items

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