Disabling the iCloud sign-in pop-up message on Lion and later
Starting in 10.7.2, Apple set the iCloud sign-in to pop up on the first login.
10.7.5 iCloud pop-up message
10.8.5 iCloud pop-up message
10.9.0 iCloud pop-up message
Since having this appear may not be desirable in all Mac environments, it makes sense to be able to turn this off for new user accounts. As part of preparing for Mavericks in my own shop, I’ve developed a script that should disable the iCloud pop-up on 10.7.2 – 10.9.0. See below the jump for the details.
Apple is using /Users/username/Library/Preferences/com.apple.SetupAssistant.plist to store the settings that indicate whether or not the iCloud sign-in process has run. Building on work done by the folks behind DeployStudio, I’ve built a script that pre-sets those values for new and existing accounts on a particular Mac. In turn, that should stop the iCloud pop-up message from appearing on that Mac.
Update – 10-30-2013: It looks like setting the following values are not needed to block the iCloud pop-up:
LastPreLoginTasksPerformedVersion
LastPreLoginTasksPerformedBuild
I’ve updated the script to remove the parts that referenced setting those values.
The script is below and is also available on my GitHub repo.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/sh | |
# Determine OS version | |
osvers=$(sw_vers -productVersion | awk -F. '{print $2}') | |
sw_vers=$(sw_vers -productVersion) | |
# 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. | |
# | |
# If the directory is not found, it is created and then the | |
# iCloud pop-up settings are set to be disabled. | |
if [[ ${osvers} -ge 7 ]]; then | |
for USER_TEMPLATE in "/System/Library/User Template"/* | |
do | |
defaults write "${USER_TEMPLATE}"/Library/Preferences/com.apple.SetupAssistant DidSeeCloudSetup -bool TRUE | |
defaults write "${USER_TEMPLATE}"/Library/Preferences/com.apple.SetupAssistant GestureMovieSeen none | |
defaults write "${USER_TEMPLATE}"/Library/Preferences/com.apple.SetupAssistant LastSeenCloudProductVersion "${sw_vers}" | |
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 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 | |
mkdir -p "${USER_HOME}"/Library/Preferences | |
chown "${USER_UID}" "${USER_HOME}"/Library | |
chown "${USER_UID}" "${USER_HOME}"/Library/Preferences | |
fi | |
if [ -d "${USER_HOME}"/Library/Preferences ] | |
then | |
defaults write "${USER_HOME}"/Library/Preferences/com.apple.SetupAssistant DidSeeCloudSetup -bool TRUE | |
defaults write "${USER_HOME}"/Library/Preferences/com.apple.SetupAssistant GestureMovieSeen none | |
defaults write "${USER_HOME}"/Library/Preferences/com.apple.SetupAssistant LastSeenCloudProductVersion "${sw_vers}" | |
chown "${USER_UID}" "${USER_HOME}"/Library/Preferences/com.apple.SetupAssistant.plist | |
fi | |
fi | |
done | |
fi |
Curious if you know the nature of LastPreLoginTasksPerformedVersion and LastPreLoginTasksPerformedBuild? I’d guess these might be the things that are running when you see the “Completing setup..” animation. There might be good reasons to leave these alone if they aren’t related to iCloud and/or don’t require user interaction.
In my tests doing re-imaging and upgrade installs of 10.9, I haven’t needed these and have instead simply updated my Configuration Profile to have a LastSeenCloudProductVersion of ‘10.9’.
I don’t know the exact nature of the LastPreLoginTasksPerformedVersion and LastPreLoginTasksPerformedBuild values, but I tried running my script without those values and got the iCloud pop-up message even when the script was inserting LastSeenCloudProductVersion “${sw_vers}” into com.apple.SetupAssistant.plist.
With those values added, the iCloud pop-up message did not appear.
Hmm. I also am only setting DidSeeCloudSetup to True and LastSeenCloudProductVersion to “10.9” and the iCload/AppleID Setup Assistant is not appearing.
I’ve re-tested and it looks like the LastPreLoginTasksPerformedVersion and
LastPreLoginTasksPerformedBuild do not need to be set after all. Thanks for the heads up!
You could do this … or you can rename the minilauncher file. For example: mv -f -v /System/Library/CoreServices/Setup\ Assistant.app/Contents/SharedSupport/MiniLauncher /System/Library/CoreServices/Setup\ Assistant.app/Contents/SharedSupport/MiniLauncher.backup
Thanks for sharing (as always), Rich.
It’s working as-is for me on 10.7-10.9 Macs.
I am seeing a directory created at /Users/root.
The the root user is not actually being enabled from this script and we. I know root homedir actually resides at /private/var/root, and “no”, we do not explicitly enable root user in our environment.
Has anyone else seen this?
Might this be due to fact that…
A. We use < 500 UIDs for local admin accounts
B. No accounts exist in 501-1023 (at least on newly-imaged and AD-bound Macs)
C. Our AD account UIDs are in the 9-digit range
@seabash I am debating upgrading our educational lab environments from 10.8.4 to 10.9. We haven’t had any issues with the AppleID previously for our users using their AD accounts to login. Is the iCloud issue going to persist even if the computer is joined to AD?
Hi Rich! I must be doing something wrong with this script? I’ve been trying to deploy it with Casper and run it with a command and I’ve tried to just upload the script to the JSS and then run it from there in a policy but I’m still seeing the “Sign in with you AppleID” message on all new user accounts. Do you have any suggestions on what I might be doing wrong?
Rich, how do you use this script with DeployStudio? I’ve tried running it as is after a restore, or during a restore and neither seem to work.
Why this scripy dies not work. After OS upgrade via FileWave, iv kept this in the same folder group and it gets installed right after OS is upgraded from 10.8 to 10.9 but still every user when logs in, get the iCloud prompt. Anything special needs to be done?
So, I’ve been banging my head against this problem off and on (while doing other stuff) for a couple weeks now. I was so excited when I found a simple script that would do it for me, only to become even more aggravated when it didn’t work. However, in this moment, I am euphoric. It must be a difference in 10.9.2 or something, I’m not sure since I don’t have any 10.9.0 or .1 installs available, BUT… my problem was I couldn’t find the location the script was trying to look at. Turns out, I had to put “/Non_localized” in front of the path to the plist file of the user template.
In short, change lines 18, 19, and 20 to look like this:
defaults write “${USER_TEMPLATE}”/Non_localized/Library/Preferences/com.apple.SetupAssistant DidSeeCloudSetup -bool TRUE
defaults write “${USER_TEMPLATE}”/Non_localized/Library/Preferences/com.apple.SetupAssistant GestureMovieSeen none
defaults write “${USER_TEMPLATE}”/Non_localized/Library/Preferences/com.apple.SetupAssistant LastSeenCloudProductVersion “${sw_vers}”
Also, as a side note, my colleague tried using rjpurves’ solution, and found it to work as well.
Is there anyway to get rid of the icloud pop up for those of us that are not so technically inclined?
I love you Rich.
any non-tech savvy help would be appreciated — this icloud login pop up just started last week and since i run a lab at school — it will freak the third graders out when this pops up unexpectedly!!
Macbook Pros 2012 running 10.9.5
MacBooks 2008 running 10.9.5
thanks for any help
** I’m a tech teacher because i was crazy enough to open a Net Day Box and ask what does this do in 1996!!
We have a bit of a fringe case, using PBIS Open for AD authentication against multiple domains, where only one domain doesn’t require a domain prefix. The script worked great for that one domain and any local accounts, but broke for accounts from any other prefixed domain. I fixed it by using numeric UIDs read from the home directories, instead of the names of the home directories themselves. It’s a two-line change, so that:
USER_UID=`basename “${USER_HOME}”`
if [ ! “${USER_UID}” = “Shared” ]
becomes:
if [ ! “${USER_HOME}” = “/Users/Shared” ]; then
USER_UID=`stat -r ${USER_HOME} | awk ‘{print $5}’`
The ‘chown’ command is quite happy using the numeric UID, and it works across all domains.
Anyone getting this to work with 10.10.4? If not, what do we need to adjust in the script to get this to work with 10.10.4?
I have no problem running it on 10.10.4 but under every OS Ive tried it produces the following error “chown: Deleted Users: illegal user name” which is just annoying but not work stopping
Some optimization
#!/bin/sh -x
# Determine OS version
osvers=$(sw_vers -productVersion | awk -F. ‘{print $2}’)
sw_vers=$(sw_vers -productVersion)
# 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.
#
# If the directory is not found, it is created and then the
# iCloud pop-up settings are set to be disabled.
if [[ ${osvers} -ge 7 ]]; then
for USER_TEMPLATE in “/System/Library/User Template/English.lproj” “/System/Library/User\ Template/French.lproj”
do
if [ ! -e “${USER_TEMPLATE}/.LastSeenCloudProductVersion_${sw_vers}” ]; then
defaults write “${USER_TEMPLATE}”/Library/Preferences/com.apple.SetupAssistant DidSeeCloudSetup -bool TRUE
defaults write “${USER_TEMPLATE}”/Library/Preferences/com.apple.SetupAssistant GestureMovieSeen none
defaults write “${USER_TEMPLATE}”/Library/Preferences/com.apple.SetupAssistant LastSeenCloudProductVersion “${sw_vers}”
touch “${USER_TEMPLATE}/.LastSeenCloudProductVersion_${sw_vers}”
fi
done
for USER_HOME in /Users/*
do
USER_UID=`basename “${USER_HOME}”`
if [ ! “${USER_UID}” = “Shared” ] && [ ! -e “${USER_HOME}/.LastSeenCloudProductVersion_${sw_vers}” ]; then
if [ ! -e “${USER_HOME}/.LastSeenCloudProductVersion_${sw_vers}” ]; then
if [ ! -d “${USER_HOME}”/Library/Preferences ]; then
mkdir -p “${USER_HOME}”/Library/Preferences
chown -R “${USER_UID}” “${USER_HOME}”/Library
fi
if [ -d “${USER_HOME}”/Library/Preferences ]; then
defaults write “${USER_HOME}”/Library/Preferences/com.apple.SetupAssistant DidSeeCloudSetup -bool TRUE
defaults write “${USER_HOME}”/Library/Preferences/com.apple.SetupAssistant GestureMovieSeen none
defaults write “${USER_HOME}”/Library/Preferences/com.apple.SetupAssistant LastSeenCloudProductVersion “${sw_vers}”
chown “${USER_UID}” “${USER_HOME}”/Library/Preferences/com.apple.SetupAssistant.plist
touch “${USER_HOME}/.LastSeenCloudProductVersion_${sw_vers}”
fi
fi
fi
done
fi
The script still works, but you have to use the updated version at https://github.com/rtrouton/rtrouton_scripts/tree/master/rtrouton_scripts/disable_apple_icloud_diagnostic_and_siri_pop_ups. I used the payload free package.