Skip to main content
Question

force password reset script


Forum|alt.badge.img+1

I am using the following script to force a password reset on next login for the current logged-in user. This works fine locally when run in command line. It used to work as a script run via Jamf self-service pre-10.14, but with Macs running 10.14+ it does nothing when run via self-service. Still works fine in command line. Any ideas?

#!/bin/bash
pwpolicy -u `whoami` -setpolicy "newPasswordRequired=1"

3 replies

Forum|alt.badge.img+16
  • Honored Contributor
  • 1054 replies
  • November 22, 2018

We are using

#!/bin/sh
pwpolicy -u $3 -setpolicy "newPasswordRequired=1"

and it was worked in all our testing..

C


Forum|alt.badge.img+7
  • Contributor
  • 59 replies
  • November 22, 2018

don't forget that whoami when the script is executed is actually the jamf admin account. You need to specify the user as @gachowski script does.


Forum|alt.badge.img+2
  • New Contributor
  • 1 reply
  • November 28, 2018

https://www.jamf.com/jamf-nation/discussions/25095/password-change-script


Reply


Cookie policy

We use cookies to enhance and personalize your experience. If you accept you agree to our full cookie policy. Learn more about our cookies.

 
Cookie settings