Windows restricts privileged commands to be executed only from elevated administrator command prompt. Even if you are an administrator on the PC, you may run into the error ‘System error 5 has occurred. Access is denied’.
C:\>net user techblogger /add System error 5 has occurred. Access is denied.
To fix the issue, open elevated command prompt and run the same command.
Now the command would run fine.
C:\Windows\system32>net user techblogger /add The command completed successfully. C:\Windows\system32>
There could be other cases where one runs into this error. If you have got this error, let us know what was the instance and how you could fix it.