Автовход в windows server 2012 r2

In earlier versions, it was possible to enable autologon to a Windows Server R2 by disabling of "control userpasswords2" option "Users must enter a user name and password to use this computer" (of course, the credentials have to provided and the option has to be available).

RRS feed

  • Remove From My Forums
  • Question

  • In earlier versions, it was possible to enable autologon to a Windows Server R2 by disabling of «control userpasswords2» option «Users must enter a user name and password to use this computer» (of course, the credentials have to provided
    and the option has to be available).

    This feature seems to no longer be supported since a windows update earlier this year. I could not nail it down to a certain KB-ID precisely, sorry.

All replies

  • Hi,

    Based on my research and test, Control userpasswords2 couldn’t be used to enable auto-logon if the server is a DC or domain member server.

    To enable auto logon, we could follow the steps in the following KB article:

    https://support.microsoft.com/en-us/help/324737/how-to-turn-on-automatic-logon-in-windows

    If you need further help, please feel free to let us know.

    Best Regards,

    William


    Please remember to mark the replies as answers if they help and unmark them if they provide no help.
    If you have feedback for TechNet Subscriber Support, contact
    tnmff@microsoft.com.

    • Proposed as answer by

      Tuesday, November 14, 2017 1:06 PM

  • Hi,

    Just checking in to see if the information provided was helpful. Please let us know if you would like further assistance.

    Best Regards,
    William


    Please remember to mark the replies as answers if they help and unmark them if they provide no help.
    If you have feedback for TechNet Subscriber Support, contact
    tnmff@microsoft.com.

  • Hope this helps!


    Solution for Active Directory auditing, monitoring and management.

    • Proposed as answer by
      RomanMulley
      Wednesday, November 15, 2017 11:08 AM

  • Hi,

     
    Just checking in to see if the information provided was helpful. Please let us know if you would like further assistance.

     
    Best Regards,
    William


    Please remember to mark the replies as answers if they help and unmark them if they provide no help.
    If you have feedback for TechNet Subscriber Support, contact
    tnmff@microsoft.com.

  • Hi,

    Was your issue resolved? 

    If you resolved it using our solution, please «mark it as answer» to help other community members find the helpful reply quickly.
    If you resolve it using your own solution, please share your experience and solution here. It will be very beneficial for other community members who have similar questions.
    If no, please reply and tell us the current situation in order to provide further help.

    Best Regards,
    William


    Please remember to mark the replies as answers if they help and unmark them if they provide no help.
    If you have feedback for TechNet Subscriber Support, contact
    tnmff@microsoft.com.

  • You can Use netplwiz.exe in the windowssystem32 directory

    its the same that control userpasswords2

    Best Regards

  • Use the this one. I tried it, and it works.

    If you use the full registry method, then your password will be saved in plan text, which could be a security issue. To get around this you can force the checkbox to appear no matter what.

    — Open the registry and navigate to «HKLMSOFTWAREMicrosoftWindows NTCurrentVersionWinlogon».
    — Create ONLY the String «AutoAdminLogon» with a value of «1».
    — Close the registry editor and open a CMD prompt.
    — Type «control userpasswords2» without the quotes.

    You will now see the same dialog the OP posted but with the checkbox «Users must enter a user name and password to use this computer» and it will be unchecked.

    — Re-check the box and hit Apply.
    — Then uncheck it again and hit Apply or OK and save your UID and PWD.

    The machine will auto login, without storing your credentials in the registry in plain text. If you had previously did the full registry method before with UID and PWD I would delete them before doing this, however checking the box might delete the keys
    for you.

    • Proposed as answer by
      jtczrt
      Monday, August 12, 2019 3:29 PM


Прочитано:
4 876

Задача: какие шаги нужно сделать чтобы заработал AutoLogon под указанным пользователем на рабочей станции под управлением операционной системы Windows Server 2012 R2 состоящей не в домене.

