Showing posts with label Server Configuration. Show all posts
Showing posts with label Server Configuration. Show all posts

Sunday, November 02, 2008

Event ID 7000 (Service Control Manager Timeout)

To work around this problem, increase the default timeout value for the service control manager in the registry.


To increase the timeout value in the registry, follow these steps:


If the ServicesPipeTimeout value is not available, add the new DWORD value, and then set its value data to 60000 in the Control key. To do so, follow these steps: a. Locate and then click the following registry key:


HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet

b. Click the Control subkey.

c. On the Edit menu, point to New, and then click DWORD Value.

d. Type ServicesPipeTimeout, and then press ENTER.

e. Right-click the ServicesPipeTimeout DWORD value, and then click Modify.

f. Click Decimal.

g. Type a value of 120000, and then click OK.

The value is 120000 milliseconds and is equivalent to 120 seconds or to one minute.


Note This change does not take effect until the computer is restarted.

Thursday, March 06, 2008

การเพิ่ม Custom Time Server เข้าไปในแถบ Internet Time ของ Windows XP, 2003

ไปที่ Register Key HKLM\SOFTWARE\Microsoft\Windows\CurrentVersion\DateTime\Servers
เพิ่ม String Value = 3 ใส่ค่า pool.ntp.org
Default = 3

Tuesday, January 22, 2008

Auto Logon with Domain Account

ปกติแล้วเครื่องที่เป็นสมาชิก Domain จะถูก Disable Auto Logon เอาไว้อยู่แล้ว จะต้องไปแก้ไข Registry HKLM\Software\Microsoft\Windows NT\CurrentVersion\Winlogon

AutoAdminLogon = 1

DefaultDomainName = <ชื่อ Domain ของเราในแบบ Netbios> ### ก็คือที่แสดงอยู่ใน dropdown ที่จะให้เลือกตอน Logon นั่นเอง

DefaultUserName = <ชื่อ User ที่จะให้ Auto Logon> ### จะต้องเป็น Blank Password

Note
บางทีถ้าเปลี่ยน DefaultDomainName แล้วอาจจะทำให้ค่า AutoAdminLogon reset กลับไปเป็น 0 ได้ จะต้องเข้ามาทำซ้ำอีกครั้ง

เสร็จแล้วสั่ง RUN > control userpasswords2 แล้วเพิ่ม Domain User ที่ต้องการให้ Auto Logon เข้ามา
เลือก Group Membership ให้เป็น Administrators (ของ Local Computer) ทดสอบด้วยการ Restart

Note
- ถ้าต้องการให้ Autorun โปรแกรมหลังจากที่ Logon เสร็จสามารถทำ Shortcut ไปใส่เอาไว้ใน Startup ของ User นั้นๆได้

- ควรเพิ่มความปลอดภัยให้กับ User นี้โดยการกำหนด Workstation ที่จะสามารถ Logon ได้โดย Logon to Workstation และ User cannot change password.

Monday, January 21, 2008

Reverse Lookup Zones and Event ID 40961

Reverse DNS records, aka PTR records, are used when you have an IP address you need to resolve to a name. While it is not 100% necessary to create a reverse lookup zone in your Active Directory domain this is a popular error.

Event Type: Warning Event Source: LSASRV Event Category: SPNEGO (Negotiator) Event ID: 40961 Date: 1/1/2005 Time: 12:30:45PM User: N/A Computer: COMPUTERNAME Description: The Security System could not establish a secured connection with the server DNS/prisoner.iana.org. No authentication protocol was available.

So what is prisoner.iana.org? Well its a blackhole of sorts. RFC 1918 defines three zones called 10.in-addr.arpa, 16.172.in-addr.arpa, and 168.192.in-addr.arpa on three DNS servers called blackhole-1.iana.org, blackhole-2.iana.org and prisoner.iana.org containing these zones. When a client updates its DNS PTR record it will update the reverse lookup zone xxx.xxx.in-addr.arpa. If you have a reverse lookup zone configured, it will be successful. However if you do not have a reverse lookup zone, thanks to RFC 1918, it will try to register itself with prisoner.iana.org (or one of the other blackhole servers) and fail.

To resolve this issue create a reverse lookup zone. It is ok to ignore this warning but best practice would be to configure a reverse lookup zone.

Saturday, December 15, 2007

การเพิ่ม Time Server และเปลี่ยนแปลงความถึ่ของการ Synchronize

To synchronize more often

find the W32Time registry key given below modify the existing value called "SpecialPollInterval". If you don't see SpecialPollInterval listed in this section, you can create it as a new DWORD value. The value of this should be set to the number of Seconds between sync attempts. If you wanted to check once per day, the value would be 86400.

