Computer >> บทช่วยสอนคอมพิวเตอร์ >  >> ระบบ >> Windows Server

วิธี Auto Login เข้าสู่ Windows 10 โดยไม่ต้องใส่รหัสผ่าน

เพื่อ Login เข้าสู่ Windows 10 User ต้องใส่รหัสผ่านสำหรับ Local หรือ Microsoft (Online) Account ทุกครั้ง นี่ให้ระดับการป้องกันอุปกรณ์บางระดับต่อการเข้าถึงโดยบุคคลที่สาม แต่ก็ไม่สะดวกสำหรับ Home Users เนื่องจากเพิ่มเวลาในการเข้าถึง Desktop ของอุปกรณ์ ในคู่มือนี้ เราจะดูวิธี Disable Password Sign-in บน Windows 10 (Windows Server 2016/2012 R2) Login Screen และวิธีตั้งค่า Autologin ภายใต้บัญชีเฉพาะ

บ่อยที่สุด Automatic Login โดยไม่มี Password ถูกอนุญาตสำหรับอุปกรณ์ที่รันใน Kiosk Mode ที่การ Reboot ใดๆ (เช่น เนื่องจาก Power Outage) Windows จะ Auto Logon เข้าสู่ Desktop และเริ่มโปรแกรมที่จำเป็นผ่าน Autorun

Warning Automatic Login ไปยัง Windows ใช้เพื่อความสะดวกของ User แต่ลดความปลอดภัยของคอมพิวเตอร์ Autologon ควรเปิดใช้งานก็ต่อเมื่อคุณเป็น User คนเดียวของคอมพิวเตอร์ และคุณแน่ใจว่าไม่มีใครสามารถเข้าถึงอุปกรณ์ของคุณทางกายภาพได้ มิฉะนั้น ความปลอดภัยของข้อมูลส่วนตัวของคุณจะอยู่ในความเสี่ยง

การปิด Password Dialog บน Windows 10 Login Screen ไม่ได้หมายความว่าบัญชีของคุณควรมี Blank Password คุณสามารถตั้งค่า Windows 10 ให้ใช้ Saved Credentials เพื่อ Logon เข้าสู่คอมพิวเตอร์โดยอัตโนมัติ ในกรณีอื่นๆ ทั้งหมด เช่น การเข้าถึงคอมพิวเตอร์ผ่าน Network (SMB) หรือเชื่อมต่อกับ Remote Desktop (RDP) คุณจะถูกขอ Password

วิธี Auto Login เข้าสู่ Windows 10 โดยไม่ต้องใส่รหัสผ่าน

วิธีปิด Windows 10 Login Password ผ่าน User Account Settings

วิธีง่ายที่สุดในการปิด Password Login บน Windows 10 คือการตั้งค่าตัวเลือกที่เหมาะสมใน Dialog Box User Account Settings

  1. กด Win+R;
  2. ใน Run Dialog Box ใส่คำสั่ง netplwiz หรือ control userpasswords2;วิธี Auto Login เข้าสู่ Windows 10 โดยไม่ต้องใส่รหัสผ่าน
  3. ในหน้าต่างถัดไปที่มีรายการ Local User Accounts ให้ Uncheck ตัวเลือก “User must enter a username and password to use this computer” และ Save Changes (OK); วิธี Auto Login เข้าสู่ Windows 10 โดยไม่ต้องใส่รหัสผ่าน
  4. หน้าต่างปรากฏขึ้นให้คุณใส่ User Account และ Password (2 ครั้ง) ที่คุณต้องการใช้สำหรับ Automatic Login และคลิก "OK"; วิธี Auto Login เข้าสู่ Windows 10 โดยไม่ต้องใส่รหัสผ่าน
  5. Restart Computer และตรวจสอบว่า Windows Boot เข้าสู่ Desktop โดยตรงโดยไม่ต้องใส่ Password

หากคุณกำลังตั้งค่า Passwordless Login ไปยัง Windows Virtual Machine ที่รันบน Hyper-V อย่าใช้ Enhanced Session Mode เพื่อเชื่อมต่อกับ VM Console ในโหมดนี้ Automatic Login ด้วย Saved Credentials ไม่ทำงานเพราะการเชื่อมต่อกับ Hyper-V Console ทำผ่าน Remote Desktop Service เพื่อเชื่อมต่อกับ Virtual Machine Console ไม่ผ่าน Enhanced Session Mode ให้ปิดหน้าต่าง Connection โดยคลิก Cross ที่มุมขวาบนของหน้าต่าง

วิธี Auto Login เข้าสู่ Windows 10 โดยไม่ต้องใส่รหัสผ่าน

Fix: Microsoft ลบ User AutoLogin ออกจาก Windows 10 20H1/20H2

ตั้งแต่ Windows 10 Build 2004 (20H1) Microsoft ตัดสินใจลบตัวเลือกในการตั้งค่า Automatic Login สำหรับ Local Accounts ออกจาก User Control Panel (ดูหน้าจอด้านล่าง) หากคุณใช้ Local Windows Logon Account และไม่ใช่ Microsoft Account (MSA) ตัวเลือก “User must enter a username and password to use this computer” จะไม่แสดง