Просто порой хочется быстроты в настройке, а судорожно вспоминать как это делается нет времени. И вот для этого я пишу для себя заметки, чтобы посредством своего блога через поиск и по ключевому слову(ам) найти нужное в данный момент времени. А такое происходит часто если не сказать очень часто.

AutoLogon ->  это когда Ваша операционная система Windows Server 2012 R2 под необходим пользователем автоматически загружается, а не останавливается на окне авторизации где нужно указать Login и Password. Я применяю такую настройку если в планировщике задач запускаются процессы которые не могут работать в другом режиме, т. е. Им нужен режим интерактивности или работает экран и его содержимое транслируется для клиентов. Клиенты видят как продвигается ремонтные работы с их автомобилем, какие запчасти установлены и т. д.

Поехали, в роли учетной записи выступит учетная запись с логином ekzorchik и паролем 712mbddr@. Она обладает правами Администратора на серверной редакции операционной системы Windows Server 2012 R2.

Действия по настройке сводятся к следующим строкам которые нужно выполнить в консоли командной строки, но до этого я авторизовался в системе под учетной записью Administrator:

Win + X — Command Prompt (Admin)

C:Windowssystem32>net user ekzorchik 712mbddr@ /add

C:Windowssystem32>net localgroup Administrators ekzorchik /add

C:Windowssystem32>net user ekzorchik /active

C:Windowssystem32>reg add "HKLMSOFTWAREMicrosoftWindows NTCurrentVersionWinlogon" /v AutoAdminLogon /t REG_SZ /d 1 /f

C:Windowssystem32>reg add "HKLMSOFTWAREMicrosoftWindows NTCurrentVersionWinlogon" /v DefaultUserName /t REG_SZ /d ekzorchik /f

C:Windowssystem32>reg add "HKLMSOFTWAREMicrosoftWindows NTCurrentVersionWinlogon" /v DefaultPassword /t REG_SZ /d 712mbddr@ /f

C:Windowssystem32>reg add "HKLMSOFTWAREMicrosoftWindows NTCurrentVersionWinlogon" /v ForceAutoLogon /t REG_SZ /d 1 /f

C:Windowssystem32>reg add "HKLMSOFTWAREMicrosoftWindows NTCurrentVersionWinlogon" /v DefaultDomainName /t REG_SZ /d WORKGROUP /f

C:Windowssystem32>reg add "HKLMSOFTWAREMicrosoftWindows NTCurrentVersionWinlogon" /v IgnoreShiftOvveride /t REG_SZ /d 1 /f

C:Windowssystem32>reg add "HKLMSOFTWAREMicrosoftWindows NTCurrentVersionWinlogon" /v AutoLogonCount /t REG_DWORD /d 1 /f

После перезагружаю систему и проверяю, что система запустилась под учетной записью логина ekzorchik, а не остановилась на этапе идентификации в системе.

C:Windowssystem32>shutdown /r /t 3

и да конечно же я внес правильные настройки, система успешно загрузилась под учетной записью ekzorchik, как и было задумано.

Если используется доменная станция, то в настройке строки (а все остальные остаются такими же как и для рабочей станции):

C:Windowssystem32>reg add "HKLMSOFTWAREMicrosoftWindows NTCurrentVersionWinlogon" /v DefaultDomainName /t REG_SZ /d WORKGROUP /f

нужно указать не имя рабочей группы по умолчанию WORKGROUP, а имя вашего домена, к примеру в моих заметках я использую домен с именем polygon.local, в этом случае нужно указывать просто polygon.

Хочу заметить, что данные шаги также справедливы и для рабочих станций Windows, т. е. Они универсальны.

Как видите, все просто и даже такая на первый взгляд сложная задача может быть выполнена всего лишь обратившись к заметкам на моем блоге. Задача данной заметки выполнена и пора прощаться до новых встреч, с уважением Олло Александр aka ekzorchik.


Go to CMD and type «control userpasswords2». If you can see the «Users must enter a user name and password to use this computer» checkbox then uncheck it and Apply/Ok and enter your credentials.

However, Windows does not always show the «Users must enter a user name and password to use this computer» checkbox. For instance if your PC is joined to a domain.

If you use the full registry method, then your password will be saved in plan text, which could be a security issue. To get around this you can force the checkbox to appear no matter what.

  1. Open the registry and navigate to «HKLMSOFTWAREMicrosoftWindows NTCurrentVersionWinlogon».
  2. Create ONLY the String «AutoAdminLogon» with a value of «1».
  3. Close the registry editor and open a CMD prompt.
  4. Type «control userpasswords2» without the quotes.

You will now see the same dialog the OP posted but with the checkbox «Users must enter a user name and password to use this computer» and it will be unchecked.

  1. Re-check the box and hit Apply.
  2. Then uncheck it again and hit Apply or OK and save your UID and PWD.

The machine will auto login, without storing your credentials in the registry in plain text. If you had previously did the full registry method before with UID and PWD I would delete them before doing this, however checking the box might delete the keys for you.

If the PC is a DC or Domain member than you may need to configure the login domain registry entry before it will work properly.

Используется ВинСервер2012р2. Под одним пользователем в таск-менеджере есть пару заданий, которые через некоторое время выполняются на протяжении дня. Выходит, что этот пользователь (в частности администратор) должен быть вошедшим в свою учетку. 


Так как сервер, иногда, по неким причинам аварийно перезагружается то авто-вход пользователя соответственно не осуществляется.  Давать пароль от этой учетки никому никто не собирается.
Поэтому придумаем такое решение, а именно сделаем Авто-вход нужного нам пользователя, под которым запускаются задачи и через некое время, например 10 секунд учетка будет заблокирована.

И так, для начала, что бы появилась галка в control userpasswords2 для автов-хода выполняем в cmd


reg add «HKLMSOFTWAREMicrosoftWindows NTCurrentVersionWinlogon» /v AutoAdminLogon /t REG_SZ /d «1» /f


если первая команда не сработала тогда


reg add «HKLMSOFTWAREMicrosoftWindows NTCurrentVersionWinlogon» /v DefaultDomainName /t REG_SZ /d «domain» /f


где «domain» — имя вашего домена

Далее отключим сочетание клавиш ctrl+alt+del при входе, нажимаем Win+R,
вводим gpedit.msc, переходим по пути

Конфигурация компьютера -> Конфигурация Windows –> Параметры безопасности –> Локальные политики -> Параметры безопасности -> Интерактивный вход: не требовать нажатия сочетания клавиш CTRL+ALT+DEL
изменяем значение.

Ну и в Планировщике заданий создаем задание где в секцию Действия добавляем  RunDll32.exe user32.dll,LockWorkStation (запустит скринсейвер, блокировщик учетной запиис) + устанавливаем параметры, нужные для периодичности, события и т.д., запуска скрина.

П.С. Так же есть возможность осуществить авто-вход + запустить скринсейер (блокировка экрана), посредством реестра

Авто-вход:

HKEY_LOCAL_MACHINE –> SOFTWARE –> Microsoft –> Windows NT –> CurrentVersion –> WinlogonПараметры:AutoAdminLogon 1DefaultUserName пользовательDefaultPassword пароль

 Автоблокировка:

HKEY_CURRENT_USER
Software –> Policies –> MicrosoftWindows –> Control PanelDesktopScreenSaveTimeout REG_SZ = 1 Изменяем параметр 1 или 0

Бывают разные задачи, которые необходимо решать различными методами и реализовывать алгоритмы на различных операционных системах и окружениях. И вот как то досталась мне весьма сложная но интересная задача по крупной автоматизации. Всё бы ничего, на реализовать её необходимо на Windows сервере. И вот когда алгоритмическая сторона в виде скрипта была реализована, оказалось что при автоматическом запуске этот скрипт не отрабатывает. Были попытки запуска скрипта от нужного пользователя, были попытки даже нагло напихать необходимые переменные в скрипт. Шедуллер не подхватывал необходимые переменные, реализация через групповые политики (gpedit.msc) так же не увенчалась успехом. Естественно была приглашена команда экспертов, но винда победила. Было решено использовать самый стандартный и распространенный метод — костыли! Опытным путём выяснилось, что если кинуть скрипт в каталог

