Skip to main content
Solved

Disable iCloud Drive?

  • October 28, 2014
  • 4 replies
  • 39 views

Forum|alt.badge.img+2

Is there a way in Yosemite to disable iCloud Drive, without completely disabling iCloud?

Best answer by SeanA

Look for the existence of the Mobile Documents folder in /Users/username/Library/Preferences. If that folder exists, then that is one way to tell if iCloud Drive is enabled. When iCloud Drive is turned off, that folder is deleted from the Mac.

You can script this and place it in an Extension Attribute (though it sounds like GaToRAiD is using a launchdaemon/launchagent). You can create a smart group and have it look for the results of the EA.

Rough draft, so test this EA:

#!/bin/sh

# if folder exists, then iCloud Drive is enabled

iCloudDriveFolder="~/Library/Preferences/Mobile Documents"

if [ -e "${iCloudDriveFolder}"  ]; then
    echo "<result>Enabled</result>"
else
    echo "<result>Disabled</result>"
fi

4 replies

Forum|alt.badge.img+1
  • New Contributor
  • October 29, 2014

Wondering the same...


Forum|alt.badge.img+9
  • Contributor
  • October 30, 2014

@lacinda currently there is not way of doing this. The only thing you can do is proactively watch for it to be enabled. We have a script that runs on a users system every 5 mins to detect if its turned on. Then it alerts our security team.


Forum|alt.badge.img+2
  • Author
  • New Contributor
  • October 30, 2014

Thanks, @GaToRAiD - mind sharing your script?


Forum|alt.badge.img+12
  • Contributor
  • Answer
  • November 20, 2014

Look for the existence of the Mobile Documents folder in /Users/username/Library/Preferences. If that folder exists, then that is one way to tell if iCloud Drive is enabled. When iCloud Drive is turned off, that folder is deleted from the Mac.

You can script this and place it in an Extension Attribute (though it sounds like GaToRAiD is using a launchdaemon/launchagent). You can create a smart group and have it look for the results of the EA.

Rough draft, so test this EA:

#!/bin/sh

# if folder exists, then iCloud Drive is enabled

iCloudDriveFolder="~/Library/Preferences/Mobile Documents"

if [ -e "${iCloudDriveFolder}"  ]; then
    echo "<result>Enabled</result>"
else
    echo "<result>Disabled</result>"
fi