I. Giới thiệu
- Offline Domain Join là 1 quá trình mới mà Windows Server 2008 R2 và Windows 7 có thể sử dụng mà không cần kết nối đến Domain Controller.
- Join domain là quá trình tạo mối quan hệ tin tưởng (trust relationship) giữa 1 máy tính sử dụng hđh windows và 1 Domain Controller. Hành động này yêu cầu trạng thái thay đổi của dịch vụ Active Directory Domain Services (ADDS) và trạng thái thay đổi của máy tính join domain.Để hoàn tất quá trình join domain ở các Windows phiên bản cũ thì máy tính cần join domain bắt buộc phải có kết nối mạng đến Domain Controller. Offline domain join so với kiểu join domain cũ mang lại các ưu điểm sau đây:
· Trạng thái của Active Directory thay đổi mà ko cần bất kỳ kết nối mạng nào đến máy tính cần join domain
· Trạng thái của máy tính cần join domain thay đổi mà ko cần bất kỳ kết nối mạng nào đến Domain Controller
· Các thay đổi sẽ được hoàn thành vào 1 thời điểm khác.
II. Các bước triển khai
Trước tiên trong qua trình sẽ bao gồm 2 vai trò 1 là vai trò DC nhiệm vụ tạo file chứa tài khoản computer dùng cho việc join domain vai trò 2 là máy khách client vì thế chúng ta cần ít nhất 2 máy để có thể triển khai thử.
Trong bài viết này chúng ta sẽ sử dụng lệnh Djoin để tạo một computer account trong AD chuẩn bị cho việc join domain offline. Kết quả sẽ tạo ra một file Djoin định dạng .txt đã được mã hóa chứa thông tin về tài khoản và file này được dùng cho hầu hết cac phiên bản windows hiện này và nó là nhân tố đảm bảo cho máy tính join domain ngay lền khởi động đầu tiên.
B1: Vào Start à Run à CMD
B2: tạo file Djoin với lệnh sau
Cấu trúc lệnh:
djoin /provision /domain <domain_name> /machine <destination computer> /savefile <filename.txt> [/machineou <OU name>] [/dcname <name of domain controller>] [/reuse] [/downlevel] [/defpwd] [/nosearch] [/printblob]
|
Tham số
|
Mô tả
|
|
/provision
|
Creates a computer account in AD DS.
|
|
/domain <domain name>
|
Specifies the name of the domain to join.
|
|
/machine <destination computer>
|
Specifies the name of the computer that you want to join to the domain.
|
|
/machineou <OU Name>
|
Specifies the name of the organizational unit (OU) in which you want the computer account to be created. By default, the computer account is created in the Computers container.
|
|
/dcname <domain controller name>
|
Specifies the name of a specific domain controller that will create the computer account. If you do not specify a domain controller, the domain controller Locator (DC Locator) process is used to select a domain controller.
|
|
/reuse
|
Specifies the reuse of any existing computer account. The password for the computer account will be reset.
|
|
/downlevel
|
Supports the use of a domain controller that runs a version of Windows Server that is earlier than Windows Server 2008 R2.
|
|
/savefile <filename.txt>
|
Saves provisioning data to a file.
|
|
/defpwd
|
Uses the default machine account password (not recommended).
|
|
/nosearch
|
Skips account conflict detention. Requires the /DCName parameter.
|
|
/printblob
|
Return a base64-encoded metadata blob for an answer file.
|
|
/requestodj
|
Requests an offline domain join at the next start.
|
|
/Loadfile
|
Specifies the output from a previous provisioning command.
|
|
/windowspath <path to the Windows directory of the offline image>
|
Specifies the path to the Windows directory of the offline image. If you are using the /localos parameter, specify %systemroot% or %windir% as the value of the /windowspath parameter.
|
|
/localos
|
Targets the local operating system installation, instead of an offline image, with the domain join information. If you use this parameter, the value that you specify for /windowspath should be %systemroot% or %windir%. Run this parameter only on a destination computer that you want to join to the domain. This parameter is blocked from being run on a domain controller. Because this parameter injects the blob data into the locally running operating system image, you must restart the computer to complete the domain join operation, as you must also do for an online domain join.
|
Lệnh sử dụng trong bài này là:
DJOIN /Provision /Domain technetvietnam.local /Machine client /SaveFile joinoffline.txt
P/s: Bạn có thể xem nội dung file với lệnh ( nhưng đã được mã hóa)
Type joinoffline.txt
B3: Xác nhận lại tại khoản đã được tạo trong AD và file Djoin, vào Active Directory Administrative Center à xổ mục Technetvietnam(local)\Computers
B4: Copy file offline.txt vào máy client dùng lệnh sau để join offline
Cấu trúc lệnh:
djoin /requestodj /loadfile <filename.txt> /windowspath <path to the Windows directory of the offline image> /localos
Câu lệnh dùng trong bài:
DJOIN /Requestodj /LoadFile joinoffline.txt /WindowsPath \Mount\Windows
Nguyễn Hữu Phan Hoàng Hồ (Nguồn Technetvietnam)
|