Change the Admin Password with Mac OS X Single User Mode · Home Mac OS X iPad Tips & Tricks...

18
4/29/17, 10*15 AM Change the Admin Password with Mac OS X Single User Mode Page 1 of 18 http://osxdaily.com/2011/04/25/change-admin-password-mac/ Apr 25, 2011 - 61 Comments Change the Admin Password with Mac OS X Single User Mode If you’re in IT, or just fixing Grandmas Mac, it’s not too uncommon to get a machine where you don’t have the admin users password. If you find yourself in this situation, you can easily change the Admin password, or any other users, simply by booting into Mac OS X ‘s command line Single User Mode. I consider this to be essential knowledge for troubleshooting Macs. Change an Admin Password in Mac OS X Single User Mode This is a multistep process but it’s easy to follow: First you need to enter Single User Mode. Reboot the Mac and hold down Command+S at boot to enter into the command line. You’ll see a note where Mac OS X tells you that you need to run two commands in order to make filesystem changes, this is necessary so let’s handle that first The first command checks the Mac OS X filesystem for errors and fixes them, it can take a few minutes to run: fsck -fy The next command mounts the root Mac OS X drive as writable, allowing you to Follow @OSXDaily Like 81K Subscribe to OSXDaily Be the first of your friends to like this OS X Daily 81,072 likes Like Page Learn More Custom Sear Search Home Mac OS X iPhone iPad Tips & Tricks Jailbreak News iOS 2017 DODGE JOURNEY GT 20% Off MSRP Cash Allowance On Select 2017 Models In Stock For $7,255 Average Savings On This JOURNEY GT

Transcript of Change the Admin Password with Mac OS X Single User Mode · Home Mac OS X iPad Tips & Tricks...

Page 1: Change the Admin Password with Mac OS X Single User Mode · Home Mac OS X iPad Tips & Tricks NewsJailbreak iOS Custom SearchSearchiPhone 2017 DODGE JOURNEY GT ... iPhone 7 6S 6 Screen

4/29/17, 10*15 AMChange the Admin Password with Mac OS X Single User Mode

Page 1 of 18http://osxdaily.com/2011/04/25/change-admin-password-mac/

Apr 25, 2011 - 61 Comments

Change the Admin Password withMac OS X Single User Mode

If you’re in IT, or just fixing Grandmas Mac, it’s not too uncommon to get a machine where

you don’t have the admin users password. If you find yourself in this situation, you can

easily change the Admin password, or any other users, simply by booting into Mac OS X‘s

command line Single User Mode. I consider this to be essential knowledge for

troubleshooting Macs.

Change an Admin Password inMac OS X Single User ModeThis is a multistep process but it’s easy

to follow:

First you need to enter Single UserMode. Reboot the Mac and holddown Command+S at boot to enterinto the command line.

You’ll see a note where Mac OS Xtells you that you need to run twocommands in order to make

filesystem changes, this is necessary so let’s handle that first

The first command checks the Mac OS X filesystem for errors and fixes them, it cantake a few minutes to run:

fsck -fy

The next command mounts the root Mac OS X drive as writable, allowing you to

Follow @OSXDailyLike 81K

Subscribe to OSXDaily

Be the first of your friends to like this

OS X Daily81,072 likes

Like Page Learn More

Custom SearchSearch Home Mac OS X iPhone iPad Tips & Tricks Jailbreak News iOS

2017 DODGE JOURNEY GT

20%Off MSRP Cash Allowance

On Select 2017 Models In Stock

For $7,255Average Savings

On This JOURNEY GT

Page 2: Change the Admin Password with Mac OS X Single User Mode · Home Mac OS X iPad Tips & Tricks NewsJailbreak iOS Custom SearchSearchiPhone 2017 DODGE JOURNEY GT ... iPhone 7 6S 6 Screen

4/29/17, 10*15 AMChange the Admin Password with Mac OS X Single User Mode

Page 2 of 18http://osxdaily.com/2011/04/25/change-admin-password-mac/

make changes to the filesystem:

mount -uw /

After the filesystem is mounted, you can reset any users password using thefollowing command:

passwd username

