Force incognito mode in Mac Google Chrome

beyond0
New Contributor

I have tried a few methods and scrips but I was not successful. Any has a solution or a way to make the script below work ?

 

!/bin/bash

defaults write com.google.chrome IncognitoModeAvailability -integer 2

 

Thanks

2 REPLIES 2

AJPinto
Honored Contributor III

Scripts run in the root space. If you are setting the value correctly, you are setting it for the root user not the person using the device. 

For managing settings you need to use a Configuration Profile, not a script. 

RaGL
New Contributor III

To create the config profile do the following:

1. Create a new configuration profile

2. At "Application & Custom Settings" click on "Upload" and "Add"

3. At preference domain enter "com.google.Chrome" (case-sensitive)

4. At Property List enter:

<?xml version="1.0" encoding="UTF-8"?>

<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">

<plist version="1.0">

  <dict>

    <key>IncognitoModeAvailability</key>

    <integer>2</integer>

  </dict>

</plist>

5. After deploying it you can check via "chrome://policy/" if the config profile did apply.