Posted on 11-21-2018 01:28 PM
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"
Posted on 11-21-2018 09:43 PM
We are using
#!/bin/sh
pwpolicy -u $3 -setpolicy "newPasswordRequired=1"
and it was worked in all our testing..
C
Posted on 11-22-2018 12:53 AM
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.
Posted on 11-28-2018 02:56 PM
https://www.jamf.com/jamf-nation/discussions/25095/password-change-script