You’ll need to enter the new password twice to reset and confirm the changes

Note that a password will not be visibly typed when using the ‘passwd’ command, it looks

as if nothing is being entered at all. That is standard practice in the command line world.

Changing Admin Password in OS X Lion, Mountain Lion, andlaterFor users with OS X 10.7.3 and later, including OS X 10.8+ Mountain Lion, there may need

to be an additional step to load open directory. If you have issues with the above

approach, try the following command sequence with newer versions of Mac OS X. Note

the primary difference is using ‘launchctl’ between mounting the drive and changing the

password:

#1 fsck -fy

#2 mount -uw /

#3 launchctl load /System/Library/LaunchDaemons/com.apple.opendirectoryd.plist

#4 passwd username

The password should now change as expected, where you can then reboot and use the

admin user account as expected. Rebooting is possible through the command line by by

typing:

reboot

Or by using the standard manual restart methods of keyboard shortcuts, shutdown, or

holding down the power button. On the next boot the changed admin password will be

usable as anticipated.

Don’t know the admin username? No problem

If you’re fixing someones machine and you don’t know the username to reset, just look in

/Users with:

ls /Users/

Here you’ll see at least three items, .localized, Shared, and a username. The username is

what you’ll want to change with the passwd command.

After the password is reset and confirmed, you can exit out of Single User Mode by typing

OSXDai…

+ 8,204

Follow

THE MOST POWERFULMOBILE WORKSTATIONS.EVER.

Intel® Xeon®

processor

Dell Precision 15 7000 Series (7510)

C U S T O M I Z A B L E A N DS C A L A B L E T O W E R S .

Dell Precision Tower 5000 Series (5810)

D E S I G N E D T O B E A SD I V E R S E A S Y O U RN E E D S .

NEW Dell Precision 5520

Starting at$1,399

Intel Inside®. PowerfulProductivity Outside.

Roll Over for Legal.

SENSO BluetoothHeadphones,Best Wir...InvotekNew $36.97

AmazonBasicsApple CertifiedLightni...AmazonBasicsNew $11.98

CambridgeSoundWorksOontZ Angle 3N...CambridgeSoundWor...New $27.99

iPhone 7 6S 6Screen ProtectorGlass...TechMatteNew $7.99

Privacy Information

Page 3: Change the Admin Password with Mac OS X Single User Mode · Home Mac OS X iPad Tips & Tricks NewsJailbreak iOS Custom SearchSearchiPhone 2017 DODGE JOURNEY GT ... iPhone 7 6S 6 Screen

4/29/17, 10*15 AMChange the Admin Password with Mac OS X Single User Mode

Page 3 of 18http://osxdaily.com/2011/04/25/change-admin-password-mac/

exit or reboot. The Mac will now boot as usual and you’ll have access to the machine with

the new password.

This is an easier and faster method than the approach taken for resetting lost passwords

or using the Mac OS X boot DVD, because it’s changing an existing root users password

rather than creating a new admin user account. Both work fine though, so you can use

whatever method you’d like.

You can use the same approach to navigate around a sleep/wake lock screen, although

you’ll obviously have to reboot the Mac meaning you will miss whatever is currently on the

users desktop.

Like 81K people like this. Be the first of your friends.

Enjoy this tip? Subscribe to the OSXDaily newsletter to get more of

our great Apple tips, tricks, and important news delivered to your

inbox! Enter your email address below:

Subscribe

8

Related articles:How to Change the Root User Account Password in Mac OS X

Enable root User in Mac OS X 10.6 Snow Leopard

How to Reset a macOS Sierra Password

Quick Fix to Prevent dscl Unauthorized Password Changes in OS XLion

W A T C H T H E J O U R N E Y

PERFECTING THE JOURNEY

154Like

1075

98

Page 4: Change the Admin Password with Mac OS X Single User Mode · Home Mac OS X iPad Tips & Tricks NewsJailbreak iOS Custom SearchSearchiPhone 2017 DODGE JOURNEY GT ... iPhone 7 6S 6 Screen

4/29/17, 10*15 AMChange the Admin Password with Mac OS X Single User Mode

