Become a MacRumors Supporter for $50/year with no ads, ability to filter front page stories, and private forums.

spadz93

macrumors member
Original poster
Nov 24, 2009
72
2
I'm working in a school that's turning over their tech services to another company, so I need to change our admin accounts' passwords. I have the old password, and the account name is consistently admin. Is there a way I can incorporate the username, original password and new password in a single command, so that I can push out this command via ARD? I've tried using the methods outlined here but ARD's unix command window doesn't allow for additional input past the original command. Any help would be appreciated, would much rather push this out than have to do this individually.
 

spadz93

macrumors member
Original poster
Nov 24, 2009
72
2
Hi,

Does this do it?


I think you'll need to do it from an account with admin privs, or sudo it.

Hope that helps

Rob

this gets my foot in the door. i still need the keychain to be unlocked via the old password, but it changed the password for the account
 

spadz93

macrumors member
Original poster
Nov 24, 2009
72
2
Did you try using sudo?

how would i implement that, just by doing this?...

Code:
sudo dscl . -passwd /Users/USERNAME NEWPASS

i used an osascript sequence to automate it, and it's been working pretty well. entire command process below

Code:
dscl . -passwd /Users/USERNAME NEWPASS

osascript <<EOF
tell application "System Events"
keystroke "USERNAME"
keystroke tab
delay 0.5
keystroke "NEWPASS"
delay 0.5
keystroke return
delay 3.0
keystroke return
delay 0.5
keystroke "OLDPASS"
delay 0.5
keystroke return
end tell
EOF

basically this just walks it through the on-screen prompts to authenticate the keychain update
 
Register on MacRumors! This sidebar will go away, and you'll see fewer ads.