Skip to content

Instantly share code, notes, and snippets.

@the-paulus
Created April 19, 2018 18:24
Show Gist options
  • Save the-paulus/faa580c8b1d139c6482de4bbaa0e0bc3 to your computer and use it in GitHub Desktop.
Save the-paulus/faa580c8b1d139c6482de4bbaa0e0bc3 to your computer and use it in GitHub Desktop.
Change Active Directory password from the terminal.
#!/bin/bash
DATAPATH=$(dscl localhost -read /SEARCH CSPSearchPath | grep -m 1 "Active" | sed 's/^ *//')
dscl -u $USER -p $DATAPATH -p $HOME
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment