Skip to main content
Question

Show All File Extensions for All Users

  • February 3, 2017
  • 3 replies
  • 35 views

Forum|alt.badge.img+5

Hi All,

I'm trying to run the following command to turn on file extensions. This will work if I run this via terminal on the logged in users, but I can't make this work through user for the current logged in users.

defaults write GlobalPreferences AppleShowAllExtensions -bool true"

Any help would be great.

Thanks

Mitch

3 replies

Forum|alt.badge.img+9

Mitch you could set this via a Managed Preference in the JSS.
If you want to use a script it would be possible via /Users/username/Library/Preferences/.GlobalPreferences.plist
With a script you could gather the logged in user and then set the parameter from there.


Forum|alt.badge.img+10
  • Valued Contributor
  • October 10, 2019

Since Managed Preferences are done and over, is there any way to make this stick with Config Profiles in modern macOS?


Forum|alt.badge.img+4
  • Contributor
  • May 10, 2021

You can do an Apple Script

tell application "Finder"
    activate
    set all name extensions showing of Finder preferences to true
end tell

The easy way to run this as the local user:

#!/bin/sh
sudo -u $3 osascript <<eos
tell application "Finder"
    activate
    set all name extensions showing of Finder preferences to true
end tell
eos