Category filter
Script to clear password on Mac
Apple devices are known for their extensive security and privacy features. Apple does not allow users to remove the login password from their Macs as it could potentially risk any personal or confidential data if the device gets stolen or lost.
However, you will be able to set an empty string as the login password on your Macs using Hexnode’s Custom Script feature. The user will be able to log in to the device by simply clicking the “Enter” key without entering any password.
Clear password on your Mac
1 |
dscl . passwd /Users/<username> <old password> “” |
The above-mentioned script sets an empty string as the login password for your Macs using the dscl
command. It is required that you specify the name of the user whose login password is being cleared and the current password in the script.
Another method to clear passwords on Mac is by using the sysadminctl
command. The script in this case requires you to specify the name of the user whose password is to be cleared as well as the name and password of the administrator of the endpoint.
1 |
sysadminctl -resetPasswordFor <username> -newPassword "" -adminUser <admin username> -adminPassword <admin password> |