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"