RSS

case 17 计算机的加域失败

11 Nov

最近遇到的计算机加域失败问题真的好多。大概的解决思路如下:

1、测试端口

135/TCP RPC

445/TCP SMB

389/TCP/UDP LDAP

636/TCP LDAP SSL

3268/TCP LDAP GC

3269/TCP LDAP GC SSL

53/TCP/UDP DNS

88/TCP/UDP Kerberos

上面就是加域的时候,计算机与DC的交互端口,必须双向都通!

2、如果都通,但是就是无法加域,需要去查看日志:

C:\WINDOWS\Debug\netsetup.log

我今天遇到的问题就是

11/11 14:57:04 NetpDoDomainJoin
11/11 14:57:04 NetpMachineValidToJoin: ‘BJ-DPM-01’
11/11 14:57:04 NetpGetLsaPrimaryDomain: status: 0x0
11/11 14:57:04 NetpMachineValidToJoin: status: 0x0
11/11 14:57:04 NetpJoinDomain
11/11 14:57:04     Machine: BJ-DPM-01
11/11 14:57:04     Domain: AAAA.ad\bj-dc-12
11/11 14:57:04     MachineAccountOU: (NULL)
11/11 14:57:04     Account: AAAA\yangxun
11/11 14:57:04     Options: 0x3
11/11 14:57:04     OS Version: 5.2
11/11 14:57:04     Build number: 3790
11/11 14:57:04     ServicePack: Service Pack 2
11/11 14:57:04 NetpValidateName: checking to see if ‘AAAA.ad’ is valid as type 3 name
11/11 14:57:05 NetpCheckDomainNameIsValid [ Exists ] for ‘AAAA.ad’ returned 0x0
11/11 14:57:05 NetpValidateName: name ‘AAAA.ad’ is valid for type 3
11/11 14:57:05 NetUseAdd to \\bj-dc-12\IPC$ returned 53
11/11 14:57:05 NetpJoinDomain: status of connecting to dc ‘\\bj-dc-12’: 0x35
11/11 14:57:05 NetpDoDomainJoin: status: 0x35

其实解决办法还是很简单的就是重启TCP/IP NetBIOS Helper服务就好了。这个问题虽然小,但是挺让人发愁的。

另外来个脚本帮忙看这个日志,缺点无法中途停止,你需要使用taskmgr去kill。

Const ForReading = 1 
 
Set objFSO = CreateObject("Scripting.FileSystemObject")
Set objTextFile = objFSO.OpenTextFile("d:\Netsetup.log", _
    ForReading) 
 
Do While objTextFile.AtEndOfStream <> True
    strLinetoParse = objTextFile.ReadLine
    dtmEventDate = Mid(strLinetoParse, 1, 6)
    dtmEventTime = Mid(strLinetoParse, 7, 9)
    strEventDescription = Mid(strLinetoParse, 16)
    Wscript.Echo "Date: " & dtmEventDate
    Wscript.Echo "Time: " & dtmEventTime
    Wscript.Echo "Description: " & strEventDescription & VbCrLf
Loop
objTextFile.Close
Advertisements
 
Leave a comment

Posted by on November 11, 2009 in Windows Server

 

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s

 
%d bloggers like this: