1. Home
  2. Knowledge Base
  3. SureMDM
  4. macOS Management
  5. How to change the password of a macOS user using the Run Script Job in SureMDM

How to change the password of a macOS user using the Run Script Job in SureMDM

Admins can remotely change the password of the admin user and standard user accounts on macOS using the Run Script job.

Purpose

The purpose of the article is to provide a guide on how to change the password of a macOS user using the Run Script Job in SureMDM.

Prerequisites

NA

Steps

  1. Login to the SureMDM console using Username and Password
  2. Navigate to Jobs and create a New Job.
  3. Select macOS as the Operating System.
  4. Create a Run Script job and add the following script with the Username, old password and new password details.

dscl . -passwd /Users/<Username> <oldpassword> <Newpassword>

sudo security set-keychain-password -o <oldpassword> -p <Newpassword>

/Users/<Username>/Library/Keychains/login.keychain

  1. The password of the user will be changed to the new one.

Need help? CONTACT US 

Was this helpful?
YesNo
Updated on December 2023