Forum Discussion
RohitSingh111
Mar 31, 2025Copper Contributor
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 appro...
SasidharKonduru
Apr 01, 2025Copper 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.