With an administrator account on the computer, you can adjust system settings and make changes to the file system. Regardless of the operating system used, you can change the administrator account password via the command line. On Windows computers, the administrator account is turned off by default and needs to be activated manually when you want to use it.
Step
Method 1 of 3: On Windows Computer
Step 1. Understand the different types of administrator accounts
Windows automatically disables the administrator account on all versions of the Windows operating system released after XP. This account is turned off for security reasons because the first personal account you create is automatically set as an administrator account. The following methods will explain in detail how to activate a disabled administrator account and set a password for the account.
If you want to change the personal administrator account password, open the Control Panel and select the "User Accounts" option. Select a personal administrator account and click "Create a password" or "Change your password"
Step 2. Press the button
Win and type "cmd".
You can see " Command Prompt " in the list of search results.
Step 3. Right-click "Command Prompt" and select "Run as administrator"
Step 4. Type
net user administrator /active:yes and press Enter.
The operating system's default administrator account will be activated on the computer. Usually, users activate this account so that they can do automation work without having to see the “User Access Control” message every time the system settings are changed.
Step 5. Type
netuser administrator * and press Enter.
With this step, you can change the administrator account password.
Step 6. Type in the password you want to use
Typed characters will not be displayed. Press Enter key when finished entering the password.
Step 7. Re-type the password to confirm
If the two password entries do not match, you will need to re-enter the password you want to use.
Step 8. Type
net user administrator /active:no and press Enter.
The administrator account will be disabled. When not in use, it's a good idea to deactivate the account. Once you have set the password and performed the required actions via the administrator account, deactivate the account via Command Prompt.
Method 2 of 3: On MacOS X. Computers
Step 1. Understand the process that needs to be followed
You can use single user mode to reset your Mac computer password in case you forget it. You do not need administrator access to perform this procedure.
Step 2. Restart the computer and hold down the button
Command+S.
If you keep holding down the keys while the computer is reloading, you will be taken to a command line window.
Step 3. Type
fsck -fy and press Returns.
A scan will be performed on the hard drive for errors. This process takes a few minutes. A scan will need to be performed before you can move on to the next step.
Step 4. Type
mount -uw / and press Returns.
This way, you can make changes to the file system.
Step 5. Type
administrator password and press Returns.
You can change the password for any user account by entering the account name in place of the "Administrator" name.
Step 6. Enter the new password twice
You will be asked to enter a new password entry, and type it again to confirm the entry. Entries you can't see as they're typed.
Step 7. Type
reboot and press Returns.
The computer will restart and OS X will load normally. The administrator account can now be used with the new password.
Method 3 of 3: On Linux Computer
Step 1. Understand the risks before proceeding
Linux is designed so that you can do administrative work without having to log into an administrator or root user account. Therefore, it is highly recommended that you use the sudo command to perform actions that require root access instead of logging into the root account itself. Since you can use the sudo command and combine it with the user's password to make the master change (root), you don't need to set a password for the root account. However, if you want to set a password, keep reading this method.
Step 2. Open Terminal
You need to change the password through the Terminal program which can be opened via the taskbar or by pressing the shortcut Ctrl+Alt+T.
Step 3. Type
sudo passwd and press Enter.
You will be asked to enter the user password at this stage.
Step 4. Enter the new root password
After entering the user password, you will be asked to create a new root password. Enter the password twice to confirm it. The password entry will not appear on the screen as it is typed.