Q: Using pwpolicy to set password policy remote
Hi,
I am trying to set a password policy on company macs. The Mac's are not in a domain, but managed using Kaseya.
I can use this command locally that works:
pwpolicy -a username -p password -setglobalpolicy "minChars=4 requiresAlpha=1 requiresNumeric=1
However; when i want to send the command to the machines, the password has to be typed into the shell command for the script to work, as you can see in the commands above "-p password". This is something i do not want to do as it is a security issue for the company. Is there any way to get this script to run without typing in the password in clear text? The command "pwpolicy" requires you to type in the password of a authenticator user, it does not matter if you run as root or not, it will always ask for the password of the authenticator user.
Here is the pwpolicy developer article: https://developer.apple.com/library/mac/documentation/Darwin/Reference/ManPages/ man8/pwpolicy.8.html
Thanks for any help with this!
Posted on Sep 7, 2015 2:43 AM