Trao đổi với tôi

http://www.buidao.com

6/12/10

[Net] Thiết lập server chạy song song – Phần I, III

- Bước 1 : Dựng Domain Controller cho Server1
- Bước 2 : Dùng Server2 join Domain vào Server1 và dựng Domain Controller cho máy Server2
- Bước 3 : Đồng bộ 2 server, bật Gobal Catalog
- Bước 4 : Join domain cho máy client
- Bước 5 : Tắt chế độ cache logon và test thử bằng cách tắt 1 trong 2 Domain Controller.

Máy Server 1: Nâng cấp lên domain controller

Đặt IP tĩnh cho DC theo các tham số sau:
IP: 192.168.1.10
NetMask: 255.255.255.0
Preferred DNS Server: 192.168.1.10
(Dạo này do mạng chậm và truy cập vào 4rum rất khó khăn, nên bước này không post hình với lại bước này cũng dễ và là rất cơ bản, chắc bạn nào cũng biết.)
• Vào Start -> Run -> Chạy chương trình DCPROMO để nâng cấp lên lên Domain Controller
• Cửa sổ “Active Directory Installation Wizard” , nhấn Next
• Domain Controller Type, chọn Domain controller for a new domain và click next
• Ở khung Ceate New Domain, chọn Domain in a new forest
• Khung New Domain Name, điền vào domains của bạn (vd: abc.com, tencongty.com.vn…)
• NetBIOS Domain Name, để nguyên giá trị mặc định
• Chọn giá trị mặc định cho các thư mục chứa cấu hình hệ thống
• DNS Registration Diagnostics, chọn Install and configure the DNS server on this computer, and set this computer to use this DNS server as its preferrend DNS server
• Permissions, chọn Permissions compatible only with Windows 2000 or Windows Server 2003 operating systems ….
• Dicrectory Services Restore Mode Administrator Password, điền password nếu bạn cần.
• Chọn Finish để kết thúc quá trình cài đặt và reboot lại.
Sau khi reboot lại thì tạo user tên “u1” , password: 123 (???)

2/ Máy Server 2: Join vào domain và nâng cấp lên domain controller.

A/ Join domain :

Đặt IP tĩnh cho server2 theo các tham số sau:
IP: 192.168.1.20
NetMask: 255.255.255.0
Preferred DNS Server: 192.168.1.10

Click nút phải chuột trên My Computer / Properties / Computer Name / Change
Điền tên domain “anthaifood.com” vào ô domain (tên miền mình làm thí nghiệm là anthaifood.com)

Sau khi OK, sẽ hiện lên 1 của sổ ta điền user để join domains, bạn điền user: administrator (user của máy server1)

OK, reboot lại máy server 2

B/ Dựng Domain Controller

Sau khi rebot lại máy Server2, vào Start -> Run -> Chạy chương trình DCPROMO để nâng cấp lên lên Domain Controller. (???)

Cửa sổ “Active Directory Installation Wizard” , nhấn Next
Tại cửa sổ “Domain Controller Type” chọn dòng Additional domain controller for an existing domain.

Network Credentials: Nhập username & password administrator của máy server1

Để mặc định tại các cửa sổ này

Dicrectory Services Restore Mode Administrator Password, điền password nếu cần (là password cần khi chúng ta restore hệ thống Domain Controller)

Đến cửa sổ này thì đợi một tí.

Đến đây thì đã thành công, chọn Finish để kết thúc quá trình cài đặt và reboot lại.

C/ Dựng DNS :

Đặt lại IP cho server2 theo các tham số sau:
IP: 192.168.1.20
NetMask: 255.255.255.0
Preferred DNS Server: 192.168.1.20

Vào Control Panel -> Windows Components, chọn Details
Ở phần Networking Services chọn Domain Name System (DNS) và nhấn OK, nhấn tiếp Next để cài đặt.

3/ Đồng bộ 2 server và join domains cho client

A/ Server1:

Start -> Program File -> Administrator Tool -> Active Directory Site and Services

Trong cữa sổ Active Directory Site and Services chọn Sites -> Defaut-Fist-Site-Name -> Servers thì sẽ thấy 2 server, vào properties từng NTDS Settings của mỗi server và check vào Gobal Catalog.

Trỏ Alternate DNS Server1 về Server2 (192.168.1.20)

B/ Server 2:
Trỏ Alternate DNS Server2 về Server1 (192.168.1.10)

Reboot Server1 & Server2

4/ Máy Client:

Đặt IP tĩnh cho máy Client theo các tham số sau:
IP: 192.168.1.2
NetMask: 255.255.255.0
Preferred DNS Server: 192.168.1.10
Alternate DNS Server : 192.168.1.20

