I'm testing Windows Server 2016 (instead of 2012) but unchecking the "Users must enter a user name and password to use this computer" box in control userpasswords2 does NOT seem to let the machine auto-login with the provided account on boot.

Is there another method that works on 2016?

migrated from superuser.com Mar 25 '17 at 13:57

This question came from our site for computer enthusiasts and power users.

  • 5
    Why are you considering this in the first place? – Seth Mar 25 '17 at 9:56

Use Sysinternals Autologon. It stores the credentials in the registry more securely than other methods.

Autologon for Windows v3.10
https://technet.microsoft.com/en-us/sysinternals/autologon

  • This didn't work. The system does not autologon. – Ben Guild Apr 4 '17 at 5:55
  • It should have as Autologon has support for Windows Server 2008 and higher. Could there be something interfering you have tried before running Autologon? Undo them first. – Esa Jokinen Apr 4 '17 at 6:02
  • 1
    @BenGuild: Do you have the legal notice security settings defined? Interactive logon: Message text for users attempting to log on or Interactive logon: Message title for users attempting to log on. – Greg Askew Apr 4 '17 at 9:29
  • 1
    @GregAskew I disabled the checkmark in control userpasswords2 but the system still seems to not autologon. Pretty frustrating. This worked on 2012 – Ben Guild Apr 5 '17 at 3:10
  • 1
    Any solution? The above solutions does not work for me either on windows server 2016 (no domain) – Alkampfer Jul 14 '17 at 12:28

While it really is an extremely bad idea it is still possible. However, the user must have a password AND the password is revealed to anyone that has access to HKLM. Most likely your desired user is even in the Domain Admins group.

As described in TechNet documentation AutoAdminLogon, you can add

[HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows NT\CurrentVersion\Winlogon]
"AutoAdminLogon"="1"
"DefaultUserName"="your-admin-account"
"DefaultDomainName"="yourdomain.local"
"DefaultPassword"="YourAdminPasswordRevealedToThePublicByAStupidAdmin"

If this is a test environment not connected to your network and you are using a local admin account please be welcome to do so. Otherwise: just don't do it.


ADDITION: This doesn't answer the original question, but I just wanted to add a notice that this is still a suitable way to create a non-authenticated "kiosk machine", if you also add

[HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows NT\CurrentVersion\Winlogon]
"ForceAutoLogon"="1"

for logging the user automatically in right after logout. It your user is on Domain Guests group the profile will be automatically deleted on every logoff and a fresh profile created based on default profile. You could also change the shell for example if you want to launch a web browser instead of the default explorer.exe. Then, closing browser window will cause deletion of all cache and browsing history.

[HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows NT\CurrentVersion\Winlogon]
"Shell"="C:\Program Files (x86)\Google\Chrome\Application\chrome.exe"
  • Isn't the whole point of using control userpasswords2 to avoid having to add raw password details to the registry.? Either way, that and Greg's solution unfortunately didn't work. – Ben Guild Apr 4 '17 at 5:57
  • 1
    Hi, just a note that although this does qualify as a bad idea in most cases, there are cases where this is perfectly acceptable, ex. in my current case where I am setting up a server image for testing purposes.. i.e. we need it to spin up, execute the tests and shut down again. – Stefan Z Camilleri Jul 26 '17 at 21:05
  • 1
    If you only configure the autoadminlogin key, the checkbox will appear. Then you can check, and uncheck it to enter your credentials, which will NOT be saved in the registry in plain text. – Brian D. Sep 1 '17 at 3:36
  • I have a game server in where the game requires the user to be logged in to start, so this in conjunction with a scheduled task that runs on login works perfectly to get it up again after a server restart. – JensB Jan 27 at 9:02

I also struggled to get this to work on a (non-Domain connected) Windows Server 2016.

I noticed that there was CTRL-ALT-DELETE requirement on login so thought I would try to disable this...and suddenly auto-login began to work!

Full steps I used:

To set auto-login account

  • Start > Run > netplwiz (as explained in other answers)
  • Un-tick "Users must enter a user name and password to use this computer."
  • Provide login credentials to be used for auto-logon

Disabling CTRL+ALT+DEL logon requirement

  • Start
  • Type 'Local Security Policy' (no quotes) and click on item matching this name
  • Open 'Local Policies'
  • Open 'Security Options'
  • Locate Policy called 'Interactive logon: Do not require CTRL+ALT+DEL'
  • Double click on it
  • Set to 'Enabled'

After applying this change and rebooting the server it managed to successfully auto-login to the account I had provided.

  • This worked for me. Thanks! – phocks Jun 9 at 3:02
  • Unfortunately this is not available for a Windows 2016 domain controller .... – daisy Dec 2 at 14:28

Wow, I have been struggling with this for a few hours thinking that Microsoft had blocked this in the version I was using (Server 2016, 10.0.14393) or it only worked for non-admins or... most likely, I was an idiot.

The problem was that I am using it for testing on a Hyper-V server, and the virtual machine connection isn't really the "console" session when Enhanced Session is enabled. It uses RDP to create a new session.

The fix?

In Hyper-V, click View - Uncheck Enhanced Session.

Photo: Disable Enhanced View

You'll immediately be redirected to the console session which should be logged in.

To see if this is your issue as well, run the command query user. If you're not actually on the console, you'll see a different SESSIONNAME.

(Normal Session)
C:\Windows\system32>query user
 USERNAME              SESSIONNAME        ID  STATE   IDLE TIME  LOGON TIME
updater               console             1  Active      none   7/31/2018 3:51 PM

(Enhanced Session)
C:\Windows\system32>query user
 USERNAME              SESSIONNAME        ID  STATE   IDLE TIME  LOGON TIME
>updater               31c5ce94259d...     1  Active          .  7/31/2018 3:51 PM

Some more details about this and what enhanced session does here and other options: https://www.tenforums.com/tutorials/57136-turn-off-hyper-v-enhanced-session-mode-windows-10-a.html

Hope this helps someone else!

I realize this is an old post but it doesn't appear there was a direct answer offered to Ben's question.

It's simple, run netplwiz instead of controluserpasswords2, works for Win 10 as well.

protected by womble Aug 2 at 6:28

Thank you for your interest in this question. Because it has attracted low-quality or spam answers that had to be removed, posting an answer now requires 10 reputation on this site (the association bonus does not count).

Would you like to answer one of these unanswered questions instead?

Not the answer you're looking for? Browse other questions tagged or ask your own question.