You need to sign in as administrator, but there aren't any administrators on this pc

Scenario (i.e., this was my situation)

  • You are able to log in normally to windows 10 (with your own account, set as standard or as administrator, and with the usually hidden SuperAdministrator account)
  • Safe mode and safe mode with networking are working
  • Safe mode with command prompt shows no administrator accounts and this message: You need to sign in as an administrator to continue, but there aren't any administrator accounts on this PC..
    Hence you aren't able to use the safe mode with command prompt.
  • Your C:\Recovery\WindowsRE folder contains the winre.wim (windows image) file necessary to get the windows advanced startup settings

Solution

Re-register the winre image with:
reagentc /disable
reagentc /enable

Additional information:

reagentc /info (ran from an elevated command prompt) shows:
Read More:
Partition4 is my C:, i.e. my system partition.

bcdedit (ran from an elevated command prompt) shows recoverysequence {4a081ca8-71be-11e6-80cd-eca86b8ec766} (under windows boot loader):
Read More:

I got this problem after I've accidentally removed all administrator accounts from netplwiz = control userpasswords2 (user accounts advanced menu?) some weeks/months ago.
I consider that a BUG in windows: we shouldn't be able to remove all administrator accounts!!!
I can't remember how I solved that problem; that's why I'm posting this: to remember how I did it, in the hope it could be useful for someone else.
 
Last edited:
I'm a little confused - not unusual when it comes to the inner workings of the OS, but also I'm still on first mug of coffee.

In your first two scenarios, a user's Administrator account is seen and totally usable. That is, the user with an Administrator account can log in normally, into "Safe Mode", and into "Safe Mode with Networking" with no problems, correct?

But if the same user tries to use the same Administrator user account to boot into "Safe Mode with Command Prompt", he/she is told there are no Administrator accounts. Right?

If that is the scenario, I am not understanding why you say all the Administrator accounts were "removed" (which I agree should not be allowed). What it looks like to me is when booting into "Safe Mode with Command Prompt", the Administrator account is not being recognized as an account with Administrator privileges. Am I missing something?
 
