准备新装个VPC将PDC转移过来,发现从2000开始到2003升级都不是那么的容易,记得当时NT时代只需要鼠标操作就可以将BDC取代PDC但是现在看来是不行了,好不容易找到了一片文章,这里总结一下如果在PDC离线和在线状态下迁移

文章如下
多域控制器环境下Active Directory灾难恢复

--------------------------------------------------------------------------------

摘要
本文讲述了在多域控制器环境下,主域控制器由于硬件故障突然损坏,而又事先又没有做好备份,如何使额外域控制器接替它的工作,使Active Directory正常运行,并在硬件修理好之后,如何使损坏的主域控制器恢复。

--------------------------------------------------------------------------------

目录
Active Directory操作主机角色概述
环境分析
从AD中清除主域控制器DC-01.test.com 对象
在额外域控制器上通过ntdsutil.exe工具执行夺取五种FMSO操作
设置额外域控制器为GC(全局编录)
重新安装并恢复损坏主域控制器
附:用于检测AD中五种操作主机角色的脚本

--------------------------------------------------------------------------------

一、Active Directory操作主机角色概述
Active Directory 定义了五种操作主机角色(又称FSMO): 
架构主机 schema master、
域命名主机 domain naming master
相对标识号 (RID) 主机 RID master
主域控制器模拟器 (PDCE) 
基础结构主机 infrastructure master
而每种操作主机角色负担不同的工作,具有不同的功能:
架构主机
具有架构主机角色的 DC 是可以更新目录架构的唯一 DC。这些架构更新会从架构主机复制到目录林中的所有其它域控制器中。 架构主机是基于目录林的,整个目录林中只有一个架构主机。
域命名主机 
具有域命名主机角色的 DC 是可以执行以下任务的唯一 DC: 
向目录林中添加新域。 
从目录林中删除现有的域。 
添加或删除描述外部目录的交叉引用对象。 
相对标识号 (RID) 主机
此操作主机负责向其它 DC 分配 RID 池。只有一个服务器执行此任务。在创建安全主体(例如用户、
组或计算机)时,需要将 RID 与域范围内的标识符相结合,以创建唯一的安全标识符 (SID)。 每一个 
Windows 2000 DC 都会收到用于创建对象的 RID 池(默认为 512)。RID 主机通过分配不同的池来确保这
些 ID 在每一个 DC 上都是唯一的。通过 RID 主机,还可以在同一目录林中的不同域之间移动所有对象。
域命名主机是基于目录林的,整个目录林中只有一个域命名主机。相对标识号(RID)主机是基于域的,目录林中的每个域都有自己的相对标识号(RID)主机
PDCE 
主域控制器模拟器提供以下主要功能: 
向后兼容低级客户端和服务器,允许 Windows NT4.0 备份域控制器 (BDC) 加入到新的 Windows 2000 环境。 本机 Windows 2000 环境将密码更改转发到 PDCE。每当 DC 验证密码失败后,它会与 PDCE 取得联系,以查看该密码是否可以在那里得到验证,也许其原因在于密码更改还没有被复制到验证 DC 中。 
时间同步 — 目录林中各个域的 PDCE 都会与目录林的根域中的 PDCE 进行同步。
PDCE是基于域的,目录林中的每个域都有自己的PDCE。 
基础结构主机
基础结构主机确保所有域间操作对象的一致性。当引用另一个域中的对象时,此引用包含该对象的
全局唯一标识符 (GUID)、安全标识符 (SID) 和可分辨的名称 (DN)。如果被引用的对象移动,则在域中担
当结构主机角色的 DC 会负责更新该域中跨域对象引用中的 SID 和 DN。
基础结构主机是基于域的,目录林中的每个域都有自己的基础结构主机
默认,这五种FMSO存在于目录林根域的第一台DC(主域控制器)上,而子域中的相对标识号 (RID) 主机、PDCE 、基础结构主机存在于子域中的第一台DC。

--------------------------------------------------------------------------------

二、环境分析
公司Test.com(虚拟)有一台主域控制器DC-01.test.com,还有一台额外域控制器DC-02.test.com。现主域控制器(DC-01.test.com)由于硬件故障突然损坏,事先又没有DC-01.test.com的系统状态备份,没办法通过备份修复主域控制器(DC-01.test.com),我们怎么让额外域控制器(DC-02.test.com)替代主域控制器,使Acitvie Directory继续正常运行,并在损坏的主域控制器硬件修理好之后,如何使损坏的主域控制器恢复。
如果你的第一台DC坏了,还有额外域控制器正常,需要在一台额外域控制器上夺取这五种FMSO,并需要把额外域控制器设置为GC。

