Disable iCloud Drive?

lacinda
New Contributor

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

1 ACCEPTED SOLUTION

SeanA
Contributor III

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

View solution in original post

4 REPLIES 4

carmand
New Contributor

Wondering the same...

GaToRAiD
Contributor II

@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.

lacinda
New Contributor

Thanks, @GaToRAiD - mind sharing your script?

SeanA
Contributor III

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