Forum Discussion
Reset Local Admin Password on macOS Devices via Microsoft Intune
Hi Microsoft Support Team,
We have Enrolled macOS devices into Intune and are looking for a solution to reset the local admin account password using Intune. Could you please advise on the best approach for achieving this?
We are open to using scripts, configuration profiles, or any other recommended method that aligns with Intune's macOS management capabilities. Additionally, if there are any prerequisites or limitations, we should be aware of, kindly share those details.
Looking forward to your guidance.
1 Reply
- SasidharKonduruCopper Contributor
The best approach for resetting a local admin password in macOS managed by Intune is to use a custom shell script that changes the password, then deploy that script through Intune's Shell Script deployment feature. This method is straightforward and leverages the scripting capability built into Intune.
#!/bin/bash
# Set the new password for the specified admin user account
NEW_PASSWORD="NewSecurePassword123"
ADMIN_USER="admin" # Replace with the actual local admin username
# Change the password for the admin account
sudo dscl . -passwd /Users/$ADMIN_USER $NEW_PASSWORD
- Modify the script as needed to meet your specific requirements (e.g., changing the ADMIN_USER and NEW_PASSWORD).
- Ensure that the password is stored securely or passed securely to avoid exposure.