วันอังคารที่ 25 มีนาคม พ.ศ. 2557

PC หลุด Domain ทำไงดีว้า?

PC หลุด Domain ทำไงดีอ่ะ?

User Login แล้วฟ้องว่า The trust relationship between this workstation and the primary domain failed
ปัญหาสุดคลากสิคที่ IT หลายคนอาจต้องเจอโดยไม่ได้ตั้งใจ แล้วถ้าเจอจะทำอย่างไรล่ะ ? มาหาคำตอบกันครับ

จากปัญหาที่ว่านี้ คือ Computer Account นั้นไม่มีการ Update Password กลับขึ้นไปบน Active Directory ทำให้ไม่สามารถ Logon Domain ได้นั้น เราก็ต้องจัดการ Update Password ให้กับ Computer Account นั้นใหม่ ซึ่งวิธีการทำมีดังนี้

Solution:
เมื่อ Logon ไม่ได้ จะพบกับข้อความว่า The trust relationship between this workstation and the primary domain failed
ให้สลับมา Logon ด้วย Local Administrator โดยใส่ .\Administrator ถ้าหากไม่ได้ใช้ชื่อ Administrator ก็เปลี่ยนเป็น Username อื่นที่มีสิทธิ์เป็น Admin ของเครื่องเอาเอง

จากนั้นคลิก Run as administrator ที่ Command Prompt แล้วพิมพ์ภาษาเทพลงไป
netdom.exe resetpwd /s:dc-1 /ud:domain\administrator /pd:*
/s: คือ ชื่อเครื่อง Domain Controller
/ud: คือ ชื่อผู้ใช้งานในระบบ Active Directory ที่มีสิทธิ์ในการเปลี่ยนรหัสผ่านใด ๆ  ซึ่งโดยส่วนมากก็คือเหล่า Admin Domain นั่นแหล่ะ
/pd: คือ รหัสผ่านใหม่ของ Computer Account โดยจะกำหนดอะไรก็ได้ลงไป เดี๋ยวหลังจากนี้มันก็จะเข้าสู่กระบวนการ Update Password ของมันเองภายหลัง

เมื่อกด Enter มันก็จะบอกให้เราพิมพ์ Password ของ /ud ซึ่งถ้าเราใช้ administrator เราก็พิมพ์รหัสผ่านของ User Account นี้ลงไป โดยขณะพิมพ์นั้น Cursor จะไม่ขยับและจะไม่มีอะไรขึ้นมาบนหน้าจอ พิมพ์ให้ถูกแล้วกด Enter อีกที

เสร็จแล้วก็ Restart 1 รอบ, ลอง Logon Domain กันได้เลย

อีกหนึ่งวิธีที่ทำให้ค่าที่เซ็ตไว้ใน OU และ GPOs ยังคงเหมือนเดิม คือ :
1) ที่ Server ให้เข้าไปที่ Active Directory Users and Computers > เลือก OU ที่เก็บ Computers ที่มีปัญหา > click ขวาที่ computer ที่ต้องการ > เลือก Reset Account
2) ที่เครื่อง Client ให้ login ด้วย domain admin เมื่อเครื่อง login ได้แล้ว
ให้เข้าไปที่ system properties > computer name tab > netword id (แล้วใส่ username / password ของ domain admin เพื่อ rejoin) เป็นอันเรียบร้อยครับ

***************** Update ครับ สำหรับบางเครื่องที่ใช้คำสั่ง Netdom ไม่ได้ *****************
1. ให้เรา Install : RSAT ตัวนี้ก่อนครับ ไปดาวน์โหลดได้จากลิงค์ด้านล่างเลยนะครับ
-Download:
http://www.microsoft.com/en-us/download/details.aspx?id=7887

2. Open a command prompt after installing the RSAT Tools and enter the following command.

start /w pkgmgr /iu:RemoteServerAdministrationTools-Roles-AD-DS-SnapIns;RemoteServerAdministrationTools-Roles-AD-DS;RemoteServerAdministrationTools-Roles-AD;RemoteServerAdministrationTools-Roles;RemoteServerAdministrationTools

3. run "gpupdate" เพื่อให้ policy update ทั้ง user และ computer

credit: http://www.itsesa.com/kb/the-trust-relationship-between-this-workstation-and-the-primary-domain-failed.html

**Update New Knowledge Base 23/Dec/2014**
- ในบางครั้งถ้ามันจำเป็นต้อง disjoin and rejoin Domain ใหม่จริงๆ นั้น แล้วคุณเกิด rejoin domain ไม่ได้ !! อ้าวไหงงั้นล่ะ? ก็เพราะว่า มันค้นหา DNS Server ไม่เจอ ให้คุณแอดเพิ่มให้มันไปเลยครับ ใน
Ethernet Properties > internet Protocol Version 4 (TCP/IPv4) > Click "Properties > ในแทบ General คลิ๊ก Advanced... > ในแท๊บ DNS คลิ๊ก Add... แล้วใส่หมายเลข IP DNS Server ลงไปครับ คลิ๊ก Add แล้วถอยออกมาครับ > คราวนี้ก็ไป Join Domain ตาม Step ปกติได้เลยครับผม วิธีนี้ได้ผลชะงัดนัก ฮ่าๆๆ ^__^

ไม่มีความคิดเห็น:

แสดงความคิดเห็น