Page 4 of 18http://osxdaily.com/2011/04/25/change-admin-password-mac/

Posted by: David Mendez in Mac OS X, Tips & Tricks, Troubleshooting

61 Comments» Comments RSS Feed

Reb says:April 25, 2011 at 3:14 pm

nice

bookmarked!

Reply

Dan says:April 25, 2011 at 3:16 pm

Wow! Is it really that easy to get around password protection on a Mac? That’s scary!

Reply

MickM says:April 25, 2011 at 4:10 pm

What would be really scary is if you could back up the original password file,

change the password, rape and pillage the machine, and then restore the original

password file. I wonder if that’s possible :-(.

Reply

Jonathan W says:October 27, 2011 at 1:49 pm

You can’t restore an original password using Kerbos login. You can,

Best Free Antivirus2017Ad top10bestantivirus.com

Bypass Mac FirmwarePasswordosxdaily.com

Instant GrammarCheckerAd Grammarly

Forgot a MacFirmware...osxdaily.com

How to Repair a MacDisk with fsck from...osxdaily.com

Need to DownloadMac OS X Snow...osxdaily.com

Page 5: Change the Admin Password with Mac OS X Single User Mode · Home Mac OS X iPad Tips & Tricks NewsJailbreak iOS Custom SearchSearchiPhone 2017 DODGE JOURNEY GT ... iPhone 7 6S 6 Screen

4/29/17, 10*15 AMChange the Admin Password with Mac OS X Single User Mode

Page 5 of 18http://osxdaily.com/2011/04/25/change-admin-password-mac/

however, with any amount of software available online… scary stuff, but it’s

protectable.

Reply

Gus says:February 7, 2014 at 11:11 am

How can you restore the original password file?

its just a password reset at boot level – not rocket science! Just like saying

“I dont have the keys to the car on me as they are locked inside but I can

smash a window”

Reply

Jeremy says:April 25, 2011 at 9:00 pm

yes but you can set an open firmware password which can not be bypassed at

all, if you forget that you are S O L

Reply

m says:August 21, 2012 at 6:06 am

you can set a firmware password, this is more protected, but more dangures as

forgetting this password woeld require opening you imac so IF you set the

firmware password MAKE SURE you store it someware SAFE

Reply

Gus says:February 7, 2014 at 11:10 am

Its just a linux BSD rehashed many times.

The theory is that if you have direct console access to a host (standing in front of

the machine) then why shouldnt you be able to reset the root password. Its only

our friends in microsoft that want to sell you cars with the hood welded shut!

Reply

TB says:August 24, 2014 at 2:52 pm

Ever heard of the Offline NTFS Editor? It’s 3rd party, but makes it trivially

easy to reset the root admin password in the SECURITY registry hive. This

isn’t a Mac/Windows thing, it’s a computer thing.

I mean, come on. It’s 2014. Can we stop with Windows v. Mac now? Apple

is 100x more restrictive with the App Store than Microsoft ever was towards

Page 6: Change the Admin Password with Mac OS X Single User Mode · Home Mac OS X iPad Tips & Tricks NewsJailbreak iOS Custom SearchSearchiPhone 2017 DODGE JOURNEY GT ... iPhone 7 6S 6 Screen

4/29/17, 10*15 AMChange the Admin Password with Mac OS X Single User Mode

Page 6 of 18http://osxdaily.com/2011/04/25/change-admin-password-mac/

developers, and if the Windows Mobile Store wasn’t so much of a goddamn

travesty, Windows Phone 8 would actually be a serious contender for best

mobile OS.

I miss 1996 too, but it’s time to move on.

Reply

Jonny says:March 2, 2015 at 6:55 am

Well said! And thank you for the perspective check & tips.

It’s really quite upsetting & a bit scary how ALL the major OS

developers & many hardware manufacturers (with a few exceptions-

mainly the open source world)) are becoming SO restrictive– ever

increasingly!- of their customers (us!), the OWNERS of their devices, on

what we can do with & how we can use the products we paid for! I

dreading the day when they start selling computers with no

administrator rights just like they do with the mobile devices- I’m

surprised it hasn’t happened yet. Or worse, when they design an OS