System Key: [HKEY_LOCAL_MACHINESYSTEMCurrentControlSetServicesW32TimeTimeProvidersNtpClient]
Value Name: SpecialPollInterval
Data Type: REG_DWORD (DWORD Value)
Value Data: Seconds in Decimal

To add more time servers

first check to see if your version of Windows will let you simply type them in on the screen shown above. If so, this saves you the trouble and possible problems of editing the registry yourself.

If your version of Windows won't let you simply add them on the screen above, you may need to add them manually yourself. Find the registry key for DateTime Servers provided in full below and create a new string value. Name it the next number in sequence (usually '3') and set the data of the new value to equal the hostname or IP address of the time server.

You can also change the default server by setting the value of "(Default)" to the entry number of the required server.

System Key: [HKEY_LOCAL_MACHINESOFTWAREMicrosoftWindowsCurrentVersionDateTimeServers]
Value Name: (Default)
Data Type: REG_SZ (String Value)
Value Data: Server Hostname or IP Address

Sunday, November 04, 2007

Windows Time Synchronization

การ Synchronize ของ Windows 2003/2000/NT จะขึ้นอยู่กับ Windows Time Serivce (W32time)
Windows 2003 ใช้ NTP
Windows XP ใช้ SNTP/NTP
Windows 2000 ใช้ SNTP

Default time sync
Windows 2003 every 15 minutes
Windows XP every 7 days
Windows 2000 every 45 minutes จนกว่าจะสำเร็จ หลังจากนั้นทุกๆ 8 ชั่วโมง

เราต้องการที่จะทำให้ DC ของ Domain sync กับ Time Server ภายนอก แล้ว Workstation ทุกตัว Sync กับ DC อีกที

W32Time ใช้ Network Time Protocol (NTP) หรือ Simple Network Time Protocol (SNTP) ในการ synchronize Windows 2000/2003 network.
(The only available input to W32Time is NTP or SNTP) แต่ NTP จะมีความแม่นยำมากกว่า SNTP

EventID 29,38,47,50 แสดงถึงการที่ W32time ไม่สามารถ sync time ได้

Synchronizing a Windows 2003 domain controller or Windows XP client (SP2) to a time server

1. Stop W32time service
2. ตั้งเวลาของเครื่องให้ย้อนหลังกลับไป เพื่อทดสอบว่าเมื่อ w32time ทำงานปกติแล้ว เวลาจะถูกตั้งค่าอย่างถูกต้องหรือไม่
3. Define the authoritative time server and configure the windows 2003 domain controller or XP workstation for NTP client mode

โดย default แล้ว Windows 2003 และ Windows XP SP2 จะถูกกำหนดให้ sync time กับ external time server เอาไว้อยู่แล้ว แต่จะถูกตั้งค่าให้ทำงานใน mode Symmetric Active mode แต่ NTP time server จะตอบสนองเฉพาะกับ Client Mode เท่านั้น จึงต้องเปลี่ยน mode ก่อนโดย ไปที่ CMD แล้วสั่ง

w32tm /config /manualpeerlist:xxx.xxx.xxx.xxx,0x8 /syncfromflags:MANUAL

โดยที่ xxx.xxx.xxx.xxx คือ ip ของ NTP time server

4. เสร็จแล้วสั่งใช้ service w32time ทำงาน แล้วสั่ง w32tm /resync ใน CMD

ตรวจสอบดูเวลาของเครื่องว่าตรงหรือยัง

Note
0x1 = Instead of following the NTP specification, wait for the interval specified in the SpecialPollInterval entry before attempting to recontact this time source. Setting this flag decreases network usage, but it also decreases accuracy.

0x2 = Use this time source only as a fallback. If all time sources that are not fallbacks have failed, then the system selects one fallback time source at random and uses it.

0x4 = Set the local computer to operate in symmetric active mode in the association with this source.

0x8 = Set the local computer to operate in client mode in the association with this source.

Wednesday, March 14, 2007

Public DNS Server

Google DNS
8.8.8.8
8.8.4.4

OpenDNS
208.67.222.222
208.67.220.220

Level 3
4.2.2.2

True Intenet
203.144.207.29
203.144.207.49

Cat Telecom
61.19.245.245
61.19.245.246
202.129.27.133

KSC
203.155.33.1

Saturday, January 27, 2007

Removing Old Network Card

Create environmental variable:
DEVMGR_SHOW_NONPRESENT_DEVICES=1
Reboot, then go into device manager and VIEW\SHOW HIDDEN DEVICES.
You will then see all of the hardware ghosts. Right click and uninstall under network adapters.