Click nút phải chuột trên My Computer / Properties / Computer Name / Change
Điền tên domain “anthaifood.com” vào ô domain, khi hỏi username và password thì điền vào tài khoản quản trị của Domain Controller (DC)
Reboot lại Client

Sau khi reboot lại đăng nhập bằng tài khoản sau: user: u1 / password : 123

5/ thử nghiệm:

Tắt đi 1 trong 2 server mà máy client vẫn login vào được DC, tạo thêm u2,u3 … để thử nghiệm.
Ghi chú: tắt chế độ cache logon trong local plicy (interactive logon) test mới chính xác (???)


reflink: http://roseandgun.wordpress.com/2008/04/09/thi%E1%BA%BFt-l%E1%BA%ADp-server-ch%E1%BA%A1y-song-song-ph%E1%BA%A7n-i/


PHẦN III: Operation Master

Giới thiệu: Mặc dù W2k/W2k3 hỗ trợ Multi Master (các DC hoạt động song song nhau, không phân biệt chính/phụ ). Tuy nhiên vẫn còn một số chức năng hoạt động ở chế độ Single Master, cụ thể là:
1. Schema Master: Quản lý schema, mỗi forest có 1 cái
2. Domain Naming: Quản lý danh sách các domain, mỗi forest có 1 cái
3. PDC: Giả lập server NT để chứng thực cho các WS đồi cũ (win9x), mỗi domain có 1 cái
4. RID: cấp số ID cho user, mỗi domain có 1 cái
5. Infrastructer: Quản lý danh sách user ở domain khác tham dự vào các nhóm của domain hiện tại., mỗi domain có 1 cái

Mặc định các chức năng do DC1 nắm giữ. Khi DC1 chết thì những thao tác liên quan đến 5 chức năng này sẽ không thực hiện được.

Khi DC1 “chết bất đắc kỳ tử”, ta cần “cưỡng chế” DC2 giữ 5 chức năng này. Bài viết sẽ hướng dẫn chi tiết các bước thực hiện việc “cưỡng chế”

Bài viết này gồm 3 bước:
1. Giả sử master DC bị chết (DC1 bị “die” bất đắc)
2. Từ Addition DC (DC2) ra CMD gõ các lệnh để cưỡng chế 5 chức năng single master của DC1 sang DC2
3. Sau khi thành công, DC2 tạo user và client join domain bằng user mới tạo thành công.

Thực hiện
1./ giả sử DC1 bị die (shutdown DC1)
2./ từ DC2, vào cmd gõ các lệnh để cưỡng chế 5 chức năng single master của DC1 sang DC2
Trình tự các lệnh như sau: (Copy từ màn hình DOS ra)
——————————————————–
Microsoft Windows [Version 5.2.3790]
(C) Copyright 1985-2003 Microsoft Corp.

C:\>ntdsutil ‘Lệnh đầu tiên trong wá trình Operation Master
ntdsutil: ?
‘Các lệnh trong ‘ntdsutil’
? – Show this help information
Authoritative restore – Authoritatively restore the DIT database
Configurable Settings – Manage configurable settings
Domain management – Prepare for new domain creation
Files – Manage NTDS database files
Group Membership Evaluation – Evaluate SIDs in token for a given user or group
Help – Show this help information
LDAP policies – Manage LDAP protocol policies
Metadata cleanup – Clean up objects of decommissioned servers
Popups %s – (en/dis)able popups with “on” or “off”
Quit – Quit the utility
Roles – Manage NTDS role owner tokens
Security account management – Manage Security Account Database – Duplicate SID Cleanup
Semantic database analysis – Semantic Checker
Set DSRM Password – Reset directory service restore mode administrator account password

ntdsutil: Roles ‘Lệnh thứ 2 trong wá trình Operation Master
fsmo maintenance: ?
‘Các lệnhh trong ‘Roles’
? – Show this help information
Connections – Connect to a specific domain controller
Help – Show this help information
Quit – Return to the prior menu
Seize domain naming master – Overwrite domain role on connected server
Seize infrastructure master – Overwrite infrastructure role on connected server
Seize PDC – Overwrite PDC role on connected server
Seize RID master – Overwrite RID role on connected server
Seize schema master – Overwrite schema role on connected server
Select operation target – Select sites, servers, domains, roles and naming contexts
Transfer domain naming master – Make connected server the domain naming master
Transfer infrastructure master – Make connected server the infrastructure master
Transfer PDC – Make connected server the PDC
Transfer RID master – Make connected server the RID master
Transfer schema master – Make connected server the schema master

fsmo maintenance: connections ‘Lệnh thứ 3 trong quá trình Operation Master
server connections: ?
‘Các lệnh trong ‘connections’
? – Show this help information
Clear creds – Clear prior connection credentials
Connect to domain %s – Connect to DNS domain name
Connect to server %s – Connect to server, DNS name or IP address
Help – Show this help information
Info – Show connection information
Quit – Return to the prior menu
Set creds %s %s %s – Set connection creds as domain, user, pwd.
Use “NULL” for null password,
* to enter password from the console.

server connections: connect to server ser.anthaifood.com ‘Lệnh thứ 4 trong wá trình Operation Master
Binding to ser.anthaifood.com …
Connected to ser.anthaifood.com using credentials of locally logged on user.
server connections: quit ‘Lệnh thứ 5 trong wá trình Operation Master

fsmo maintenance: seize schema master ‘Lệnh thứ 6 trong wá trình Operation Master
Attempting safe transfer of schema FSMO before seizure.
ldap_modify_sW error 0×34(52 (Unavailable).
Ldap extended error message is 000020AF: SvcErr: DSID-0321032A, problem 5002 (UNAVAILABLE), data 1722
(Xuất hiện thông báo, chọn “YES”)

Win32 error returned is 0x20af(The requested FSMO operation failed. The current FSMO holder could not be contacted.))
Depending on the error code this may indicate a connection,
ldap, or role transfer error.
Transfer of schema FSMO failed, proceeding with seizure …
Server “ser.anthaifood.com” knows about 5 roles
Schema – CN=NTDS Settings,CN=SER,CN=Servers,CN=Default-First-Site-Name,CN=Sites,CN=Configuration,DC=anthaifood,DC=co m
Domain – CN=NTDS Settings,CN=SERVER,CN=Servers,CN=Default-First-Site-Name,CN=Sites,CN=Configuration,DC=anthaifood,DC=co m
PDC – CN=NTDS Settings,CN=SERVER,CN=Servers,CN=Default-First-Site-Name,CN=Sites,CN=Configuration,DC=anthaifood,DC=co m
RID – CN=NTDS Settings,CN=SERVER,CN=Servers,CN=Default-First-Site-Name,CN=Sites,CN=Configuration,DC=anthaifood,DC=co m
Infrastructure – CN=NTDS Settings,CN=SERVER,CN=Servers,CN=Default-First-Site-Name,CN=Sites,CN=Configuration,DC=anthaifood,DC=co m

fsmo maintenance: seize domain naming master ‘Lệnh thứ 7 trong wá trình Operation Master
Attempting safe transfer of domain naming FSMO before seizure.
ldap_modify_sW error 0×34(52 (Unavailable).
Ldap extended error message is 000020AF: SvcErr: DSID-0321032A, problem 5002 (UNAVAILABLE), data 1722
(Xuất hiện thông báo, chọn “YES”)

Win32 error returned is 0x20af(The requested FSMO operation failed. The current FSMO holder could not be contacted.))
Depending on the error code this may indicate a connection,ldap, or role transfer error.
Transfer of domain naming FSMO failed, proceeding with seizure …
Server “ser.anthaifood.com” knows about 5 roles
Schema – CN=NTDS Settings,CN=SER,CN=Servers,CN=Default-First-Site-Name,CN=Sites,CN=Configuration,DC=anthaifood,DC=co m
Domain – CN=NTDS Settings,CN=SER,CN=Servers,CN=Default-First-Site-Name,CN=Sites,CN=Configuration,DC=anthaifood,DC=co m
PDC – CN=NTDS Settings,CN=SERVER,CN=Servers,CN=Default-First-Site-Name,CN=Sites,CN=Configuration,DC=anthaifood,DC=co m
RID – CN=NTDS Settings,CN=SERVER,CN=Servers,CN=Default-First-Site-Name,CN=Sites,CN=Configuration,DC=anthaifood,DC=co m
Infrastructure – CN=NTDS Settings,CN=SERVER,CN=Servers,CN=Default-First-Site-Name,CN=Sites,CN=Configuration,DC=anthaifood,DC=co m

fsmo maintenance: seize RID master ‘Lệnh thứ 8 trong wá trình Operation Master (chữ RID viết hoa)
Attempting safe transfer of RID FSMO before seizure.
ldap_modify_sW error 0×34(52 (Unavailable).
Ldap extended error message is 000020AF: SvcErr: DSID-03210922, problem 5002 (UNAVAILABLE), data 1722
(Xuất hiện thông báo, chọn “YES”)

Win32 error returned is 0x20af(The requested FSMO operation failed. The currentFSMO holder could not be contacted.))
Depending on the error code this may indicate a connection,ldap, or role transfer error.
Transfer of RID FSMO failed, proceeding with seizure …
Searching for highest rid pool in domain
Server “ser.anthaifood.com” knows about 5 roles
Schema – CN=NTDS Settings,CN=SER,CN=Servers,CN=Default-First-Site-Name,CN=Sites,CN=Configuration,DC=anthaifood,DC=co m
Domain – CN=NTDS Settings,CN=SER,CN=Servers,CN=Default-First-Site-Name,CN=Sites,CN=Configuration,DC=anthaifood,DC=co m
PDC – CN=NTDS Settings,CN=SERVER,CN=Servers,CN=Default-First-Site-Name,CN=Sites,CN=Configuration,DC=anthaifood,DC=co m
RID – CN=NTDS Settings,CN=SER,CN=Servers,CN=Default-First-Site-Name,CN=Sites,CN=Configuration,DC=anthaifood,DC=co m
Infrastructure – CN=NTDS Settings,CN=SERVER,CN=Servers,CN=Default-First-Site-Name,CN=Sites,CN=Configuration,DC=anthaifood,DC=co m

