If you’ve just upgraded from OS X 9.x Mavericks to OS X 10.10 Yosemite and have Microsoft Lync installed, chances are you are having trouble logging in to Lync. The issue I was having was that I had remember me and save my password set so it would auto login at startup. The problem was that when it logged in it then immediately logged back out and was stuck doing this until i forced quit the Lync application. What was even stranger was that when it logged in for the brief second I could see all of my contacts before it logged back out.
Turns out that it was caused by Language settings and a permissions problem on the .GlobalPreferences.plist file. So to fix this problem i threw together this little snippet of code that you can run in terminal. If you save it as an executable shell script and run it then your Lync problems should be fixed! =)
#!/bin/bash for USER_HOME in /Users/* do USER_UID=`basename "${USER_HOME}"` if [ ! "${USER_UID}" = "Shared" ] then if [ ! -d "${USER_HOME}"/Library/Preferences ] then echo "missing lib pref dir" fi if [ -d "${USER_HOME}"/Library/Preferences ] then "/usr/libexec/PlistBuddy" -c "delete AppleLanguages" "${USER_HOME}/Library/Preferences/.GlobalPreferences.plist" "/usr/libexec/PlistBuddy" -c "Add AppleLanguages array" "${USER_HOME}/Library/Preferences/.GlobalPreferences.plist" "/usr/libexec/PlistBuddy" -c "Add AppleLanguages: string en" "${USER_HOME}/Library/Preferences/.GlobalPreferences.plist" sudo chmod 644 "${USER_HOME}"/Library/Preferences/.GlobalPreferences.plist fi fi done sudo chmod 644 /Library/Preferences/.GlobalPreferences.plist