Skip to content

Instantly share code, notes, and snippets.

View Allistah's full-sized avatar

Allistah Allistah

View GitHub Profile
@Allistah
Allistah / applyPasswordPolicy.sh
Last active December 13, 2021 06:36 — forked from lucascantor/applyPasswordPolicy.sh
Generate and apply a standalone macOS password policy, exempting a specified local admin
#!/bin/sh
#########################################################################################
## Creates a local password policy on a Mac running OS 10 or 11.
##
## Created from various files I found around the internet and man pages
## for pwpolicy. I've added the ability to edit the default password
## length which was difficult to find. I attempted to preserve original author names.
##
## This script builds a password policy in a .plist file, imports that