📜 ⬆️ ⬇️

Mac OS - change root password

After long dances with a tambourine and a couple of sessions of black magic, I still learned how to crack MacOS X in order to change the root password (a) and, accordingly, all users of the system. Yes, it is possible to do this with the help of a boot disk, but not all boot disks fit all apple computers, and therefore playful little hands went into the role!

So, it's pretty simple:
  1. Reboot into singe-user mode - to do this, you need to keep cmd-s while booting the computer
  2. Here we are logged in as root user
  3. Next you need to mount the hard disk with the command / sbin / mount -wu /
  4. Then start all services with the / sbin / SystemStarter command
  5. Then there are two options.
    a) either by the nidump passwd command. get a list of all system users and traditional passwd change the password of the user of interest to us
    b) either (if it is a Tiger) write sh / etc / rc - and the system will boot to a victorious end, and there, again - complete freedom of action.


Immediately pay attention to the fact that
  1. The keychain password does not change.
  2. If some files are closed by FileVault then root will never see them.
  3. Well and, of course, a further scenario of development of events immediately suggests itself:

If we don’t want the owner to know that we were in the system, then we just whistle carefully the master.passwd file and break it at home in the hope of finding a password, or we will create an additional “transparent” user with admin rights
Actually, this is what I am writing for: how to make the computer ask for a password when rebooting into single user mode?

')

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


All Articles