วิธี Auto Login เข้าสู่ Windows 10 โดยไม่ต้องใส่รหัสผ่าน

เพื่อแสดงตัวเลือกที่ใช้ปิด Password Login บน Windows 10 20H2 ให้เปิด Console powershell.exe และแก้ไข Registry:

New-ItemProperty -Path "HKLM:\SOFTWARE\Microsoft\Windows NT\CurrentVersion\PasswordLess\Device" -Name DevicePasswordLessBuildVersion -Value 0 -Type Dword –Force

วิธี Auto Login เข้าสู่ Windows 10 โดยไม่ต้องใส่รหัสผ่าน

Registry Key Value นี้จะ Disable Windows 10 Option “Require Windows Hello sign-in for Microsoft accounts” Setting ปิดและ Restart Console netplwiz และตรวจสอบว่า Checkbox ปรากฏ

ดังนั้น คุณสามารถตั้งค่า Auto Login โดยไม่มี Password บน Windows 10 Builds ล่าสุด (20H2 และ 20H2) ได้

หมายเหตุ คุณไม่สามารถ Uncheck ตัวเลือก "User must enter a username and password to use this computer" บนคอมพิวเตอร์ที่ Join Active Directory Domain เนื่องจาก Default Domain Password Policy ในกรณีนี้ วิธีง่ายที่สุดในการปิด Password Request บน Login Screen คือผ่าน Registry (อธิบายด้านล่าง)

วิธีเปิดใช้งาน Automatic Logon ใน Windows ผ่าน Registry

มาพิจารณาวิธีที่พบบ่อยกว่าในการ Login เข้าสู่ Windows 10 อัตโนมัติโดยไม่ต้อง Prompt Password และข้าม Login Screen วิธีนี้ช่วยให้คุณเปิดใช้งาน Password-less Sign-in สำหรับ Microsoft Account, Domain Account หรือ Windows 10 Local Account ผ่าน Registry Editor

Warning วิธี Autologin นี้ปลอดภัยน้อยกว่า เนื่องจาก Password ของคุณจะถูกเก็บใน Registry เป็น Plain Text และสามารถดูได้โดย Local User ใดๆ

  1. กด Win+R และพิมพ์ regedit;
  2. ไปที่ Registry Key HKEY_LOCAL_MACHINE\Software\Microsoft\Windows NT\CurrentVersion\Winlogon;
  3. เปลี่ยนค่าของ Registry Parameter AutoAdminLogon จาก 0 เป็น 1;
  4. สร้าง String Parameter ใหม่ DefaultDomainName ระบุ Domain Name หรือ Local Computer Name เป็น Value Tip Computer Name หาได้ใน System Properties หรือใช้คำสั่ง hostname วิธี Auto Login เข้าสู่ Windows 10 โดยไม่ต้องใส่รหัสผ่าน
  5. ใน Parameter DefaultUserName คุณต้องระบุ User Account Name ที่ควรใช้ Login (แทนที่ด้วย Username อื่นหรืออย่าเปลี่ยน);
  6. สร้าง String Parameter DefaultPassword ที่คุณต้องระบุ Password สำหรับ Account ใน Plain Text;วิธี Auto Login เข้าสู่ Windows 10 โดยไม่ต้องใส่รหัสผ่าน
  7. ปิด Registry Editor และ Restart Computer;
  8. หลังจาก Windows Restart คุณจะ Sign In อัตโนมัติด้วย Account ที่ระบุ และไม่ต้องใส่ Password บน Login Screen

เพื่อเปิดใช้งาน Autologon ผ่าน Registry คุณสามารถใช้คำสั่งต่อไปนี้ (แทนที่ root และ P@ssword ด้วย Username และ Password ของคุณ WORKGROUP ควรแทนที่ด้วยชื่อ AD Domain ของคุณหากใช้ Domain Account):

reg add "HKLM\SOFTWARE\Microsoft\Windows NT\CurrentVersion\Winlogon" /v AutoAdminLogon /t REG_SZ /d 1 /f
reg add "HKLM\SOFTWARE\Microsoft\Windows NT\CurrentVersion\Winlogon" /v DefaultUserName /t REG_SZ /d root /f
reg add "HKLM\SOFTWARE\Microsoft\Windows NT\CurrentVersion\Winlogon" /v DefaultPassword /t REG_SZ /d P@ssword /f
reg add "HKLM\SOFTWARE\Microsoft\Windows NT\CurrentVersion\Winlogon" /v ForceAutoLogon /t REG_SZ /d 1 /f
reg add "HKLM\SOFTWARE\Microsoft\Windows NT\CurrentVersion\Winlogon" /v DefaultDomainName /t REG_SZ /d WORKGROUP /f
reg add "HKLM\SOFTWARE\Microsoft\Windows NT\CurrentVersion\Winlogon" /v IgnoreShiftOvveride /t REG_SZ /d 1 /f

 

