Automatic Google Logout When Closing Chrome Window

AHSitguy
New Contributor III

Hi,
We use a shared login for our Mac lab. When students log into Google services and close the Chrome window (but they don't quit Chrome), I'm finding that when the next student opens Chrome, the prior student's Google account is still logged in. Is there a way to force the Google account to logout when the Chrome window is closed (by hitting the red circle)? I've been able to partially achieve this by checking the "Keep local data only until you quit your browser" setting in Chrome settings, but that only works if the student quits Chrome through the menu, not if they just click on the red circle to close the window.

1 ACCEPTED SOLUTION

AHSitguy
New Contributor III

I was able to figure this out by setting up a policy to delete the Chrome user folder at logout.

View solution in original post

4 REPLIES 4

AHSitguy
New Contributor III

I was able to figure this out by setting up a policy to delete the Chrome user folder at logout.

Can you tell me how you did that?

Hi,

Unfortunately, Apple and Jamf have deprecated the Logout hook for Jamf Policies, which is the way that I did it, but you could potentially also do it by using the Login hook. Here is what you could try:

  1. Create a Jamf policy with the "Configure Files and Processes" module.
  2. Set the trigger to Login or to both Login and Startup. Do NOT set it to Recurring Checkin.
  3. In the Configure Files and Processes module, type in "Google Chrome.app" (without quotes) and check the box for "kill process if found".
  4. Under Execute Command, type sudo rm -r '/Users/username/Library/Application Support/Google/Chrome'
  5. If you have multiple shared accounts, you can type the command in step four again in the Execute Command field with the second username with a comma or semicolon (I forget which) separating the commands.

However, I would suggest you move away from using shared accounts when you can. They are a nightmare to manage. We just recently upgraded to Jamf Connect so that each person could have their own user account and that made things so much easier. Now we don't have to worry about things like this because no one else will be using that account anyways.

TSOAFTVPPC
Contributor

Can't you set chrome to always open in incognito mode?