Set Windows User Account with a Random Password

There are many free utilities and websites capable of generating a random password for you. This might be useful if you cannot think or decide what unique password to use for your internet banking, emails, user account, and etc. A good password should consist of numbers, uppercase/lowercase letters, and symbols with at least 8 characters so that brute force attacks would potentially take so long as to be pointless.

If you’re using a shared computer, it is important that your user account password strength is strong enough to prevent tools like Ophcrack or Login Recovery from cracking it. If someone cracks your user account password, they have access to your files and possibly passwords that are saved in your web browser. They can also access your account and files without you knowing about it, unlike resetting or changing the password.

If you go User Accounts shortcut in Control Panel or the Computer Management tool, you can only find the option to change or set a new password. There’s nothing helpful about generating a secure random password. However, there is a command line tool built into Windows called Net that can create a random password for a user account.

Set Random User Account Password From Command Prompt

To automatically generate a random password for a user account using the Windows Net.exe tool, follow the steps below. It works on all versions of Windows from XP up to Windows 11.

1. Click the Start button or press the Win key and type cmd followed by holding Ctrl+Shift and pressing Enter.

2. Click the Yes button on the User Account Control window (If UAC is enabled) and a Command Prompt window will appear.

3. Type the following command to generate a random password for the user account. Simply replace the word Raymondcc in the command line below with the username that you want to set a random password. Type “Net User” on its own to get a list of account names available on the computer.

Net User Raymondcc /random

The new random password is generated and shown with the status message saying “The command completed successfully“. There is no need to supply the current password for the user account. The password length is set to eight characters long and cannot be changed. It will consist of upper and lower case letters, numbers, and special characters.

Net user random command

Make sure to memorize or save the password because you won’t be able to retrieve it once you close the console window. However, if you lose the password, you can simply run the Net random command again to get a new password (provided you haven’t logged out of Windows before doing so).

Getting An Error Running the Net Command

If you get the error message “System error 5 has occurred. Access is denied”, it means that your account doesn’t belong to the administrator group or you did not launch the command prompt as administrator. Pay special attention to step 1 above where we suggest you hold Ctrl+Shift followed by pressing Enter. Alternatively, right click cmd.exe in the Start menu and select “Run as administrator”.

Net user random error 5

This method will only work for local accounts and not online Microsoft accounts, it should also work on a domain.

Set User Account Password From a GUI Utility

While setting a random password from the command line for a user account is not that difficult, many people don’t like using a text based interface like Command Prompt. However, there is a simple little tool available where you can do the same thing from the comfort of a graphical user interface. And best of all, it’s made by us!

The Raymondcc User Account Password Changer (RUAPC for short) is a portable tool that we created back in 2017 to quickly and easily change or clear the passwords for Windows local user accounts. It includes an option to set a random password the same as the Net command does.

User account password changer

All you have to do is run the program (administrator access is required) and select a user account from the dropdown list. Check the “Random Password” box and click the Change button. If you are unhappy with the password it generates, simply press the Change button again to get a new one. Similar Net commands to above are run in the background.

Download User Account Password Changer

We also have a slightly modified version of the original tool that performs the extra task of copying the created password to the clipboard. This makes it easier to save or memorize the password after the tool has been closed (because you can’t retrieve it after you click OK). However, this small change does make the tool more prone to being detected as malicious by security software such as Windows Defender.

Download User Account Password Changer (modified for save to clipboard)

10 Comments - Write a Comment

  1. S KARTHIKEYAN 4 years ago
    • HAL9000 4 years ago
  2. Darren 5 years ago
    • Derek Melber 5 years ago
  3. Derek Melber 5 years ago
  4. cent 5 years ago
  5. Sarah Homer 6 years ago
  6. Barath 7 years ago
    • HAL9000 7 years ago
  7. Nerve 17 years ago

Leave a Reply

Your email address will not be published. Required fields are marked *

Note: Your comment is subject to approval. Read our Terms of Use. If you are seeking additional information on this article, please contact us directly.