Apple

Mac Scripting – Adobe CC Force Logout

Thursday, February 28th, 2019 | Mac Scripting | No Comments

So, clearly I’m not keeping this blog up as much as I intended to, but I felt like I needed to make a post here for this. I do a lot of Mac Scripting for my job, and a lot of the time I suspect I’m reinventing the wheel. This is partly because I suspect people don’t always share their solutions to what could be common problems.

I needed a solution to force Adobe CC to log out the current user for my student computer lab. It took me some time to dig up the where the credentials were stored, so I submit to you the resulting script that will force a logout of a use logged in to Adobe CC.

It is worth noting that this will not immediately force a logout, but rather it prevents the user from being logged back in to Adobe CC upon startup. I have this scripted as a logout script so that whenever the computers in my computer lab are rebooted or shut down, they clear the Adobe credentials.

#!/bin/bash

#################################################################
#
# Written by KClose
# Last updated 02/28/2019
#
# This script forces a logout of the Adobe Creative Cloud Application as well as additional Adobe keychain credentials.
# Additional applications may require additional scripting to force a logout.
#
#################################################################

# Define the target user.
# I use JAMF which has a standard variable of $3 for the currently logged in user.
TargetUser=$3

# Look for the OOBE folder.
if [ -d "/Users/$TargetUser/Library/Application Support/Adobe/OOBE" ]; then
	# Reset all credentials for Creative Cloud login. Creative Cloud will not log in on the next reboot.
	echo "Deleting OOBE folder."
    rm -rf /Users/$TargetUser/Library/Application\ Support/Adobe/OOBE
else
	echo "OOBE not found."
fi

# Check for additional Adobe credentials in the keychain.
XDSignOn="$(security find-generic-password -l Adobe\ User\ Info "/Users/$TargetUser/Library/Keychains/login.keychain" | grep -i 'version')"

# If a version number is found, that means there are credentials stored.
if [[ "$SignOn" == *"version:"* ]]; then
	# Clear the additional Adobe credentials.
    echo "Clearing keychain items."
	security delete-generic-password -l Adobe\ User\ Info "/Users/$TargetUser/Library/Keychains/login.keychain"
	security delete-generic-password -l Adobe\ User\ OS\ Info "/Users/$TargetUser/Library/Keychains/login.keychain"   
else
	echo "No additional credentials found."
fi

echo "Adobe Credentials cleared."

Tags: , , , , , ,

Automated for the People…

Wednesday, August 13th, 2008 | Work | 4 Comments

…in which I talk about my recent experiments with Applescript and Automator, and probably bore you to tears.

So, in case you’ve never met me, I am the kind of person who likes to have things my way and will go to great lengths to customize things to be as close to my idea of perfect as possible. I would say I border on obsessive sometimes when it comes to attempting to achieve that perfection, but that would be a lie. There is no bordering, I’m all the way in. I’ve taken up residence in my obsessive compulsive need for things to function in the best possible manner. › Continue reading

Tags: , , , , ,

Instagram

Something is wrong.
Instagram token error.

BoardGameGeek

Calendar

May 2019
S M T W T F S
« Feb    
 1234
567891011
12131415161718
19202122232425
262728293031