In light of the 9.97 hot fix our organization is going through and purging or sanitizing any scripts that may contain sensitive data. To that end, one script in particular is throwing back some errors when we attempt to pass parameters when using it.
This script resets the password for a local account on the machine, no AD binding.
The password is effectively two parts, a prefix ($prefix) and suffix ($4).
$prefix - A unique identifier for each machine
$4 - A string of characters that remains static for every device
The following script is executed:
#!/bin/sh
prefix=SOMETHING
acctName="SOMEUSER" ## You will need the shortname of the account, so all lowercase presumably
dscl . passwd /Users/$acctName "$prefix$4"
dscl . create /Users/$acctName AuthenticationHint "Prefix + Suffix fields as of `date "+%B %d, %Y"`"
if [ $? == 0 ]; then
echo "Password successfully changed"
else
echo "Password not changed"
fi
exit
Normally, this worked with prefix and suffix being specified directly in the script. But when run as it is above with a custom event in verbose we see this:
Script result: DS Error: -14165 (eDSAuthPasswordQualityCheckFailed) passwd: DS error: eDSAuthPasswordQualityCheckFailed Password successfully changed
The password is, of course, not successfully changed.
We've tried different variations of this but seem to get the same error each time. Any thoughts? Possibly a better method?