--------------------------------------------------------------------------------

三、从AD中清除主域控制器DC-01.test.com对象
3.1在额外域控制器(DC-02.test.com)上通过ntdsutil.exe工具把主域控制器(DC-01.test.com)从AD中删除;
c:>ntdsutil
ntdsutil: metadata cleanup
metadata cleanup: select operation target
select operation target: connections
server connections: connect to domain test.com
select operation target: list sites
Found 1 site(s)
0 - CN=Default-First-Site-Name,CN=Sites,CN=Configuration,DC=test,DC=com
select operation target: select site 0
Site - CN=Default-First-Site-Name,CN=Sites,CN=Configuration,DC=test,DC=com
No current domain
No current server
No current Naming Context
select operation target: List domains in site
Found 1 domain(s)
0 - DC=test,DC=com
Found 1 domain(s)
0 - DC=test,DC=com
select operation target: select domain 0
Site - CN=Default-First-Site-Name,CN=Sites,CN=Configuration,DC=test,DC=com
Domain - DC=test,DC=com
No current server
No current Naming Context
select operation target: List servers for domain in site
Found 2 server(s)
0 - CN=DC-01,CN=Servers,CN=Default-First-Site-Name,CN=Sites,CN=Configuration,DC=te
st,DC=com
1 - CN=DC-02,CN=Servers,CN=Default-First-Site-Name,CN=Sites,CN=Configuration,DC=te
st,DC=com
select operation target: select server 0
select operation target: quit
metadata cleanup:Remove selected server

出现对话框,按“确定“删除DC-01主控服务器。
metadata cleanup:quit
ntdsutil: quit

3.2使用ADSI EDIT工具删除Active Directory users and computers中的Domain controllers中DC-01服务器对象,
ADSI EDIT是Windows 2000 support tools中的工具,你需要安装Windows 2000 support tool,安装程序在windows 2000光盘中的support\tools目录下。打开ADSI EDIT工具,展开Domain NC[DC-02.test.com],展开OU=Domain controllers,右击CN=DC-01,然后选择Delete,把DC-01服务器对象删除,如图1:
3.3 在Active Directory Sites and Service中删除DC-01服务器对象
打开Administrative tools中的Active Directory Sites and Service,展开Sites,展开Default-First-Site-Name,展开Servers,右击DC-01,选择Delete,单击Yes按钮,如图2:

--------------------------------------------------------------------------------