that has removed the entire concept of an administrator or root user-

then we’ll really be screwed… no more rooting/jailbreaking, etc. Of

course there will always be someone to figure out some way to gain

control- but with increasing difficulty & risk.

At least we got net neutrality (apparently… for now…), I had my doubts

at times.

NOW to my issue/question about this procedure: I’m on a VERY old

iBook, running Panther I believe. I followed the instructions but I was

given to opportunity to enter a new password, nor was any error

returned. Is it possible the password was just cleared (and I’ll have to

choose a new one next reboot)? Or would it even tell me if it failed or

something…?

Reply

Franziska says:January 14, 2016 at 3:00 pm

Well, according to the EULA, the software is only *licensed* to

you, you don’t own it. So they can be as restrictive as they want

on the software, the logic is that you can still use the machine.

For example, you could Format: C\ your machine and then

partition your disk to run Ubuntu. No more restrictive software!

Page 7: Change the Admin Password with Mac OS X Single User Mode · Home Mac OS X iPad Tips & Tricks NewsJailbreak iOS Custom SearchSearchiPhone 2017 DODGE JOURNEY GT ... iPhone 7 6S 6 Screen

4/29/17, 10*15 AMChange the Admin Password with Mac OS X Single User Mode

Page 7 of 18http://osxdaily.com/2011/04/25/change-admin-password-mac/

Or, you could partition your Mac and erase the partition securely,

then put a new operating system on it.

Windows and Mac don’t make that much money off of their actual

machine sales. They make money off of their software sales, and,

thus, they *sell* you a machine, but they *license* you to use

software.

Brad Zimmerman says:April 25, 2011 at 4:41 pm

Once someone has physical access to your hardware – game over.

You could set a firmware password to prevent the various start-up functions

(http://support.apple.com/kb/ht1352) but FWsucker can easily grab it. I believe

there’s also a hardware method (adding/removing RAM and resetting PRAM) to

disable the firmware password as wel.

Reply

Alberto says:April 25, 2011 at 10:54 pm

If it is so easy to enter on a Mac what is the sense to have a password?

Reply

Tom says:January 23, 2012 at 7:06 pm

To prevent unauthorized remote access using SSH or other protocols.

Reply

Franziska says:January 14, 2016 at 3:06 pm

Very little hacking actually happens at the machine. If someone gets a physical

hold over your machine, and they know how to reset passwords like this, they

own your computer now. But this usually means stealing your prized laptop out

from under your nose (hard and risky), or breaking-into your house (which is at

least 2 felonies in the US [theft and breaking-and-entering]; that’s very risky).

It means that they have to track you to your home or work, break in, then take

over your computer, all without you noticing that there’s someone strange at your

laptop.

Most hackers will take over a computer remotely, as you can do it from anywhere

Page 8: Change the Admin Password with Mac OS X Single User Mode · Home Mac OS X iPad Tips & Tricks NewsJailbreak iOS Custom SearchSearchiPhone 2017 DODGE JOURNEY GT ... iPhone 7 6S 6 Screen

4/29/17, 10*15 AMChange the Admin Password with Mac OS X Single User Mode

Page 8 of 18http://osxdaily.com/2011/04/25/change-admin-password-mac/

in the world (which means that foreign spies no longer have to infiltrate a society

to get secrets), and that is what a password protects against.

Reply

tommy says:September 2, 2016 at 5:50 pm

If you have file vault turned on, it’ll stop these steps from working. :)

Reply

Rakotofotsy says:May 27, 2011 at 11:27 am

So I’m running an older imac (the swivel head) with Panther. How can I change the

admin password using the SU mode? I’ve tried the above suggestion, as well as

others, but nothing has worked. I’m techy, but not that techy. HELP!!!!!

Reply

Chason says:February 12, 2012 at 12:48 am

Questions for the experts:

This didn’t work for me on single user mode in Lion 10.7.3. when the disk has been

encrypted with FV2

Specifically, this scenario: disk is encrypted by Admin;

Standard user (with restart privileges) restarts in SU mode, unencrypting the disk.

However, attempting to change own or admin passed via

passwd

