📜 ⬆️ ⬇️

Change the password of the root or any other account in Mac OS

A few days ago there was such a task: reset the root password on the MacBook, because the owner of the laptop somehow changed it and forgot.

The easiest and almost the only way I found on the Internet is at (http://support.apple.com/kb/HT1274 - Mac OS X: Changing or resetting an account password). His idea is that we have a bootable Mac OS X Installation Disk, with which we change the administrator password through a graphical interface.

But what if we have a MacBook and no installation disc? In this case, our friend / matchmaker / brother / friend Apple suggests that we buy this disk and then change the password. Very simple, isn't it? :)
')
I suggest another way: you need to boot into single user mode and change the password through the shell. To boot into single user mode, click “Command-S” during Mac OS startup (immediately after switching on). If everything is done correctly and on time, then the root shell will load in front of us.

Next, “re-mount” root partition in Write mode:
# /sbin/mount -uw /

And finally, we change the password of the root or any other account using a simple command:
# passwd root

Source: https://habr.com/ru/post/70360/


All Articles