Tuesday, November 21, 2006

Windows Time Services

เครื่องทุกเครื่องที่อยู่ใน Domain จะ Sync time มาจาก PDC Master แล้ว PDC Master ก็จะ Sync time มาจาก Time Server ภายนอกอีกทีปกติแล้วจะเป็น time.windows.com เราวิธีตรวจสอบว่า Sync time มาจากไหนได้จากคำสั่ง
net time /querysntp

For Windows XP
ถ้าต้องการเปลี่ยน time server ใช้คำสั่ง
net time /setsntp:pool.ntp.org
เสร็จแล้วสั่ง restart windows time service จากคำสั่ง
net stop w32time
net start w32time

For Windows Server 2003

net time /setsntp:pool.ntp.org
w32tm /config /update
w32tm /resync /rediscover /nowait

ถ้ายังไม่ได้ผลให้ลงโปรแกรม SP TimeSync ที่เครื่อง Domain Controller ที่เป็น PDC Master (หา PDC Master ได้จาก Active Directory User and Computer ตรง Operation Master) เลือก Version ที่เป็น Unicode สำหรับ Windows Server 2003

Friday, November 10, 2006

การดูรายละเอียดของ User โดยใช้ Acctinfo.dll (thelazyadmin.com)

หา download ได้ฟรีจาก Windows 2003 Resource Kit แล้วสั่ง
regsvr32 %systemroot%\system32\acctinfo.dll
จะทำให้ในแถบ User Properties ของ Active Directory User and Computer มีแถบ Additional Account Info เพิ่มขึ้นมา

Wednesday, July 26, 2006

การย้าย User โดยใช้ Profile เดิม

บางทีมีการเปลี่ยน Username ที่ใช้ Logon หรือว่า SID ของเราเปลี่ยนแปลงจะทำให้ Windows สร้าง Profile ใหม่ให้เรา ถ้าเรายังต้องการใช้ Profile เดิมสามารถทำได้ดังนี้คือ
1. หา path ของ profile ที่ใช้อยู่เดิม กับ path ของ profile ใหม่
2. Logon เป็น User อะไรก็ได้เพื่อไปแก้ใขคีย์ HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows NT\CurrentVersion\ProfileList หาชื่อ path ของ profile ใหม่แล้วเปลี่ยนให้เป็น path ของ profile เดิม
3. Logout แล้ว login เข้ามาใหม่

Note
- ถ้า User ใหม่ได้สิทธิเป็น Admin จะไม่ค่อยเกิดปัญหา

Monday, July 24, 2006

Windows Server 2003 R2 Quota and File Screening

Quota ใน Windows 2003 มีข้อจำกัดเหมือนกับใน Windows 2000 คือ
1. ไม่สามารถกำหนดได้ให้กับ Folder ได้ (ทำได้ในระดับ Volume)
2. ไม่สามารถกำหนด Quota ให้กับ Group ได้ (ทำได้ในระดับ User)

- แต่ Windows 2003 R2 ได้เพิ่มความสามารถในการกำหนด Quota ให้กับ Folder ขึ้นมา โดยจะต้อง Install Component File Server Resource Manager (FSRM) แล้วจะสามารถกำหนด Quota ได้ในระดับ Folder ได้

- คุณสมบัติที่มีประโยชน์อีกอันก็คือ Auto Quota โดยจะสามารถกำหนด Quota ให้กับ Folder ที่สร้างใหม่ แล้ว Folder นั้นจะถูกกำหนด Quota ตาม Parent ของมัน เวลาสร้าง Auto Quota ให้เลือก Auto Apply template and create quotas on existing and new subfolders.

- กรณีที่ใช้ Auto Quota แล้วต้องการแก้ Quota ของบาง Subfolder ให้ไปแก้ Quota Filter ให้เป็น All ทั้งหมด FSRM จะแสดง Quota ของทุก Subfolder แล้วจะสามารถแก้ Quota ของ Subfolder ที่ต้องการได้ นอกจากนี้ยังสามารถกำหนด Auto Quota ให้กับ Subfolder ซ้อนเข้าไปอีกก็ได้

- อย่าลืมไป Enable Audit Delete files and Folder ด้วย กรณีทีการลบงานของคนอื่น
- สามารถใช้คุณสมบัติ File Screening เพื่อป้องกันไม่ให้ copy file เพลงหรือหนังลง home ได้ วิธีทำจะคล้ายกับการกำหนด quota เมื่อ enable แล้วจะไม่สามารถ copy file ลงไปได้
- สามารถไป enable การ email รายงานการใช้เนื้อที่ได้ แต่ต้องมีการ config smtp server ด้วย