Disable iCloud Prompt from first login

jesse_wilson
New Contributor II

Every year we re-image the student laptops. Some of the young students that use laptops. When we click on the User account that these young students the iCloud Prompt pops up. I know there are scripts out there to do this. We even used it in the past but does not seem to work any more. We are using 10.9.5 on these machines. Anyone have any idea what I can do to prevent this iCloud Prompt from popping up without me having to tough a few hundred machines.

Here is what I am using:

"#!/bin/bash"
PLIST="/Library/Users/$ShortName/Library/Preferences/com.apple.SetupAssistant"

sudo defaults write "$PLIST" DidSeeCloudSetup -bool TRUE
sudo defaults write "$PLIST" GestureMovieSeen none
sudo defaults write "$PLIST" DidSeeSyncSetup2 -bool TRUE
sudo defaults write "$PLIST" ShowKeychainSyncBuddyAtLogin -bool FALSE
sudo defaults write "$PLIST" LastSeenCloudProductVersion "15.15.15"
sudo defaults write "$PLIST" SkipFirstLoginOptimization -bool True

7 REPLIES 7

jesse_wilson
New Contributor II

I added some lines to the original script we did use in the past that does not seem to work any more.

"#!/bin/bash"
PLIST="/Library/Users/$ShortName/Library/Preferences/com.apple.SetupAssistant"

sudo defaults write "$PLIST" DidSeeCloudSetup -bool True
sudo defaults write "$PLIST" LastSeenCloudProductVersion "11.11.11"
sudo defaults write "$PLIST" SkipFirstLoginOptimization -bool True

I added the "s around the first line because if makes that line larger and does not show the "#"...lol

bentoms
Release Candidate Programs Tester

@jesse.wilson FWIW, with 9.93 there's a profile payload to suppress this.

joshua
New Contributor

We found it easier to just sign up for DEP.

ttyler
New Contributor II

May have gone over board...

But so far it has worked...

#!/bin/sh   
#Run this script after imaging a machine, this can run as a first run script (at REBOOT), but needs no parameters set if used from the Casper Suite

# Determine OS version
osvers=$(sw_vers -productVersion | awk -F. '{print $2}')
sw_vers=$(sw_vers -productVersion)

# Determine OS build number
sw_build=$(sw_vers -buildVersion)

# Checks first to see if the Mac is running 10.7.0 or higher.
# If so, the script checks the system default user template
# for the presence of the Library/Preferences directory. Once
# found, the iCloud and Diagnostic pop-up settings are set
# to be disabled.

if [[ ${osvers} -ge 7 ]]; then

for USER_TEMPLATE in "/System/Library/User Template"/*

do

/usr/bin/defaults write "${USER_TEMPLATE}"/Library/Preferences/com.apple.SetupAssistant DidSeeCloudSetup -bool TRUE
/usr/bin/defaults write "${USER_TEMPLATE}"/Library/Preferences/com.apple.SetupAssistant GestureMovieSeen none
/usr/bin/defaults write "${USER_TEMPLATE}"/Library/Preferences/com.apple.SetupAssistant LastSeenCloudProductVersion "${sw_vers}"
/usr/bin/defaults write "${USER_TEMPLATE}"/Library/Preferences/com.apple.SetupAssistant LastSeenBuddyBuildVersion "${sw_build}"

/usr/bin/defaults write "${USER_TEMPLATE}"/Library/Preferences/com.apple.SetupAssistant DidSeeSyncSetup2 -bool TRUE
/usr/bin/defaults write "${USER_TEMPLATE}"/Library/Preferences/com.apple.SetupAssistant LastCacheCleanupStillRunning -bool false
/usr/bin/defaults write "${USER_TEMPLATE}"/Library/Preferences/com.apple.SetupAssistant LastPreLoginTasksPerformedBuild "${sw_build}"
/usr/bin/defaults write "${USER_TEMPLATE}"/Library/Preferences/com.apple.SetupAssistant LastPreLoginTasksPerformedVersion "${sw_vers}"
/usr/bin/defaults write "${USER_TEMPLATE}"/Library/Preferences/com.apple.SetupAssistant LastSeenCloudProductVersion "${sw_vers}"
/usr/bin/defaults write "${USER_TEMPLATE}"/Library/Preferences/com.apple.SetupAssistant RunNonInteractive -bool FALSE
/usr/bin/defaults write "${USER_TEMPLATE}"/Library/Preferences/com.apple.SetupAssistant ShowKeychainSyncBuddyAtLogin -bool FALSE
/usr/bin/defaults write "${USER_TEMPLATE}"/Library/Preferences/com.apple.SetupAssistant SkipFirstLoginOptimization -bool FALSE

done

# Checks first to see if the Mac is running 10.7.0 or higher.
# If so, the script checks the existing user folders in /Users
# for the presence of the Library/Preferences directory.
#
# If the directory is not found, it is created and then the
# iCloud and Diagnostic pop-up settings are set to be disabled.
for USER_HOME in /Users/*

do

USER_UID=`basename "${USER_HOME}"`
if [ ! "${USER_UID}" = "Shared" ]; then
    if [ ! -d "${USER_HOME}"/Library/Preferences ]; then
        /bin/mkdir -p "${USER_HOME}"/Library/Preferences
        /usr/sbin/chown "${USER_UID}" "${USER_HOME}"/Library
        /usr/sbin/chown "${USER_UID}" "${USER_HOME}"/Library/Preferences
    fi

    if [ -d "${USER_HOME}"/Library/Preferences ]; then
        /usr/bin/defaults write "${USER_HOME}"/Library/Preferences/com.apple.SetupAssistant DidSeeCloudSetup -bool TRUE
        /usr/bin/defaults write "${USER_HOME}"/Library/Preferences/com.apple.SetupAssistant GestureMovieSeen none
        /usr/bin/defaults write "${USER_HOME}"/Library/Preferences/com.apple.SetupAssistant LastSeenCloudProductVersion "${sw_vers}"
        /usr/bin/defaults write "${USER_HOME}"/Library/Preferences/com.apple.SetupAssistant LastSeenBuddyBuildVersion "${sw_build}"
        /usr/sbin/chown "${USER_UID}" "${USER_HOME}"/Library/Preferences/com.apple.SetupAssistant.plist
    fi
fi
done
fi
exit 0

bmarks
Contributor II

@bentoms Where? I can't find this at all though I may be blind.

stevewood
Honored Contributor II
Honored Contributor II

@bmarks according to this FR it is in the Login Window profile, and it is "Disable Apple ID setup"

jesse_wilson
New Contributor II

@bentoms

Sorry, what do you mean by "FWIW, with 9.93 there's a profile payload to suppress this."

Edited:
Ok first of all I figured out what FWIW means...lol

Second what do you mean by "there's a profile payload to suppress this."