%AppData%RoamingMicrosoftWindowsStart MenuProgramsStartup

то при логине этот скрипт запускался и отрабатывал корректно.
Ну что же, значит нужно сделать так, что бы при включении сервера происходил автоматический вход пользователя в систему.
Так как это серверная, а не клиентская ОС, то из коробки автовход без пароля не работает.
Решение следующее:
Запускаем редактор реестра командой

regedit.exe

Переходим в ветку

HKLMSoftwareMicrosoftWindows NTCurrentVersionwinlogon

И создаем (или меняем если ключи уже есть) 3 значения

AutoAdminLogon = 1
(тип DWORD)
DefaultUserName = user_login
(тип String)
DefaultPassword = user_password
(тип String)

После этого необходимо перезагрузить сервер и проверить что получим
У меня успешно был произведён логин администратора в систему и скрипт запустился.

Go to CMD and type «control userpasswords2». If you can see the «Users must enter a user name and password to use this computer» checkbox then uncheck it and Apply/Ok and enter your credentials.

However, Windows does not always show the «Users must enter a user name and password to use this computer» checkbox. For instance if your PC is joined to a domain.

If you use the full registry method, then your password will be saved in plan text, which could be a security issue. To get around this you can force the checkbox to appear no matter what.

  1. Open the registry and navigate to «HKLMSOFTWAREMicrosoftWindows NTCurrentVersionWinlogon».
  2. Create ONLY the String «AutoAdminLogon» with a value of «1».
  3. Close the registry editor and open a CMD prompt.
  4. Type «control userpasswords2» without the quotes.

You will now see the same dialog the OP posted but with the checkbox «Users must enter a user name and password to use this computer» and it will be unchecked.

  1. Re-check the box and hit Apply.
  2. Then uncheck it again and hit Apply or OK and save your UID and PWD.

The machine will auto login, without storing your credentials in the registry in plain text. If you had previously did the full registry method before with UID and PWD I would delete them before doing this, however checking the box might delete the keys for you.

If the PC is a DC or Domain member than you may need to configure the login domain registry entry before it will work properly.

Go to CMD and type «control userpasswords2». If you can see the «Users must enter a user name and password to use this computer» checkbox then uncheck it and Apply/Ok and enter your credentials.

However, Windows does not always show the «Users must enter a user name and password to use this computer» checkbox. For instance if your PC is joined to a domain.

If you use the full registry method, then your password will be saved in plan text, which could be a security issue. To get around this you can force the checkbox to appear no matter what.

  1. Open the registry and navigate to «HKLMSOFTWAREMicrosoftWindows NTCurrentVersionWinlogon».
  2. Create ONLY the String «AutoAdminLogon» with a value of «1».
  3. Close the registry editor and open a CMD prompt.
  4. Type «control userpasswords2» without the quotes.

You will now see the same dialog the OP posted but with the checkbox «Users must enter a user name and password to use this computer» and it will be unchecked.

  1. Re-check the box and hit Apply.
  2. Then uncheck it again and hit Apply or OK and save your UID and PWD.

The machine will auto login, without storing your credentials in the registry in plain text. If you had previously did the full registry method before with UID and PWD I would delete them before doing this, however checking the box might delete the keys for you.

If the PC is a DC or Domain member than you may need to configure the login domain registry entry before it will work properly.

Понравилась статья? Поделить с друзьями:
  • Автовход в windows 10 при включении
  • Аварийный дамп памяти windows 10 как отключить
  • Аварийный дамп памяти windows 10 где находится
  • Аварийная флешка с программами windows 7 portable
  • Аварийная флешка для восстановления windows 10 скачать