]> git.p6c8.net - policy-templates.git/blob - mac/README.md
Merge pull request #1106 from mozilla/TranslateEnabled
[policy-templates.git] / mac / README.md
1 **IMPORTANT**: To use enterprise policies on macOS, you must set the `EnterprisePoliciesEnabled` policy.
2
3 An example plist file with all options is available here:
4
5 https://github.com/mozilla/policy-templates/blob/master/mac/org.mozilla.firefox.plist
6
7 If you want to set specific options from the command line, we also provide flattened shortcuts to any item that is nested in the plist file.
8
9 For example, this policy:
10 ```json
11 {
12 "policies": {
13 "Homepage": {
14 "URL": "http://example.com/"
15 }
16 }
17 }
18 ```
19 which would be set in the plist file like this:
20 ```xml
21 <key>Homepage</key>
22 <dict>
23 <key>URL</key>
24 <string>http://example.com</string>
25 </dict>
26 ```
27 Correctly writing the nested value with the `defaults` command can be hard, so you can flatten the keys by separating them with `__`, like this:
28 ```bash
29 sudo defaults write /Library/Preferences/org.mozilla.firefox Homepage__URL -string "http://example.com"
30 ```
31 Before any command line policies will work, you need to enable policies like this:
32 ```bash
33 sudo defaults write /Library/Preferences/org.mozilla.firefox EnterprisePoliciesEnabled -bool TRUE
34 ```
35 If you want to set user specific policies, use ~/Library without sudo:
36 ```bash
37 defaults write ~/Library/Preferences/org.mozilla.firefox EnterprisePoliciesEnabled -bool TRUE
38 defaults write ~/Library/Preferences/org.mozilla.firefox Homepage__URL -string "http://example.com"
39 ```

patrick-canterino.de