Hey Guys, So hopefully you geniuses can help me with something.
I have needed to reset my password a couple of times in single user boot mode using the trick that apple put in.
This one :
fsck -fy
mount -uw /
launchctl load /System/Library/LaunchDaemons/com.apple.DirectoryServices.plist
dscl . passwd /Target Username New Password
I would like to know how to make this into a program that I can have autorun off of a flash drive when it is plugged into a mac in single user boot mode. I modified it for some user input.
echo "Target Username"
read USRNAME
echo "New Password"
read NWPASSWD
fsck -fy
mount -uw /
launchctl load /System/Library/LaunchDaemons/com.apple.DirectoryServices.plist
dscl . passwd /$USRNAME $NWPASSWD
Even better if it can be compared to a list of usernames to see if it is the right one or to be able to choose a username in a list of some sort. And added on to that is there any way so that the flash drive can boot the mac into single user boot mode? Or do I have to do it manually. Please think of something, It will be very useful!
Thanks,
Zdillz
I have needed to reset my password a couple of times in single user boot mode using the trick that apple put in.
This one :
fsck -fy
mount -uw /
launchctl load /System/Library/LaunchDaemons/com.apple.DirectoryServices.plist
dscl . passwd /Target Username New Password
I would like to know how to make this into a program that I can have autorun off of a flash drive when it is plugged into a mac in single user boot mode. I modified it for some user input.
echo "Target Username"
read USRNAME
echo "New Password"
read NWPASSWD
fsck -fy
mount -uw /
launchctl load /System/Library/LaunchDaemons/com.apple.DirectoryServices.plist
dscl . passwd /$USRNAME $NWPASSWD
Even better if it can be compared to a list of usernames to see if it is the right one or to be able to choose a username in a list of some sort. And added on to that is there any way so that the flash drive can boot the mac into single user boot mode? Or do I have to do it manually. Please think of something, It will be very useful!
Thanks,
Zdillz