四、在额外域控制器上通过ntdsutil.exe工具执行夺取五种FMSO操作
c:>ntdsutil
ntdsutil: roles
fsmo maintenance: Select operation target
select operation target: connections
server connections: connect to domain test.com
select operation target: list sites
Found 1 site(s)
0 - CN=Default-First-Site-Name,CN=Sites,CN=Configuration,DC=test,DC=com
select operation target: select site 0
Site - CN=Default-First-Site-Name,CN=Sites,CN=Configuration,DC=test,DC=com
No current domain
No current server
No current Naming Context
select operation target: List domains in site
Found 1 domain(s)
0 - DC=test,DC=com
select operation target: select domain 0
Site - CN=Default-First-Site-Name,CN=Sites,CN=Configuration,DC=test,DC=com
Domain - DC=test,DC=com
No current server
No current Naming Context
select operation target: List servers for domain in site
Found 1 server(s)
0 - CN=DC-02,CN=Servers,CN=Default-First-Site-Name,CN=Sites,CN=Configuration,DC=te
st,DC=com
select operation target: select server 0
select operation target: quit
fsmo maintenance:Seize domain naming master
出现对话框,按“确定“
fsmo maintenance:Seize infrastructure master
出现对话框,按“确定“
fsmo maintenance:Seize PDC
出现对话框,按“确定“
fsmo maintenance:Seize RID master
出现对话框,按“确定“
fsmo maintenance:Seize schema master
出现对话框,按“确定“
fsmo maintenance:quit
ntdsutil: quit
(注:Seize是在原FSMO不在线时进行操作,如果原FSMO在线,需要使用Transfer操作


--------------------------------------------------------------------------------

五、设置额外控制(DC-02.test.com)为GC(全局编录)
打开Administrative Tools中的Active Directory Sites and Services,展开Sites,展开Default-First-Site-Name,展开Servers,展开DC-02.test.com(额外控制器),右击NTDS Settings选择Properties,然后在"Global Catalog"前面打勾,单击"确定"按钮,然后重新启动服务器。
六、重新安装并恢复损坏主域控制器
修理好DC-01.test.com损坏的硬件之后,在DC-01.test.com服务器重新安装Windows 2000 Server,安装好Windows 2000 Server之后,再运行Dcpromo升成额外的域控制器;如果你需要使DC-01.test.com担任五种FMSO角色,通过ntdsutil工具进行角色转换,进行Transfer操作就行了(注意:不能用Seize)。并通过Active Directory Sites and Services设置DC-01.test.com为GC,取消DC-02.test.com的GC功能

注:如果PDC在线状态,那么只需要把第四部中的Seize更换为Transfer

检讨ISA2004 VPN部署失败原因

[ 2005/07/14 13:02 | by gOxiA ]

部署前看了些资料,发现并不难,于是开始测试。

搭建好虚拟平台,使用2003SP1系统,ISA2004标准版

安装后没发现什么异常,然后部署VPN,启用后死活就是无法连接上,到底是哪里错了?哪里的配置都没有错啊!只是日志中总有什么防火墙无法写入到注册表,我以为是内存太少造成的也就没有理会,继续分析。就这样折腾了好几天,最后跟一个朋友在QQ谈起来问及补丁的事情才发现,NND问题原来出在没有安装补丁的原因,因为2003SP1的安全级别更高所以会限制ISA的一些运行机制,必须安装ISA2004SP1补丁后才可以,最后急忙打上补丁果然一切OK了,我考!就是一个这个小小的疏忽,让我折腾了几天都没搞明白为什么我错误配置都是对的他NND就是连接不上。

所以我告诫自己,以后一定要查看运行说明,2003SP1看来真的是和自家的产品也过意不去。

ISA2004 SP1的下载地址是:

http://www.microsoft.com/downloads/details.aspx?displaylang=zh-cn&FamilyID=69c5d85c-5c80-473c-9cb4-60dda75d568d

# Example MySQL config file for small systems.
#
# This is for a system with little memory (<= 64M) where MySQL is only used
# from time to time and it's important that the mysqld daemon
# doesn't use much resources.
#
# You can copy this file to
# /etc/my.cnf to set global options,
# mysql-data-dir/my.cnf to set server-specific options (in this
# installation this directory is /usr/local/var) or
# ~/.my.cnf to set user-specific options.
#
# In this file, you can use all long options that a program supports.
# If you want to know which options a program supports, run the program
# with the "--help" option.

# The following options will be passed to all MySQL clients
[client]
#password = your_password
port  = 3306
socket  = /tmp/mysql.sock

# Here follows entries for some specific programs

# The MySQL server
[mysqld]
old_password
basedir=C:/mysql
datadir=C:/mysql/data

port  = 3306
socket  = /tmp/mysql.sock
skip-locking
key_buffer = 16K
max_allowed_packet = 1M
table_cache = 4
sort_buffer_size = 64K
read_buffer_size = 256K
read_rnd_buffer_size = 256K
net_buffer_length = 2K
thread_stack = 64K

# Don't listen on a TCP/IP port at all. This can be a security enhancement,
# if all processes that need to connect to mysqld run on the same host.
# All interaction with mysqld must be made via Unix sockets or named pipes.
# Note that using this option without enabling named pipes on Windows
# (using the "enable-named-pipe" option) will render mysqld useless!
#
#skip-networking
server-id = 1

# Uncomment the following if you want to log updates
#log-bin

# Uncomment the following if you are NOT using BDB tables
#skip-bdb

# Uncomment the following if you are using InnoDB tables
#innodb_data_home_dir = /usr/local/var/
#innodb_data_file_path = ibdata1:10M:autoextend
#innodb_log_group_home_dir = /usr/local/var/
#innodb_log_arch_dir = /usr/local/var/
# You can set .._buffer_pool_size up to 50 - 80 %
# of RAM but beware of setting memory usage too high
#innodb_buffer_pool_size = 16M
#innodb_additional_mem_pool_size = 2M
# Set .._log_file_size to 25 % of buffer pool size
#innodb_log_file_size = 5M
#innodb_log_buffer_size = 8M
#innodb_flush_log_at_trx_commit = 1
#innodb_lock_wait_timeout = 50

[mysqldump]
quick
max_allowed_packet = 16M

[mysql]
no-auto-rehash
# Remove the next comment character if you are not familiar with SQL
#safe-updates

[isamchk]
key_buffer = 8M
sort_buffer_size = 8M

[myisamchk]
key_buffer = 8M
sort_buffer_size = 8M

[mysqlhotcopy]
interactive-timeout

实际上最主要的就是添加红色部分的设置。

分页: 443/479 第一页 上页 438 439 440 441 442 443 444 445 446 447 下页 最后页 [ 显示模式: 摘要 | 列表 ]