คุณสามารถใช้ Registry Option AutoLogonCount เพื่อตั้งค่าจำนวนครั้งที่คุณสามารถ Log On เข้าคอมพิวเตอร์โดยใช้ AutoLogon ค่านี้จะลดลงทุกครั้งที่คุณ Login เข้าคอมพิวเตอร์ ตัวอย่างเช่น เพื่ออนุญาต 10 Autologon Actions:
reg add "HKLM\SOFTWARE\Microsoft\Windows NT\CurrentVersion\Winlogon" /v AutoLogonCount /t REG_DWORD /d 1 /f

ทางเลือกอื่น คุณสามารถใช้ PowerShell Script เพื่อบันทึกข้อมูล Login ของ User ลง Registry:

$Username ='max'
$Pass = 'Max$uperP@ss'
$RegistryPath = 'HKLM:\SOFTWARE\Microsoft\Windows NT\CurrentVersion\Winlogon'
Set-ItemProperty $RegistryPath 'AutoAdminLogon' -Value "1" -Type String
Set-ItemProperty $RegistryPath 'DefaultUsername' -Value $Username -type String
Set-ItemProperty $RegistryPath 'DefaultPassword' -Value $Pass -type String
Restart-Computer

Automatic Logon ไม่ทำงานหากมี Logon Banner Policy ถูก Apply ไปยัง Computer Computer Configuration -> Policies -> Windows Settings >Security Settings > Local Policies -> Security Options -> Interactive Logon : Message text for users attempting to log on.

ปิด Password Prompt หลัง Sleep/Hibernation ใน Windows 10

โดยใช้ GPO คุณสามารถปิด Password Request เมื่อ Computer Wake Up จาก Sleep หรือ Hibernation

  1. ในการทำเช่นนี้ ให้รัน Console gpedit.msc (ใน Home Versions ของ Windows 10 คุณสามารถรัน Local Policy Editor Console ได้เช่นนี้);
  2. ไปที่ Policy Section Computer Configuration -> Administrative Templates -> System -> Power Management -> Sleep Settings;
  3. Disable GPO Parameters "Require a password when a computer wakes (on battery)" และ "Require a password when a computer wakes on battery (plugged in)";วิธี Auto Login เข้าสู่ Windows 10 โดยไม่ต้องใส่รหัสผ่าน
  4. ตอนนี้ Windows จะไม่ขอ Password หลัง Resume จาก Sleep หรือ Hibernation

เปิดใช้งาน Secure Automatic Logon โดยไม่ต้องใช้ Password ด้วย AutoLogon Tool

สำหรับ Automatic Logon ที่ปลอดภัยกว่าไปยัง Windows 10 คุณสามารถใช้ Tool ฟรี AutoLogon for Windows ยูทิลิตี้เครื่องมือนี้เป็นส่วนหนึ่งของ Sysinternals System Utility Pack และตอนนี้พร้อมดาวน์โหลดบนเว็บไซต์ Microsoft (https://docs.microsoft.com/en-us/sysinternals/downloads/autologon) Autologon ยังมีประโยชน์เพราะวิธีการก่อนหน้าในการเปิดใช้งาน Autologon ใน Windows 10 อาจไม่ทำงานบนคอมพิวเตอร์ที่ Join Active Directory Domain

  1. ดาวน์โหลดและรัน Autologon.exe (หรือ autologon64.exe) ในฐานะ Administrator;
  2. ยอมรับ Terms ของ License Agreement; วิธี Auto Login เข้าสู่ Windows 10 โดยไม่ต้องใส่รหัสผ่าน
  3. ระบุ User Account, Domain และ User Password ที่คุณต้องการทำ Autologin และกดปุ่ม Enable:
    Autologon successfully configured. The autologon password is encrypted.
  4. หน้าต่างจะปรากฏบ่งชี้ว่า Autologon เปิดใช้งานแล้ว Encrypted Password ถูกเก็บใน LSA Format ภายใต้ Registry Key HKLM\SECURITY\Policy\Secrets ในกรณีนี้ Password ไม่ได้ถูกเก็บเป็น Clear Text แต่อัลกอริทึมการเข้ารหัสไม่แข็งแกร่ง และ Local Computer Administrator ใดๆ (แต่ไม่ใช่ User) สามารถ Decrypt ได้วิธี Auto Login เข้าสู่ Windows 10 โดยไม่ต้องใส่รหัสผ่าน

คุณสามารถตั้งค่า User Credentials เพื่อ Auto Logon เข้าสู่ Windows โดยใช้ Command-line Options ของ Autologon ในการตั้งค่า Windows Autologin สำหรับ User คุณสามารถใช้คำสั่งต่อไปนี้:

autologon64.exe USER_NAME DOMAIN PASSWORD /accepteula

เพื่อ Disable Automatic Logon ไปยัง Windows 10 โดยไม่มี Password เพียงแค่คลิกที่ปุ่ม Disable

ในคู่มือนี้ เราได้ดูวิธีปิด Password Login บน Windows 10 และ Boot Computer เข้าสู่ User's Desktop โดยตรง เพื่อ Disable Automatic Logon ใน Windows ชั่วคราว และระบุ User Credentials ด้วยตนเองว่าต้อง Sign In ภายใต้บัญชีไหน คุณต้องถือปุ่ม Shift ขณะที่ Windows กำลัง Boot