System Error 5 – Fixing ‘Access is Denied’ for net user administrator /active:Yes

administratorcmd.exe

I need to give the administrator 's authorizations to delete a folder, I'm on Windows 7 ultimate x64.

To do that I run cmd.exe and run the command below:

net user administrator /active:Yes

However, I get the following:

System error 5 has occurred.

Access is denied.

I already run the net localgroup Administrators to check either my account is listed among the administrator members, and it is.

Why do I get this error and how can I give the Administrator's authorization to delete my folder?

Best Answer

Two things I'm seeing here that could cause this:

  1. You are not part of the administrators group or you do not have administrator permissions on the box.
  2. You need to run command prompt from an elevated permission level.

Easiest way to check if you are an administrator on your machine is to list all administrators on the box:

net localgroup Administrators

If you are not listed there, you are not an administrator. It will also list the groups that are admins on the machine. So for example, if I was a part of the Domain Admins group and the policy for Domain Admins was administrator access on the machines, then I would have admin access without being listed in the output of the command.

To check what groups you are a part of, you can use whoami /groups which will list all groups and aliases that the logged in user is a part of. And based off of all of this data, you'll then know if you are an admin or not.

Also, as Eugen said in the comments, make sure you're using the right slashes in your commands.

Related Question