fsmo maintenance: seize PDC ‘Lệnh thứ 9 trong wá trình Operation Master (chữ PDC viết hoa)
Attempting safe transfer of PDC FSMO before seizure.
ldap_modify_sW error 0×34(52 (Unavailable).
Ldap extended error message is 000020AF: SvcErr: DSID-03210511, problem 5002 (UNAVAILABLE), data 1722
(Xuất hiện thông báo, chọn “YES”)

Win32 error returned is 0x20af(The requested FSMO operation failed. The current FSMO holder could not be contacted.))
Depending on the error code this may indicate a connection,
ldap, or role transfer error.
Transfer of PDC FSMO failed, proceeding with seizure …
Server “ser.anthaifood.com” knows about 5 roles
Schema – CN=NTDS Settings,CN=SER,CN=Servers,CN=Default-First-Site-Name,CN=Sites,CN=Configuration,DC=anthaifood,DC=co m
Domain – CN=NTDS Settings,CN=SER,CN=Servers,CN=Default-First-Site-Name,CN=Sites,CN=Configuration,DC=anthaifood,DC=co m
PDC – CN=NTDS Settings,CN=SER,CN=Servers,CN=Default-First-Site-Name,CN=Sites,CN=Configuration,DC=anthaifood,DC=co m
RID – CN=NTDS Settings,CN=SER,CN=Servers,CN=Default-First-Site-Name,CN=Sites,CN=Configuration,DC=anthaifood,DC=co m
Infrastructure – CN=NTDS Settings,CN=SERVER,CN=Servers,CN=Default-First-Site-Name,CN=Sites,CN=Configuration,DC=anthaifood,DC=co m

fsmo maintenance: seize infrastructure master ‘Lệnh thứ 10 trong wá trình Operation Master
Attempting safe transfer of infrastructure FSMO before seizure.
ldap_modify_sW error 0×34(52 (Unavailable).
Ldap extended error message is 000020AF: SvcErr: DSID-0321032A, problem 5002 (UNAVAILABLE), data 1722
(Xuất hiện thông báo, chọn “YES”)

Win32 error returned is 0x20af(The requested FSMO operation failed. The current FSMO holder could not be contacted.))
Depending on the error code this may indicate a connection,
ldap, or role transfer error.
Transfer of infrastructure FSMO failed, proceeding with seizure …
Server “ser.anthaifood.com” knows about 5 roles
Schema – CN=NTDS Settings,CN=SER,CN=Servers,CN=Default-First-Site-Name,CN=Sites,CN=Configuration,DC=anthaifood,DC=co m
Domain – CN=NTDS Settings,CN=SER,CN=Servers,CN=Default-First-Site-Name,CN=Sites,CN=Configuration,DC=anthaifood,DC=co m
PDC – CN=NTDS Settings,CN=SER,CN=Servers,CN=Default-First-Site-Name,CN=Sites,CN=Configuration,DC=anthaifood,DC=co m
RID – CN=NTDS Settings,CN=SER,CN=Servers,CN=Default-First-Site-Name,CN=Sites,CN=Configuration,DC=anthaifood,DC=co m
Infrastructure – CN=NTDS Settings,CN=SER,CN=Servers,CN=Default-First-Site-Name,CN=Sites,CN=Configuration,DC=anthaifood,DC=co m
fsmo maintenance: quit ‘Lệnh thứ 11 trong wá trình Operation Master
ntdsutil: quit ‘Lệnh thứ 12 trong wá trình Operation Master
Disconnecting from ser.anthaifood.com…

C:\>
——————————————————–

3./ Bây giờ ta thử bằng cách từ máy DC 2 (vừa được lên master) ta tạo user và từ máy client có thể join vào domain bằng user mới được tạo.


reflink: http://roseandgun.wordpress.com/2008/04/09/thi%E1%BA%BFt-l%E1%BA%ADp-hai-server-ch%E1%BA%A1y-song-song-ph%E1%BA%A7n-iii-master-operation/