11-04-2021 02:48 AM - edited 11-06-2021 06:48 AM
Now that macOS Monterey is out, we wanted to allow our opt-in Beta Testers with local admin rights easy access to nuke-and-pave their Macs the "Apple" way:
macOS Monterey includes Erase All Content and Settings, a way to quickly and securely erase all of your settings, data, and apps, while maintaining the operating system currently installed. If your Mac includes this feature when using macOS Monterey, use it instead of other utilities to erase your Mac.
Source: HT212749
And / Or | Criteria | Operator | Value | ||
Operating System Version | greater than or equal | 12.0.1 | |||
and | ( | Architecture Type | is | arm64 | |
or | Boot ROM | like | iBridge | ) |
/usr/bin/su \- "/usr/bin/stat -f%Su /dev/console" -c "/usr/bin/open '/System/Library/CoreServices/Erase Assistant.app'"
Posted on 11-09-2021 06:06 PM
There seems to be a discrepancy between the screenshots and the text for the command. In the screenshots there are ` in the first image and none in the second. The text to copy is also missing them. I cannot get this method to work because I am unsure of what the actual command is to call to Erase Assistant to open and run it. Thanks.
Posted on 11-09-2021 06:10 PM
Thanks for the feedback; hopefully this will work better:
/usr/bin/su \- "`/usr/bin/stat -f%Su /dev/console`" -c "/usr/bin/open '/System/Library/CoreServices/Erase Assistant.app'"
Posted on 11-09-2021 06:15 PM
Thanks that worked!
@dan-snelson Do you know of a way to invoke and run this from a Standard User account as well? I would block access to it within Self Service by way of limited access logins.
Posted on 11-09-2021 06:39 PM
For Standard Users, you’ll most likely need to go a different route (i.e., `erase-install`).
Posted on 02-18-2022 12:37 PM
@dan-snelson Thank you for this awesome and detailed post! This might be off-topic, but can you clarify why you use the "su -c" convention, rather than using "sudo -u" ?
02-24-2022 01:42 AM - edited 02-24-2022 01:43 AM
You can just run:
open -a "Erase Assistant"
It will start the process for the current logged in user.
And make sure your user is admin. You might want to (temporarily) elevate the standard user permissions to admin.
Posted on 09-26-2022 08:23 AM
Is there any benefit to this instead of running it via System Prefs?