returns an unspecified error.

Various dscl command don’t work either, returning the error that

/System/Library/com.apple.DirectoryServices.plist is missing (which is indeed the

case).

I’m not sure, but I believe the issue is that with FV2 encrypted the accounts password

files are not where they would be otherwise. Presumably, they must be in the

Recovery partition, otherwise how could FV2 check the passwords on a normal

startup?

I’m not sure if this is right, but it doesn’t seem that from SU mode you can look at the

Recovery partition either, as

DiskUtil list

Page 9: Change the Admin Password with Mac OS X Single User Mode · Home Mac OS X iPad Tips & Tricks NewsJailbreak iOS Custom SearchSearchiPhone 2017 DODGE JOURNEY GT ... iPhone 7 6S 6 Screen

4/29/17, 10*15 AMChange the Admin Password with Mac OS X Single User Mode

Page 9 of 18http://osxdaily.com/2011/04/25/change-admin-password-mac/

isn’t enabled.

Can anyone confirm any of this? Has anyone managed to reset either a user or admin

password in SU mode on a Lion install with FV2 enabled?

Thx.

Reply

James says:April 10, 2012 at 5:44 am

Hi!

This is definitely the case.

Once FileVault is switched on, you cannot change your password without

entering the old one.

Reply

Nang says:March 8, 2012 at 12:27 pm

Thank you so much! However, I had an error when I typed “passwd user” (the

shortname is actually ‘user’).

It says:

mount: illegal option — /

usage: mount [-dfruvw] [-o options] [-t external_type] special node

mount [-adfruvw] [-t external_type]

mount [-dfruvw] special | node

:/root# ls /Users/

.localized Shared user

:/ root# passwd Shared

passwd: The daemon encountered an error processing request. The daemon

encountered an error processing request.

It is a new 27″ iMac with the latest OS but it is already registered under the name

‘user’. I couldn’t ask the password simply because of personal reasons.

Much appreciate your help!

Reply

Sul says:March 23, 2012 at 9:53 am

Hey man – Im receiving the sa

E error(s). Did u happen to get a response?

Reply

Page 10: Change the Admin Password with Mac OS X Single User Mode · Home Mac OS X iPad Tips & Tricks NewsJailbreak iOS Custom SearchSearchiPhone 2017 DODGE JOURNEY GT ... iPhone 7 6S 6 Screen

4/29/17, 10*15 AMChange the Admin Password with Mac OS X Single User Mode

Page 10 of 18http://osxdaily.com/2011/04/25/change-admin-password-mac/

Ethan says:December 28, 2014 at 4:29 pm

I have had the same problem. What I think is that you need to enter the new

password, but I don’t know where to do that…

Reply

tbodt says:December 18, 2016 at 5:46 pm

You have to put a space between -uw and /.

Reply

fred says:March 10, 2012 at 9:44 am

Chason, Not for me either. I bought a used MacPro and the previous owner left

everything on it and would not give me the passed but did later. I still have his name

on everything. I thought changing the Admin Pass would fix that but no, the same

probs u have.

Reply

Marty says:March 28, 2012 at 6:56 pm

This does not work for me. When I type “passwd username” it says, launch_msg():

Socket is not connected

Passwd: Unable to open Directory node with name /Local/ Default. Node name

wasn’t found.

What am I doing wrong? Help would be appreciated. Thanks!

Reply

Conor says:January 4, 2014 at 11:36 pm

Make sure you properly mounted the hard drive to the root directory.

mount -uw /

Reply

Manjunath Mariyappa says:April 3, 2012 at 4:58 am

Works very well with Snow leopard. I was able to change the password for user with

admin rights.

Page 11: Change the Admin Password with Mac OS X Single User Mode · Home Mac OS X iPad Tips & Tricks NewsJailbreak iOS Custom SearchSearchiPhone 2017 DODGE JOURNEY GT ... iPhone 7 6S 6 Screen

4/29/17, 10*15 AMChange the Admin Password with Mac OS X Single User Mode

Page 11 of 18http://osxdaily.com/2011/04/25/change-admin-password-mac/

Thanks a lot for the post ..

Reply

