Download ArticleDownload Article

Your computer's Administrator account allows you to adjust system settings and make changes to the filesystem. Regardless of your operating system, you can change the administrator account password using the command line. In Windows, the Administrator account is disabled by default, and will need to be enabled if you want to use it.

Method 1
Method 1 of 3:

Windows

Download Article
  1. How.com.vn English: Step 1 Understand the different types of administrator accounts.
    Windows creates a disabled Administrator account automatically in all versions of Windows after XP. This account is disabled for security reasons, as the first personal account you create is an administrator by default. The following method will detail enabling the disabled Administrator account and then setting a password for it.
    • If you want to change your personal administrator account's password, open the Control Panel and select the "User Accounts" option. Select your personal administrator account and then click "Create a password" or "Change your password".
  2. How.com.vn English: Step 2 Press the .
    Win key and type "cmd". You should see "Command Prompt" appear in the list of search results.
    Advertisement
  3. Step 3 Right-click on "Command Prompt" and select "Run as administrator".
  4. How.com.vn English: Step 4 Type .
    net user administrator /active:yes and press Enter. This will enable the Administrator account on the computer. The most common reason for activating the Administrator account is to perform automation work without having to deal with the User Access Control message appearing every time a system setting is changed.
  5. How.com.vn English: Step 5 Type .
    net user administrator * and press Enter. This will allow you to change the Administrator password.
  6. How.com.vn English: Step 6 Type the password you want to use.
    Characters will not appear as you type. Press Enter after typing the password.
  7. How.com.vn English: Step 7 Retype the password to confirm it.
    If the passwords do not match, you'll have to try again.
  8. How.com.vn English: Step 8 Type .
    net user administrator /active:no and press Enter. This will disable the Administrator account. It is not recommended to keep the Administrator account active when you're not using it. Once you've set your password and performed any actions you need to as the Administrator, disable it through the Command Prompt.
  9. Advertisement
Method 2
Method 2 of 3:

OS X

Download Article
  1. How.com.vn English: Step 1 Understand the process.
    You can use Single User Mode to reset the administrator password for your Mac in case you have forgotten it. You don't need administrator access to perform this procedure.
  2. How.com.vn English: Step 2 Reboot the computer and hold .
    Command+S. If you continue to hold these keys as the computer boots, you will be taken to the command line.
  3. How.com.vn English: Step 3 Type .
    fsck -fy and press Return. This will scan your hard drive for errors, which may take a few minutes. It is required in order to proceed.
  4. How.com.vn English: Step 4 Type .
    mount -uw / and press Return. This allows you to make changes to the filesystem.
  5. How.com.vn English: Step 5 Type .
    passwd Administrator and press Return. You can change the password for any user account by entering the user account name instead of "Administrator".
  6. How.com.vn English: Step 6 Enter your new password twice.
    You'll be prompted to enter your new password and then enter it again to confirm it. You won't see the password as you're typing.
  7. How.com.vn English: Step 7 Type .
    reboot and press Return. This will reboot your computer and load OS X as normal. Your Administrator account will now use the new password.[1]
  8. Advertisement
Method 3
Method 3 of 3:

Linux

Download Article
  1. How.com.vn English: Step 1 Understand the risks before proceeding.
    Linux is designed so that you can perform administrator tasks without actually logging in as the administrator, or "root", user. As such, it is highly recommended that you use the sudo command to perform actions that require root access instead of logging in as root. Since you can use sudo combined with your own user password to make root changes, you don't actually need to set a root password. If you do want to set one, read on.
  2. How.com.vn English: Step 2 Open the Terminal.
    You'll be changing the password through the Terminal, which can be opened from the task bar or by pressing Ctrl+Alt+T.
  3. How.com.vn English: Step 3 Type .
    sudo passwd and press Enter. You will be prompted for your user password.
  4. How.com.vn English: Step 4 Enter your new root password.
    After entering your user password, you'll be prompted to create the new root password. You'll be prompted to enter it twice to confirm it. You won't see the password on the screen as you type it.[2]
  5. Advertisement

Community Q&A

Search
Add New Question
  • Question
    Why can't I turn on the terminal?
    How.com.vn English: Community Answer
    Community Answer
    It depends on your OS. In Windows, you can press win+r and type cmd in to the run window. In linux, you can press ctrl+alt+t or search for the terminal in the menu of the DE you chose. Never tried Mac.
  • Question
    How do I keep others from using my computer?
    How.com.vn English: Community Answer
    Community Answer
    Usually you have your own account with a password. If you don't want anyone logging into your computer, then don't tell anyone your password. If you assume someone knows your password, change it immediately.
  • Question
    When my PC starts and I hit F2 or F12 for the boot options, it asks for a password. I never set one. What do I do?
    How.com.vn English: Community Answer
    Community Answer
    Enter nothing for the password. If that does not work, press F8 for the boot options. If that does not work, start windows normally, open cmd as administrator, and then type this in: net user (your user account) * and then type nothing for the password. Then restart the PC, go to the boot options, and then enter nothing for the password.
Ask a Question
200 characters left
Include your email address to get a message when this question is answered.
Submit
      Advertisement

      Video

      Tips

      Submit a Tip
      All tip submissions are carefully reviewed before being published
      Thanks for submitting a tip for review!

      About This Article

      How.com.vn English: Chiara Corsaro
      Co-authored by:
      Phone & Computer Repair Technician
      This article was co-authored by Chiara Corsaro. Chiara Corsaro is the General Manager and Apple Certified Mac & iOS Technician for macVolks, Inc., an Apple Authorized Service Provider located in the San Francisco Bay Area. macVolks, Inc. was founded in 1990, is accredited by the Better Business Bureau (BBB) with an A+ rating, and is part of the Apple Consultants Network (ACN). This article has been viewed 198,451 times.
      How helpful is this?
      Co-authors: 11
      Updated: March 25, 2024
      Views: 198,451
      Categories: Operating Systems
      Article SummaryX

      To set an administrator password on Windows, first, press the Windows key, then type “cmd.” You should see “Command Prompt” appear in the list of search results. Right-click on it and select “Run as administrator.” Then, type “net user administrator” followed by an asterisk, and press enter, which will allow you to change the administrator password. Simply type in your new password and hit enter again. You’ll need to type in the password a 2nd time to confirm it. To learn how to set an administrator password on OS X or Linux, read on!

      Did this summary help you?

      Thanks to all authors for creating a page that has been read 198,451 times.

      Is this article up to date?

      ⚠️ Disclaimer:

      Content from Wiki How English language website. Text is available under the Creative Commons Attribution-Share Alike License; additional terms may apply.
      Wiki How does not encourage the violation of any laws, and cannot be responsible for any violations of such laws, should you link to this domain, or use, reproduce, or republish the information contained herein.

      Notices:
      • - A few of these subjects are frequently censored by educational, governmental, corporate, parental and other filtering schemes.
      • - Some articles may contain names, images, artworks or descriptions of events that some cultures restrict access to
      • - Please note: Wiki How does not give you opinion about the law, or advice about medical. If you need specific advice (for example, medical, legal, financial or risk management), please seek a professional who is licensed or knowledgeable in that area.
      • - Readers should not judge the importance of topics based on their coverage on Wiki How, nor think a topic is important just because it is the subject of a Wiki article.

      Advertisement