I need to determine if a user has a non-empty password set on Mac. Anything will work: a command line call, AppleScript, Carbon, Cocoa, etc.
I want to inform the user whether or not they have a password set.
I need to determine if a user has a non-empty password set on Mac. Anything will work: a command line call, AppleScript, Carbon, Cocoa, etc.
I want to inform the user whether or not they have a password set.
I've found the answer to my question. Thanks anyway.
dscl . -authonly <username> ""
If you are performing an action that would require any user to enter a password, then you should allow them the opportunity to verify that password even if it is empty, and then handle the behavior if they decide not to allow that action accordingly.
© 2022 - 2024 — McMap. All rights reserved.