I recently learned about Linux, plus the current notebook is a Mac, self-class Linux command and file system management, so try to use the root account, but a few months ago to initialize the root account password, now found to forget the root password, All kinds of information on the Internet to try to reset the root password or retrieve root password, are not successful, comprehensive online various methods and my exploration, and finally found that can take the following two steps to achieve the root password reset:
(1) Log in to the system with a normal user name and open the terminal terminal,
Input: sudo bash
password:***** (current user's password)
After success, enter the bash-3.2# command mode.
(2) in bash-3.2# command mode,
Input: sudo passwd root
New password:****
Retype new password:****
After successful and root password modification is complete!
Verify that the modification was successful:
After switching to a normal user,
Input: su root
password:**** (new root password)
After successful entry into the sh-3.2# command mode, you can also log off the current user with the root user name and the new password to log on to the system for use.
Mac OS X 10.11.4 forgot root password how to handle