Posted on 06-16-2015 02:01 PM
Is there a way to verify a user enters the correct password and if they don't prompt for it again. I am making a Apple Script to enable FileVault for the logged in user. So I have a AppleScript that pop-ups a dialog box asking the user for their password with hidden text and I store that to a variable. I need to somehow to check if the password they entered their is correct and if its not, prompt the user to try again.
Thanks!
Solved! Go to Solution.
Posted on 06-16-2015 02:04 PM
Here is how I check with dscl (in bash):
passDSCLCheck=`dscl /Local/Default authonly $User $Pass; echo $?`
if [ "$passDSCLCheck" -eq 0 ]; then
echo "Password OK for $User"
fi
Posted on 06-16-2015 02:04 PM
Here is how I check with dscl (in bash):
passDSCLCheck=`dscl /Local/Default authonly $User $Pass; echo $?`
if [ "$passDSCLCheck" -eq 0 ]; then
echo "Password OK for $User"
fi
Posted on 06-16-2015 02:11 PM
Thank you very much!!!
Posted on 05-13-2019 12:25 PM
I wonder if there is a way to validate a AD password
password ok
or
password not ok
I need to have a script run bases on if the password is correct and if the type password is not correct then to fail the script