Jim says:May 29, 2012 at 1:55 pm

I tried it and it worked but when I logged in and entered the new password, it says

“Your user account password is different from your FileVault password.” It asks for the

old user account password which I can’t remember.

Reply

jovanni says:June 8, 2012 at 8:53 am

Hey I bought a macbook (the all white ones) but i dont have the password to get into

it, and i was wondering if anyone knows how to reset the password? i also dont have

the disk

that usually comes with it. Thank you

Reply

Iven says:July 20, 2012 at 1:29 am

Why am i not able to type in the the new password…….every steps worked out

perfectly but arriving at the password step…..when i type in something it doesn’t

appear…..any idea???

Reply

Jim says:July 27, 2012 at 10:43 am

I am having the exact issue that after I enter the passwd username command, I

receive no error, just the prompt returns. I am using OSX 10.4.11

Reply

I think so says:October 9, 2012 at 11:33 am

It doesn’t show the password; you have to type it in, press enter and then

retype it, press enter and it will change the password.

You don’t see the password as you’re typing it in.

Reply

Jonny says:March 2, 2015 at 7:07 am

Uhmmm… no… That’s not how it works (in these older versions of OS

Page 12: Change the Admin Password with Mac OS X Single User Mode · Home Mac OS X iPad Tips & Tricks NewsJailbreak iOS Custom SearchSearchiPhone 2017 DODGE JOURNEY GT ... iPhone 7 6S 6 Screen

4/29/17, 10*15 AMChange the Admin Password with Mac OS X Single User Mode

Page 12 of 18http://osxdaily.com/2011/04/25/change-admin-password-mac/

X).

There is a 10-15 second pause after typing the command. If I type a

new password it shows up on the screen and when the prompt returns

whatever I typed is repeated giving me an error that the command (my

password) is not found.

If nothing is typed, the prompt returns with no errors or confirmation.

Not sure whether it’s clearing the password or not…

This should have been mentioned in the guide, it is a crucial “detail”

Reply

Bill says:August 2, 2012 at 4:52 pm

Ok, I have tried the original coding listed above with no results. I have since tried the

route of the following.

mount -uw/

cd users

ls

passwd username

and changed the admin account password that you need to use to logon to the

computer but apparently there is another admin account not shown in the above that

prevents me from downloading any software updates from apple.

Powerpc G5 dual processor non intel running osx 10.5.8

Reply

st says:August 14, 2012 at 7:37 pm

It doesn’t show for security reasons, just type new password, hit enter and retype to

confirm, then type reboot , login with new password you created

Reply

st says:August 14, 2012 at 7:38 pm

@jim

Reply

Rishi says:

Page 13: Change the Admin Password with Mac OS X Single User Mode · Home Mac OS X iPad Tips & Tricks NewsJailbreak iOS Custom SearchSearchiPhone 2017 DODGE JOURNEY GT ... iPhone 7 6S 6 Screen

4/29/17, 10*15 AMChange the Admin Password with Mac OS X Single User Mode

Page 13 of 18http://osxdaily.com/2011/04/25/change-admin-password-mac/

August 23, 2012 at 4:27 am

Will this work for Lion 10.7 as well?

Reply

Rishi says:August 23, 2012 at 4:29 am

I guess for Lion 10.7 one has the option to boot into Lion Recovery and can open

Terminal and type “resetpassword”

Reply

Ray says:October 10, 2012 at 1:16 pm

Yup, this is correct.

Reply

Gaurav Sharma says:September 10, 2012 at 2:16 pm

Insane! I had lost my boot disk and forgotten my own password – happens with age :)

… thanks so much for this! 10.6.8

Reply

Marko says:September 23, 2012 at 5:11 am

Thanks mate, it works!

Reply

I think so says:October 9, 2012 at 11:35 am

Anyone know if there’s a way to reset filevault without old admin password or master

password? I managed to change the admin password but now it’s giving me an error

message saying that the filevault and admin password don’t match up and I need to

type the old admin password, which I don’t have.

Reply

catalina says:November 17, 2012 at 6:07 pm

omg i finally found a website that could help me!!this actually worked :)

Reply

