活动目录学习笔记.doc_第1页
活动目录学习笔记.doc_第2页
活动目录学习笔记.doc_第3页
活动目录学习笔记.doc_第4页
活动目录学习笔记.doc_第5页
已阅读5页,还剩4页未读 继续免费阅读

下载本文档

版权说明:本文档由用户提供并上传,收益归属内容提供方,若内容存在侵权,请进行举报或认领

文档简介

关于活动目录的学习笔记一、 活动目录的结构。AD主要包括数据库和SYSVOL共享;如下:1、 数据库。基于扩展存储引擎(ese)的数据库,类似Exchange。默认在%systemroot%NTDS目录下,主要包括的文件有:ntds.dit-数据库文件、edb.chk-检查点文件(checkpoint)、edb*.log-日志文件、res1.log和res2.log-保留日志文件(这两个文件各占用10M磁盘空间,当磁盘空间不足时释放出来供AD使用)。 这个ESE引擎是微软专门为保存非关系型数据而开发的,在微软的很多系统中都有应用:例如,AD的数据库(ntds.dit文件)、Exchange的数据库(*.edb和*.stm),还有Windows DHCP、Windows WINS、SRS等,后台都是由ESE数据库来提供支持的。2、 SYSVOL共享。Domain文件夹存放域级别策略与脚本。具体的policies中存放策略,scripts中存放脚本。Enterprise文件夹存放企业级别策略与脚本。具体的policies中存放策略,scripts中存放脚本。Staging Areas文件夹是交换区域,多台DC之间的信息交换的缓存区域;本身是空的,挂接到Staging文件夹。sysvol文件夹是客户端真正访问的区域,本身是空的,挂接到Domain文件夹。二、 创建活动目录。命令:Dcpromo;安装:1、新域新树新森林;2、已有域的附加DC;3、已有域树的新的子域;4、新的域树;或删除、降级DC。安装注意事项:活动目录恢复模式(DSRM)密码;AD存储位置;数据库、日志和SYSVOL共享文件夹的存储位置,存储在相同/不同的卷或物理磁盘,要考虑磁盘I/O性能、DC角色、荷载等。三、 操作主控(Operation Master Roles或FSMO)和全局编录(GC)。五种操作主控:构架主控(Schema Master)注册:regsvr32 schmmgmt.dll域命名主控(Domain Naming Master)PDC仿真器(PDC Emulator)RID主控(RID Master)基础架构主控(Infrastructure Master)。操作主控的查询:命令行netdom query FSMOGUI下,查询构架主控Active Directory 架构 查询域命名主控(Domain Naming Master)Active Directory域和信任关系查询PDC仿真器(PDC Emulator)Active Directory域和信任关系查询RID主控(RID Master) Active Directory域和信任关系查询基础架构主控(Infrastructure Master)Active Directory域和信任关系操作主控的迁移和抢夺:ntdsutil。后面数据库部分详细讲。能够转移尽量不要抢夺。FSMO&GC最佳实践:构架主控(Schema Master)、域命名主控(Domain Naming Master)放在森林的首台DC上;PDC仿真器(PDC Emulator)、RID主控(RID Master) 放在各自域的首台DC上;基础架构主控(Infrastructure Master)放在域的首台DC之外的其他DC上.。GC原则上要和构架主控(Schema Master)放在同一台DC上;不要和基础架构主控(Infrastructure Master)放在同一台DC上。对于GC主要标志是TCP3268/3269 Port的监听。命令查询:nltest /dsgetdc 四、 数据库 数据库的操作:ntdsutil、esentutl(类似eseutil)、ADSI Edit。Ntdsuti的常用功能:1、Authoritative restore-权威恢复(增加修订号);2、Metadata cleanup-清除元数据(清除离线的、无法修复的DC的数据);3、Roles-操作主控的迁移和抢夺;4、files-数据库文件和日志文件的迁移、数据库碎片整理。Ntdsutil使用实例清除元数据(用于DC离线和重新安装DC):At the command line, type ntdsutil and press ENTER.At the ntdsutil: prompt, type metadata cleanup and press ENTER.At the metadata cleanup: prompt, type connections and press ENTER.At the server connections: prompt, type connect to server servername, where servername is the domain controller (any functional domain controller in the same domain) from which you plan to clean up the metadata of the failed domain controller. Press ENTER.Type quit and press ENTER to return you to the metadata cleanup: prompt.Type select operation target and press ENTER.Type list domains and press ENTER. This lists all domains in the forest with a number associated with each.Type select domain number, where number is the number corresponding to the domain in which the failed server was located. Press ENTER.Type list sites and press ENTER.Type select site number, where number refers to the number of the site in which the domain controller was a member. Press ENTER.Type list servers in site and press ENTER. This will list all servers in that site with a corresponding number.Type select server number and press ENTER, where number refers to the domain controller to be removed.Type quit and press ENTER. The Metadata cleanup menu is displayed.Type remove selected server and press ENTER.At this point, Active Directory confirms that the domain controller was removed successfully. If you receive an error that the object could not be found, Active Directory might have already removed from the domain controller.Type quit, and press ENTER until you return to the command prompt. Ntdsutil使用实例迁移/抢夺操作主控(用于DC离线和重新安装DC):At the command line, type ntdsutil and press ENTER.At the ntdsutil: prompt, type roles and press ENTER.At the metadata cleanup: prompt, type connections and press ENTER.At the server connections: prompt, type connect to server servername, where servername is the domain controller (any functional domain controller in the same domain) from which you plan to clean up the metadata of the failed domain controller. Press ENTER.Type quit and press ENTER to return you to the metadata cleanup: prompttransfer pdc or seize pdcrid masterinfrastructure masterschema masterdomain naming masterquitAuthoritative restore(权威恢复)和files(数据库文件、日志文件的迁移(移动到更新、更大的磁盘)和数据库的碎片整理)一般要进入活动目录恢复模式(DSRM)。Esentutl 类似Exchange中的eseutil,可以对数据库进行底层操作。察看数据库的空闲空间(Offline)命令:esentutl /ms c:windowsntdsntds.dit数据库处于dirty shutdown状态时,用于重演日志,将数据库变成clean shutdown状态 命令:esentutl /r离线压缩、碎片整理,Ntdsutifiles中的响应功能是对这个命令的调用。命令:esentutl /d五、 SYSVOL共享策略的下载和应用。登陆脚本、GPO的同步,FRS服务复制。工具:ADSI Edit、linkd常见问题FRS Event Error 13511:SYSVOL磁盘空间不足。解决方案:移动SYSVOL文件夹。1、停止ntfs服务;将SYSVOL文件夹复制到目的位置;2、修改注册表:HKEY_LOCAL_MACHINESYSTEMCurrentControlSetServicesNetlogonParameters sysvol值改为目的位置的sysvol文件夹。3、打开ADSI Edit,打开Domain容器,打开相应的域、OU=Domain Controllers、DC位置;展开NTFRS(CN=NTFRS Subscriptions)右边的CN=Domain System Volume (SYSVOL share),右击-属性-fRSStagingPath-修改其值为目的位置sysvolstagingdomain,4、命令行下进入原有的sysvolstaging areas,linkd 域名目的位置sysvolstagingdomain;5、ADSI Edit-Domain Domain name-OU=Domain Controllers-DC-CN=NTFRS Subscriptions-右边的CN=Domain System Volume (SYSVOL share),右击-属性-fRSRootPath-修改其值为目的位置sysvoldomain;6、命令行下进入原有的sysvolsysvol,linkd 域名目的位置sysvolstagingdomain;7、修改注册表,把这个sysvol标记为非权威。HKEY_LOCAL_MACHINESYSTEMCurrentControlSetServicesntfrsParametersBackup/RestoreProcess at StartupBurFlags=dword:000000d28、启动ntfs服务;并用net share命令检测。FRS Event Error 13522:Staging Areas磁盘空间不足。解决方案:为Staging Areas分配额外的磁盘空间。默认1M到675M。修改如下注册表键值,注意单位是KB,数值时十六进制的。HKEY_LOCAL_MACHINESYSTEMCurrentControlSetServicesNtFrsParametersStaging Space Limit in KB=dword:00190000重建和重新挂接SYSVOL文件夹。还原系统状态后,可能需要重建和重新挂接SYSVOL。1、察看复制是否正常。命令:dcdiag /test:replications2、进入目录服务恢复模式(DSRM),停止NTFRS服务;3、修改注册表,把这个标记为非权威。4、进入另一台DC的admin$共享,复制sysvol。5、启动NTFRS服务;重新挂接SYSVOL文件夹,操作与移动SYSVOL文件夹类似。性能监视:FRS复制流量,Staging Areas占用空间。六、 DNS DNS 服务器在Active Directory 中,除了提供名称格式的支持服务,一般的名称到IP地址的查询外,最重要作用是记录域控制器与全局编录服务器的相关信息,并向客户端提供这些重要信息;域控制器会在DNS服务器上注册,注册的记录不仅包括主机记录(A记录),而且包括相应的服务记录(SRV 记录),类似于:_ldap._tcp.dc._. 600 IN SRV 0 100 389 上面这条记录代表 域的域控制器是; 客户端需要查询这些记录,才能找到域控制器,并完成用户登录,Active Directory 查询等工作; Active Directory 的正常工作,依赖于DNS 服务的正确配置和正常工作个人经验中至少50%的Active Directory故障源于DNS配置问题_msdcs Zone _msdcs 区域中包含所有域控制器的服务记录(SRV记录),DC、GC等 Active Directory 森林的根域中的_msdcs区域中还额外包含森林中所有的全局编录服务器的记录 _msdcs 区域的作用是为了定位域控制器和全局编录服务器,如果该区域不存在或的记录不正确,Active Directory 会出现故障Resolve DNS Configuration Problem使用NSLOOKUP来验证DNS记录是否完整。查询_ldap的SRV记录如果DNS记录缺失,通过以下方法来进行修复:1、重新启动Net Logon 服务2、使用nltest.exe /dsregdns(windows server 2003有效)3、将%systemroot%system32confignetlogon.dns文件导入%systemroot%system32dns下的区域文件中。要求:将区域改为主区域并暂停该区域。 注意DNS配置要求:允许动态更新,区域名称和AD域名相一致,DNS服务器本身需要配置DNS域名后缀等DNS最佳实践:在所有的DC上都安装DNS服务;所有的DNS区域都集成到AD,并设置为动态更新;存根区域。在GC上建立单独的_msdcs区域,并将该区域委派到本地DNS。针对DNS域的转发设置。七、 DC长期离线的处理带来的危害1、幽灵帐号(tombstone标记超过60天,没有同步);2、无效的SYSVOL共享;3、无效的操作主控。离线前的准备,要查看和迁移FSMO;强制DC同步;备份系统状态+系统卷;评估DC离线的时间长度,确定是否需要修改。记录离线时间,精确到小时。长期离线的DC上线前处理。查看tombstone Lifetime;禁用该离线DC的出站复制链接;(命令:repadmin /options SERVERNAME+disable_outbound_repl);删除Lindering Object(用ldp tools);修复SYSVOL。DC离线时间超过tombstone Lifetime,不得直接上线。可以考虑重新安装操作系统,再用dcpromo命令重新将其升级为DC。八、 AD备份备份系统状态。主要包括:系统引导文件、系统注册表、类的注册库、SYSVOL共享文件夹、数据库及其日志。好的备份:系统状态+系统磁盘。备份工具:Windows NTBackup、Veritas Backup Exec。九、 AD恢复工具:同上;通常从备份媒体恢复 Active Directory 有下面两种方法: 非权威性恢复、权威性恢复。非权威性恢复。重新启动DC,按F8键进入活动目录恢复模式(DSRM),打开Windows备份工具还原系统状态,如有必要还要还原系统卷。技巧:远程桌面(或终端服务)进入活动目录恢复模式(DSRM),修改远程的boot.ini。启动项后面加参数 /safeboot:dsrepair如下:boot loadertimeout=30default= multi(0)disk(0)rdisk(0)partition(1)WINDOWSoperating systemsmulti(0)disk(0)rdisk(0)partition(2)WINNT=Windows 2000 professional /fastdetectmulti(0)disk(0)rdisk(0)partition(1)WINDOWS=Windows server 2003 DSRM /fastdetect /safeboot:dsrepair进入DSRM,做完相应的修改,重新启动回到正常模式前,再改回来。注意:单DC的域一定是非权威性恢复。权威性恢复。非权威性恢复;重新启动;使用ntdsutil进行AD或子树和叶节点的权威性恢复。ntdsutilAuthoritative restoreRestore DateBase or Restore Subtree +符合ldap语法的 名字最后,确认活动目录恢复的有效性。还有一种可能:重新安装DC。迁移或抢夺需要重装DC的操作主控角色;将该DC离线;在其余的DC上删除该DC的元数据;重新安装该DC的操作系统;用Dcpromo将该服务器升级为DC或使用备份数据恢复该DC。十、 时间服务(w32time)定制时间源。将PDC仿真器或Internet上的公认时间服务器设为时间源。修改注册表的键值HKEY_LOCAL_MACHINESYSTEMCurrentControlSetServicesW32TimeParametersReliableTimeSource=dword:00000001localNTP=dword:00000001Type=NT5DS/NTPNtpServer=,0x1十一、 复制问题 replication复制:1、数据库;2、SYSVOL共享对于数据库的复制,工具Active Diretoty Replication Monitor、RepAdmin和dsastat 诊断:dsastat s:DC01;DC02;DC03 强行同步:RepAdmin对于SYSVOL共享的复制,工具有NTFRSUTL。十二、 日常操作活动目录日常操作列表操作频率任务Daily.Verify that all domain controllers are communicating with the central monitoring console or collector.Daily.View and examine all new alerts on each domain controller,resolving them in a timely fashion.Daily.Resolve alerts indicating the following services are not running:FRS, Net Logon, KDC, W32Time, ISMSERV. MOM reports these as Active Directory Essential Services.Daily.Resolve alerts indicating SYSVOL is not shared.Daily.Resolve alerts indicating that the domain controller is not advertising itself.Daily.Resolve alerts indicating time synchronization problems.Daily.Resolve all other alerts in order of severity. If alerts are givenerror, warning, and information status similar to the event log,resolve alerts marked error first.Daily to weekly, depending on environment.Identify a site that has no global catalog server.Weekly.Review the Time Synchronization Report to detect intermittentproblems and resolve time-related alerts.Weekly.Review the Duplicate Service Principal Name Report to list allsecurity principals that have a service principal name conflict.Monthly.Verify that all domain controllers are running with the same service pack and hot fix patches.Monthly.Review all Active Directory reports and adjust thresholds as needed. Examine each report and determine which reports,data, and alerts are important for your environment and service level agreement.Monthly.Review the Replication Monitoring Report to verify that replication throughout the forest occurs within acceptable limitsMonthly.Review the Active Directory response time reports.Monthly.Review the domain controller disk space reports.Monthly.Review all performance related reports. These reports are called Health Monitoring reports in MOM.As needed.Perform a non-authoritative restore.As needed.Perform an authoritative restore of a subtree or leaf object.As needed.Perform an authoritative restore of the entire directory.As needed. Recover a domain controller through reinstallation.As needed.Restore a domain controller through reinstallation and subsequent restore from backup.As needed.Prepare for Active Directory Installation.As needed.Install Active Directory.活动目录监视操作列表任务要点Verify that all domain controllers arecommunicating with the central monitoring console or collector.Communication failure between the domain controller and the monitoringinfrastructure prevents you from receivingalerts so you can examine and resolvethem.View and examine all new alerts on each domain controller, resolving them in atimely fashion.This precaution helps you avoid service outages.Resolve alerts indicating the following services are not running: FRS, Net Logon, KDC,W32Time, ISMSERV. MOM reports these as Active Directory Essential Services.Active Directory depends on these services.They must be running on every domain controller.Resolve

温馨提示

  • 1. 本站所有资源如无特殊说明,都需要本地电脑安装OFFICE2007和PDF阅读器。图纸软件为CAD,CAXA,PROE,UG,SolidWorks等.压缩文件请下载最新的WinRAR软件解压。
  • 2. 本站的文档不包含任何第三方提供的附件图纸等,如果需要附件,请联系上传者。文件的所有权益归上传用户所有。
  • 3. 本站RAR压缩包中若带图纸,网页内容里面会有图纸预览,若没有图纸预览就没有图纸。
  • 4. 未经权益所有人同意不得将文件中的内容挪作商业或盈利用途。
  • 5. 人人文库网仅提供信息存储空间,仅对用户上传内容的表现方式做保护处理,对用户上传分享的文档内容本身不做任何修改或编辑,并不能对任何下载内容负责。
  • 6. 下载文件中如有侵权或不适当内容,请与我们联系,我们立即纠正。
  • 7. 本站不保证下载资源的准确性、安全性和完整性, 同时也不承担用户因使用这些下载资源对自己和他人造成任何形式的伤害或损失。

评论

0/150

提交评论