Useful Tips

Change or reset macOS user account password

Pin
Send
Share
Send
Send


A funny story happened with my field laptop the other day. I found a video that talked about ways to bypass a user password. I decided to give it a try. And, to his extreme surprise, he turned the laptop into a brick.

And how did this actually happen?

In that “training video,” the unknown opened the command line, entered a special command, and received the user's password in clear text. I watched this material at two in the morning, so the sound was naturally muted. I don’t know if something useful was said there, but I still typed this command.

The team itself: net user username / random

Where username this is the name of our user, which must be accordingly replaced with something else.

As a result of executing this command, the result will appear in the console: “The Username password looks like: ohY-7Gnh”.

change the password of any user to a random character set

At that moment, when I saw the result of the command and realized that this was not my password, I thought that this method does not work. But he, his mother for the soul, acts! This command simply changed my password to the same "ohY-7Gnh" and I, of course, did not remember it. I was embarrassed by the phrase “looks like”: it kind of hinted that it was like a password, but it didn’t seem like a password, it looked something like this, but not exactly like that. In general, we say, doubt. Hello to localizers!

Essentially a team net user username / random it simply changes the user's password to a completely random (and, believe me, hard-to-remember) set of letters and numbers. You don’t even need to know the old password of this user! And the phrase "has the form" actually translates as "we changed the user's password for this."

I had only one user on my laptop, so the download option under a different account was cut off. The field laptop turned into a brick. The prospect of reinstalling the system, drivers, software, restoring settings loomed gloomily. In general, I had to use a stationary computer and an external DVD drive to boot from the CD and reset the password altogether, but I will put this out in a separate post. The password has been successfully reset, more precisely, replaced by the old one and now I am typing this text. Guess what?

On a field laptop, of course. Now I have several users (in reserve), the procedure for resetting the password from the Live-CD has been worked out and is familiar, so now you can study this wonderful command more closely.

It turns out that with this command you can change the password not only to a random set of characters, but also to a specific one:

net user username 123

where username is the name of the target user, and 123 is his new password.

Then I began to experiment.

Can I change the password for user 999 on behalf of 123?

- Yes, if user 123 has admin rights. For example, under user uiii we changed the password to the built-in administrator account, without knowing the old administrator password!

It is not necessary to know the administrator password - you can put him your password!

Can I change the password for someone else's user under Windows 7?

- Yes. You just need to create a link to the command line "cmd" and run the shortcut with administrator rights.

Can I change the password for someone else's user under Windows 8?

- Yes, if you are trying to change the password to a local user who is not registered in outlook.com (I did not conduct rigorous tests here, but this is real). And, of course, the command line should be run as administrator.

What does changing the password through net user give us?

  1. The ability to make a mess of a user who has not blocked his computer. Change his password to something random.
  2. The ability to access the personal files of the second user on the computer (for example, you are both admins, and the second user stores important data on the desktop where the second user cannot be reached)

Of course, this misfortune is easy to get rid of if you use the administrator account only when necessary. Remember the commandment “do not work under the root”!

This material is only for self-education. Do not use to the detriment.

Change Password

If the password is known and can be used to enter the account, it can be changed in the "Users and Groups" settings section:

  1. Select System Preferences from the Apple menu, then open the Users and Groups section.
  2. Select your username in the user list.
  3. Click the Change Password button and follow the on-screen instructions.

Password reset

If the password is forgotten or does not work, it may be possible to reset it using one of the methods described below. However, first try the following simpler solutions:

  • Make sure the characters are entered in the correct case. If Caps Lock mode is enabled on the keyboard, the Caps Lock symbol is displayed in the password field.
  • If a question mark is displayed in the password field, click it to view a password hint that may help you remember your password.
  • Try logging in without a password. If this works, then you can add the password by following the procedure for changing the password.
  • Try signing in with your Apple ID password used for iCloud. If this password has just been changed and the new password does not work, try the old password first. If this works, you can use the new password in the future.

