Ready to Start Your Career?

Gaining Root Access on Mac OS

Tatianna 's profile image

By: Tatianna

September 27, 2018

Apple computers are coveted as one of the world’s most valuable brands for a reason. Their computers are stylish, easy to use, and are owned and displayed as status objects across the world. However, one feature Apple computers are not known for is robust security. Take the latest Mojave update for example...Anyway, in this article, we will look at a Mac OS function (not quite an exploit!) that can allow virtually any user with physical access to the device to gain complete root access.First, you need access to a computer running Mac OS. Unless modified to be otherwise, virtually every Apple computer runs some version of Mac OS (barring smartphones). Next, you want to press the “Command” key and the “S” key while the computer is booting up. If the computer is already on you will need to restart it. This will bring you to “Single User Mode” and display a full-screen command console at which you can enter system commands.After loading the command console enter this command to mount the hard drive’s file system:
  • /sbin/mount –wu /
Entering this command will load the computer’s memory into the filesystem to be used later on. The steps taken after loading the filesystem vary from user to user, but the end-goal is the same. For now, you want to enable network services by entering this command:
  • /sbin/SystemStarter
 Entering this next command will prompt you to enter a new root password for the device, granting you complete access:
  • passwd root
 After you have entered this command, enter your chosen password once to define it and a second time to confirm it. Enter this command next to shut down the computer immediately:
  • shutdown –h now
 You can now boot up the device and enter your new password, granting you complete root access. Some argue this is more a feature than an exploit as the device’s security is compromised once you gain physical access, but other operating systems have built-in security measures to prevent this.
Schedule Demo