Ludvig says:November 22, 2012 at 3:40 pm

Page 14: Change the Admin Password with Mac OS X Single User Mode · Home Mac OS X iPad Tips & Tricks NewsJailbreak iOS Custom SearchSearchiPhone 2017 DODGE JOURNEY GT ... iPhone 7 6S 6 Screen

4/29/17, 10*15 AMChange the Admin Password with Mac OS X Single User Mode

Page 14 of 18http://osxdaily.com/2011/04/25/change-admin-password-mac/

When I enter “fsck -fy” in “:/ root#” it says “disk0s2: I/O Error. ** The volume

Macintosh HD could not be verified completely.”

What’s the problem?

Typing in “mount -uw /” doesn’t work either.

Reply

Kat says:December 11, 2012 at 10:03 pm

None of this helped.

Reply

Lee Joramo says:January 9, 2013 at 12:08 pm

I found that under Mac OS X 10.4 the passwd command did not work. It ended up

being that you need to issue the following command

sh /etc/rc

wait a while, you will see a lot of start text scroll by. If a prompt doesn’t appear after a

bit, try hitting the return key. Hopefully that will get you back to the command prompt.

Then you can trying issuing the passwd command again. I found this try at

http://superuser.com/a/359532

Reply

Keshav Bhat says:March 4, 2013 at 8:09 pm

What a life saver! I installed Lion and lost ability to run some critical software. Then

returned to install Snow Leopard. Lost access as admin. This set of instructions were

perfect. Thank you!!

Reply

Jon says:April 2, 2013 at 5:05 pm

For any Lion users having trouble with the passwd command not working in single

user mode, try running this command before you run passwd:

launchctl load /System/Library/LaunchDaemons/com.apple.opendirectoryd.plist

Reply

Chris says:April 8, 2013 at 6:45 pm

This worked great.

Page 15: Change the Admin Password with Mac OS X Single User Mode · Home Mac OS X iPad Tips & Tricks NewsJailbreak iOS Custom SearchSearchiPhone 2017 DODGE JOURNEY GT ... iPhone 7 6S 6 Screen

4/29/17, 10*15 AMChange the Admin Password with Mac OS X Single User Mode

Page 15 of 18http://osxdaily.com/2011/04/25/change-admin-password-mac/

So for 10.7 – 10.8.3 users:

#1 fsck -fy

#2 mount -uw /

#3 launchctl load

/System/Library/LaunchDaemons/com.apple.opendirectoryd.plist

#4 passwd username

Reply

Guillermo says:August 2, 2014 at 7:04 am

Thanks man. That did the trick. (10.9.4 on myhack)

Reply

Power says:April 21, 2013 at 9:46 pm

Ok, I have tried the original coding listed above with no results. I have since tried the

route of the following.

mount -uw/

cd users

ls

passwd username

and changed the admin account password that you need to use to logon to the

computer but apparently there is another admin account not shown in the above that

prevents me from downloading any software updates from apple.

Powerpc G5 dual processor non intel running osx 10.5.8

Reply

vmorgo says:November 12, 2013 at 7:51 am

So for 10.7 – 10.8.3 users:

#1 fsck -fy

#2 mount -uw /

#3 launchctl load /System/Library/LaunchDaemons/com.apple.opendirectoryd.plist

#4 passwd username

Unfortunately, this does not work with Mavericks when attempting to reset the root

password. The four steps work as expected, but then when booting in to the system

and attempting to sudo to root (sudo -) from the command-line, the result is still

Page 16: Change the Admin Password with Mac OS X Single User Mode · Home Mac OS X iPad Tips & Tricks NewsJailbreak iOS Custom SearchSearchiPhone 2017 DODGE JOURNEY GT ... iPhone 7 6S 6 Screen

4/29/17, 10*15 AMChange the Admin Password with Mac OS X Single User Mode

Page 16 of 18http://osxdaily.com/2011/04/25/change-admin-password-mac/

“Sorry”, even when entering the correct password.

Reply

Gbb says:November 12, 2013 at 9:41 am

This method works for OS X Mavericks, be sure to enter the proper username

and password

Reply

Jesse says:December 4, 2013 at 2:22 pm

The mac I am attempting to access is a bit older (about 7-ish years old give or take)

and every time I try to do this, nothing really happens. The screen claims that there is

no feed (I checked the connection multiple times and it even works just fine when

booted up normally) and after a few minutes the fans “kick into overdrive,” then I get

nervous and turn it of. This has happened every time I have tried this method. Is there

something I can check or should do differently?

Reply

Aisha says:September 9, 2014 at 11:14 am

Lock numeric can’t login cos I have numbers as part of my password what do I do

please

Reply

Jason says:May 21, 2015 at 3:38 pm

Hey does changing the admin password using single user mode put me in danger of

deleting any of my files/documents/photos etc. from my mac?

Reply

Rochelle Phillips says:July 13, 2015 at 3:10 am

This didn’t work for me, I found using the command + R guide was much easier. I

knew what I was doing. and followed the prompts properly. When you get to your last

instruction it says restart you literally have to make sure you’ve clicked on the correct

word that says restart not close or any of that but restart. Try this method out if the

above doesn’t work.

Reply

Page 17: Change the Admin Password with Mac OS X Single User Mode · Home Mac OS X iPad Tips & Tricks NewsJailbreak iOS Custom SearchSearchiPhone 2017 DODGE JOURNEY GT ... iPhone 7 6S 6 Screen

4/29/17, 10*15 AMChange the Admin Password with Mac OS X Single User Mode

Page 17 of 18http://osxdaily.com/2011/04/25/change-admin-password-mac/

Scott W says:July 26, 2015 at 11:53 am

It worked for me w 10.5.8! Thanks a lot! I found this post about Admin Password reset

last night. I stumbled across a G5 Dual 1.8 at our town recycling center, in mint

condition, w maxed-out RAM, PCI-X slots, Belkin 3-FireWire PCI card, dual DVI video

card, and lots of useable software. The previous owner had not required password for

logon, so initial testing was easy. To install any new software, or migrate my own disk

contents over to it from my old PATA drives, I needed Admin access. So, this

procedure saved the day.

Reply

BENSON PRINCEWILL says:October 16, 2015 at 2:17 am

please kindly help me out, i am working in a company that all the system has 4

different users and every of them has password and the code and directory didnt

work for me please kindly help me with better procedure,.. i want to take all the

passwords off plz

Reply

Shawn Kaplan says:November 26, 2015 at 10:03 am

I’ve been trying everything to reset my password. i lost the ability to log in when i tried

to upgrade to El Capitan…rrrrr! So i restored from my backup but now cant log in. I’ve

tried the resetpassword method. i get to the screen and it appears to reset the

password but when i reboot i still cannot log in.

so been trying the console approach above. when i run the passwd command it

appears to be working, i enter the password twice, but then the console just hangs. It

never comes back to a command prompt.

Any ideas? is my password file corrupt?

Reply

Graham says:February 6, 2016 at 6:37 am

I can’t get this to work – new to inputting code. I have Mountain Leapord a newly

refurbished Macbookpro (2015) I accidentally made my HD read only.

Reply

Leave a Reply Name (required)

Page 18: Change the Admin Password with Mac OS X Single User Mode · Home Mac OS X iPad Tips & Tricks NewsJailbreak iOS Custom SearchSearchiPhone 2017 DODGE JOURNEY GT ... iPhone 7 6S 6 Screen

4/29/17, 10*15 AMChange the Admin Password with Mac OS X Single User Mode

Page 18 of 18http://osxdaily.com/2011/04/25/change-admin-password-mac/

« Is this iPhone 5? Pictures ofalleged iPhone with larger screen

leak out of China

Watch the Royal Wedding LiveOnline from your iPhone or iPad »

Mail (will not be published) (required)

Website

Submit Comment

Shop for Apple & Mac Deals on Amazon.com

OS X DailyEmail us: [email protected]

About OSXDaily | Contact Us | Privacy Policy | Sitemap

This website is unrelated to Apple Inc

All trademarks and copyrights on this website are property of their respective owners.

© 2017 OS X Daily. All Rights Reserved. Reproduction without explicit permission is prohibited.