Reset using Apple ID

On some versions of macOS, you can use the Apple ID to reset your password. Enter your password on the sign-in screen until you see a message that the password can be reset using your Apple ID. If this message does not appear after three attempts, it means that your account settings do not allow password reset using the Apple ID.

  1. Click next to the Apple ID message, then follow the on-screen instructions to enter your Apple ID and create a new password. Upon completion, you will be prompted to restart.
  2. Log in with the new password.
  3. Determine if you need to create a new keyring to enter.

Reset using a different administrator account

Knowing the name and password of the administrator account on a Mac, you can use this account to reset the password.

  1. Log in with the username and password of another administrator account.
  2. Select System Preferences from the Apple menu, then open the Users and Groups section.
  3. Click, then enter the administrator name and password again.
  4. Select your username in the user list.
  5. Click the "Reset Password" button and follow the on-screen instructions to create a new password:
  6. From the Apple menu, select "End Session".
  7. Log in to your account with a new password.
  8. Determine if you need to create a new keyring to enter.

Reset using Password Reset Assistant (FileVault must be enabled)

If FileVault is enabled, you can use the Password Reset Assistant to reset the password:

  1. On the login screen, wait about one minute until a message appears stating that you can turn off your Mac using the power button and then restart it in OS recovery mode. If this message is not displayed, the FileVault function is not enabled.
  2. Press and hold the power button until the Mac turns off.
  3. Press the power button to turn on your Mac.
  4. When the password reset window appears, follow the on-screen instructions to create a new password.
    If you need to connect to a Wi-Fi network, move the cursor to the top of the screen and select the desired network in the Wi-Fi status menu. To exit without resetting the password, select Apple menu> Restart.
  5. When finished, click Restart.
  6. If you were able to reset your password using the Password Reset Assistant, log in to your account with a new password.
  7. Determine if you need to create a new keyring to enter.

Reset with a recovery key (FileVault must be enabled)

If FileVault is enabled and you have a FileVault recovery key, this key can be used to reset the password.

  1. Enter the password on the login screen until a message appears stating that the password can be reset using the recovery key. If this message is not displayed after three attempts, the FileVault function is not enabled.
  2. Click next to the message. The password field will be replaced by the recovery key field.
  3. Enter the recovery key. Use uppercase characters and hyphens.
  4. Follow the on-screen instructions to create a new password; when finished, click "Reset Password".
  5. Determine if you need to create a new keyring to enter.

If you are unable to log in with the new password after restarting your Mac, try the following additional steps:

  1. Restart while holding down Command-R or one of the other macOS recovery keyboard shortcuts until the Apple logo or spinning globe appears.
  2. When the macOS Utilities window appears, choose Utilities> Terminal from the menu bar.
  3. In the Terminal window, enter resetpassword and press the Enter key to open the Password Reset Assistant shown above.
  4. Select “Login Password Doesn't Work,” then click “Next” and follow the on-screen instructions for your user account.

Create a new keychain for login, if necessary

After resetting the password and re-entering your account, you may receive a warning that the system could not unlock your keychain. This is expected as the user account passwords and keychains no longer match. Click the New Keychain button in the warning window.

If a warning about the keychain is not displayed or other messages are displayed asking for the old password, reset the keychain manually:

  1. Open the Keychain program in the Utilities subfolder of the Programs folder.
  2. Select "Settings" in the "Keychain" menu, then click the "Restore Default Keychain" button in the settings window. After entering a new password, the Keychain program creates an empty keychain of login keys without a password. Click the OK button.

If the “Restore Default Keychain” button is not displayed, close the settings window and select the “Keychain” keychain in the left part of the Keychain program window. Press the Delete key and then the “Delete links” button.

  • Select Log Out from the Apple menu to return to the sign-in screen.
  • Log in to your account with a new password. Your account passwords and keychains now match again.
  • Pin
    Send
    Share
    Send
    Send