Not sure I understood your question.
That was my situation: I couldn't log to the safe mode with command prompt because it didn't find any administrators (but I had two administrators working in normal conditions: the one with my MS account and the hidden administrator; this last one wasn't hidden because I activated it).

More information: some weeks/months ago I removed all the administrators, but I can't remember how I fixed it.
Then some days ago I found I couldn't log in at all when trying to use the safe mode with command prompt.
Why I had to go to safe mode with command prompt?
Because I found I couldn't log in to new windows accounts.
I could create new accounts through the windows GUI, but, when I tried to log in to the new created account, I always (i.e., with each new account) received the message The user profile service service failed the sign-in. User profile cannot be loaded..
Then, I tried to fix this last problem with:
  • tweaking.com windows repair "Repair reparse points": it didn't fix it (but it fixed my reparse points and junctions).
  • chkdsk (on all partitions): it didn't fix it (but it adjusted few errors in my partitions)
  • substitute the c:\users\default folder with one present in a system image I've done with paragon B&R16 in September 2016 (after the W10 anniversary update, most likely): this fixed it, finally (and luckily).

Indeed I remembered I likely removed some empty folders in the c:\users\default folder (and not only there), thinking they weren't necessary (but, in fact, they are necessary...:banghead:).
It also seems now I'm able to run successfully the perfmon /report. :rofl12:
 
Last edited:
Very strange indeed. For sure, I agree that Windows should not let all admin accounts get deleted. Whether that is a bug or a design decision/oversight, I don't know. But I do think you should report this Microsoft. You should be able to do that from within W10 using the Feedback Hub app.
 
I found other things that were not working (because the substitution with paragon B&R16 fixed a thing and broke another one; maybe I should have made the substitution outside windows): windows start, windows notifications, windows apps (I didn't notice windows start because I'm using ClassicShell at the moment, and I'm not using any windows apps and notifications. Most used apps I'm using, if they are apps, are MSIE, calculator/calc, windows start, taskbar and notifications/"new control panel").
The command to re-register all the windows apps found on some websites didn't work:
Code:
Get-AppXPackage -AllUsers | Foreach {Add-AppxPackage -DisableDevelopmentMode -Register "$($_.InstallLocation)\AppXManifest.xml"}
Hence I modified it in this way (three lines of code):
Code:
# finds and remembers all app paths
$AppPaths = (Get-AppxPackage -Name "*").InstallLocation 

# appends the manifest at the end of each path and remembers it
$ManifestPaths = $AppPaths | Foreach-Object { $_ + "\Appxmanifest.xml" } 

# registers all manifests
$ManifestPaths | foreach-object { Add-AppxPackage -DisableDevelopmentMode -Register $_ }
It seems now everything is correctly working (hopefully).
At least in the main user profile (I didn't check the other profiles yet).
 
Last edited:
Well, all that code might as well be in French. I made a career out of avoiding programming when possible - even though I worked for 10 years in a software development company! ;)

Anyway, I am glad you have it sorted out.

As for ClassicShell, I use Start10 and also don't use any Windows apps unless I have to. I also use MSIE and the Calc. Most of the programs I use regularly I have in shortcuts on Quick Launch - which I am glad is still included in W10.
 
The creation of new profiles wasn't perfect: the new profile was created, but the start menu and the action centre didn't work.
The power shell code I have posted above didn't work directly inside the new profile.
I modified the first line a bit: $AppPaths = (Get-AppxPackage -Name "*" -user MyWorkingUser).InstallLocation
But then I got this message for every packages:
Add-AppxPackage : Deployment failed with HRESULT: 0x80073CF6, Package could not be registered. error 0x80070002: Windows cannot register the package because of an internal error or low memory.

Hence:

  • I tried to get all the folders and the files that should have been present in the default folder from the "default.migrated", "default.old", and my user profile folders. I tried to create a new profile: still no joy.
  • I recreated all the junctions from an elevated command prompt with the mklink /j command. I tried to create a new profile: still no joy.
    I used that command because it seems those junctions can't be copied.
    I tried to copy them with simple copy, xcopy and robocopy... Then I thought it could be easier to make them manually (instead of trying to learn the methods to use with xcopy and robocopy) and so I did it.
    Examples (I used Italian names for the junctions):
    Read More:
    This is NOT the complete list.
  • I got the windows 10 installation disk (I have previously downloaded it through MS website, some months/years ago, and burned it in a CD), found the boot.wim (in the sources folder) and mounted it using dism /mount (from an elevated command prompt).
  • Then I copied the default folder over my (not working) default folder. It contains six ntuser files (mine were corrupt, obviously):
    1. ntuser.dat
    2. ntuser.dat.log1
    3. ntuser.dat.log2
    4. NTUSER.DAT{67e8366e-7ecf-11e5-80df-e41d2d718e10}.TM.blf
    5. NTUSER.DAT{67e8366e-7ecf-11e5-80df-e41d2d718e10}.TMContainer00000000000000000001.regtrans-ms
    6. NTUSER.DAT{67e8366e-7ecf-11e5-80df-e41d2d718e10}.TMContainer00000000000000000002.regtrans-ms
  • "Unmounted" (dismounted?) the windows 10 image using dism /unmount (from an elevated command prompt).
  • And finally, after I discovered the right-click on start didn't work (on a new test profile), I added (copied) to the default profile the winx folder (taken from my user profile) in C:\Users\default\AppData\Local\Microsoft\Windows.
  • The creation of new user profiles seems to be fixed, finally!


Lessons learned/learnt (third lesson here, at left):

  1. Don't try to remove all administrators just for curiosity (curiosity killed the BRAT).
  2. Don't mess with the default folder (if you intend to create new WORKING user profiles).
 
Last edited:

Has Sysnative Forums helped you? Please consider donating to help us support the site!

Back
Top