2009年12月5日 星期六

Exchange 2007 啟動 outlook anywhere

Server side

 

1.要求憑證 (exchange command line)

New-ExchangeCertificate -GenerateRequest -subjectname "dc=tw,dc=com,dc=mmik,o=Mmik Solutions,cn=mail.mmik.com.tw" -domainname "mail.mmik.com.tw" -PrivateKeyExportable $true -path c:\a.txt

 

2.取得cert檔案

c:\a.txt的內容貼到CA server的網頁去要求憑證 http://127.0.0.1/certsrv

 

3.import cert

Import-ExchangeCertificate -Path c:\certificates\filename.cer -friendlyname "Contoso CAS01"

 

4.check 是否成功

get-exchangecertificate | fl

SBS debug01- application log always show sharepoint error message

 

http://msmvps.com/blogs/cgross/archive/2009/03/29/sharepoint-search-amp-event-id-2436-errors-in-sbs-2008.aspx

*UPDATE:  Still not why the steps below work on some boxes but not others.  However, the SBS team just blogged about the implications of the Loopback Check registry key as well as the ability to register your public URL on your SBS box so that it bypasses the loopback check without having to completely disable the loopback check.  I still recommend reconfiguring SharePoint Search as noted below in addition to registering your public URL to bypass the Loopback Check.

*UPDATE:  We have confirmed that the steps below work on some SBS 2008 boxes, but not all installs.  If these steps do not work, see Dan's entry in the Comment section about disabling the LoopBackCheck in the registry.  Despite what you may see in other forums, SharePoint search will work just fine with https://remote.company.com being the Default security zone for your companyweb - you do not need to edit your alternate access mappings.  Additionally, the SPContent account only needs to be a member of the domain users security group, and the SPSearch account only needs to be a member of the domain users and WSS_WPG security groups.  SharePoint Central Administration will add the SPSearch user account to the WSS_WPG security group when search is configured per the steps below.

*Updated on 2009-03-29 at 9:45am CDT (GMT -5).  Original post missed the steps of stopping the Search service before reconfiguring.

With Small Business Server 2008, SBS customers finally get Windows SharePoint Services 3.0 built-in to replace the SharePoint 2.0 companyweb included with SBS 2003.  However, when you get your SBS 2008 box all set up and running, you may notice a few quirks when it comes to SharePoint search.  Specifically,you are seeing 2436 errors in your Application event log:

Log Name:      Application
Source:        Windows SharePoint Services 3 Search
Date:          3/29/2009 4:20:05 PM
Event ID:      2436
Task Category: Gatherer
Level:         Warning
Keywords:      Classic
User:          N/A
Computer:      server.company.local
Description:
The start address <sts3s://remote.company.com:987/contentdbid={d4078aab-
ce82-4581-8d4f-973e1e6eac23}> cannot be crawled.

Context: Application 'Search index file on the search server', Catalog
'Search'

Details:
    Access is denied. Check that the Default Content Access Account
has access to this content, or add a crawl rule to crawl this content.  
(0x80041205)
Event Xml:
<Event xmlns="http://schemas.microsoft.com/win/2004/08/events/event">
  <System>
    <Provider Name="Windows SharePoint Services 3 Search" />
    <EventID Qualifiers="32768">2436</EventID>
    <Level>3</Level>
    <Task>3</Task>
    <Keywords>0x80000000000000</Keywords>
    <Channel>Application</Channel>
    <Computer>server.company.local</Computer>
    <Security />
  </System>
  <EventData>
    <Data>

Context: Application 'Search index file on the search server', Catalog
'Search'

Details:
    Access is denied. Check that the Default Content Access Account
has access to this content, or add a crawl rule to crawl this content.  
(0x80041205)</Data>
    <Data>sts3s://remote.company.com:987/contentdbid={d4078aab-ce82-4581-
8d4f-973e1e6eac23}</Data>
  </EventData>
</Event>

The issue here is that Windows SharePoint Services Search uses two separate accounts – one user account runs the search service, and the other user account is used to actually access the SharePoint content in order to index it.  When configuring SharePoint Search, SharePoint Central Administration explicitly states that these accounts cannot be built-in accounts (such as LOCAL SYSTEM or NETWORK SERVICE).  By default, SBS 2008 is using built-in windows accounts, which is resulting in this error being generated.

Luckily, this is easy to fix.  The first thing we need to do is to create two new user accounts for SharePoint search to use.  Personally, I do not create these accounts using the SBS add user wizard, because they will effectively be service accounts, so they do not need mailboxes, and we don’t need to see these accounts included in the User account list on the SBS console. 

1.     On your SBS, open Active Directory Users & Computers (Start –> Administrative Tools –> Active Directory Users & Computers.

2.     Within ADU&C, navigate to the Organizational Unit where you want to create the new user accounts.  (Personally, I create a new “Service Accounts” OU under <domain> –> My Business –> Users)

3.     Right-click on the OU and select New –> User

4.     On the first page of the new user window, enter the following info:

o    First Name:   SPSearch

o    Last Name:  <leave blank>

o    Username:   spsearch

5.     Click Next.

6.     Enter a strong password for the new account. 

7.     Uncheck the option “User must change password at next login”

8.     Check the option “User cannot change password”

9.     Check the option “Password never expires”

10.   Click Next

11.   Click Finish.

12.   Repeat steps 3-11, using “SPContent” instead of “SPSearch” in step 4

We do not have to worry about granting any access or permissions to the two new accounts we created.  After the accounts have been created, close Active Directory Users & Computers, then open SharePoint Central Administration  (Start –> Administrative Tools –> SharePoint 3.0 Central Administration). 

1.     When SharePoint 3.0 Central Administration opens, go to the Operations tab.

2.     Click on the “Services on Server” link

3.     In the Action column, click the link to Stop the “Windows SharePoint Services Search” service.

o    You will receive a warning that stopping the search service will remove existing indices.  Click OK to acknowledge the warning.

4.     When you return to the SharePoint Central Administration Operations tab, the Windows SharePoint Search Service will show as stopped.  Click the link to Start the Windows SharePoint Services Search service.  This will open the Search service configuration page.

5.     In the Service Account section, select the “Configurable” option

1.  For a username, enter <DOMAIN>\SPSearch  (where <DOMAIN> is your AD domain).

2.  For a password, enter the strong password you assigned to the SPSearch account.

1.     In the Content Access Account section, select the “Configurable” option

1.  For a username, enter <DOMAIN>\SPContent  (where <DOMAIN> is your AD domain)

2.  For a password, enter the strong password you assigned to the SPContent account.

2.     In the Search Database section, change the database name by appending and underscore 1 (“_1”) to the database name. 

o    By default, the database name should be WSS_Search_[SERVERNAME], so we’re changing it to  WSS_Search_[SERVERNAME]_1.

o    Changing the name is necessary because the default database name already exists with search data.  If we attempted to use the default database name, SharePoint would throw an error that the database contains user-defined schema and cannot be used.  By changing the search database name on this configuration page, SharePoint Central Administration will create a new database using this name and configure search to use this new database.  Since the new database is empty, we won’t encounter any errors.

1.     Accept the remaining defaults and click the OK button.

After clicking OK, the settings should be applied and you should return to the “Services on Server” page in SharePoint Central Administration, and the Windows SharePoint Services Search” service should be listed as started.

Close SharePoint Central Administration and open the Services MMC (Start –> Administrative Tools –> Services).  Restart the Windows SharePoint Services Search service.  Verify that the Windows SharePoint Services Search service is configured to login with the SPSearch account you created.

Voila!  Moving forward, you should not experience the 2436 error event in your Application Log.

 

2009年11月12日 星期四

remote desktop can not connect

1.terminal configuration\connections\rdp-tcp check service start

 

2.check regedit

hkey_local_machine\system\currentcontrolset\control\terminal server\wds\rdpwd\tds\tcp\portnumber=3389

hkey_local_machine\system\currentcontrolset\control\terminal server\winstation\rdp-tcp\portnumber=3389

hkey_local_machine\system\currentcontrolset\control\terminal server\fdenytsconnection=0

hkey_local_machine\software\policies\microsoft\windowsnt\terminal services\fdenyconnextion=0

 

3.terminal 自己

 

4.如果都不行,就要找微軟了

mts report

netstat -ano

error message screen shot

2009年9月7日 星期一

IIS 竟然占據所有的port不給人家用

IIS7 post #44 - IIS7 and Apache on the same machine.

There was a question on http://forums.iis.net about having Apache and IIS7 on the same box.  here are the instructions I tested on Vista RTM and Windows Server 2008 B3.  This assumes you have two ip addresses on the box, 192.168.0.90 and 192.168.0.91.  It can be any ip's.

1) Added or make sure your machine has two ip's
2) Open a command prompt
3) Type netsh
4) Type http
5) Type sho iplisten.  It should be blank
6) Type add iplisten ipaddress=192.168.0.90
You should get IP address successfully added
7) Type sho iplisten again
It should sho 192.168.0.90 in the list
8) Type exit to get out of netsh
9) Type type netstat -an.  See if you notice 192.168.0.90:80 in the list.  If you see 0.0.0.0:80, do an iisreset

10) Download and install Apache ( I did it with 2.2.4)
http://mirror.nyi.net/apache/httpd/binaries/win32/apache_2.2.4-win32-x86-no_ssl.msi
11) Do a default install,
12) Open httpd.conf and adjust the ip listen to 192.168.0.91:80

2009年8月29日 星期六

好用的 robocopy 指令

目前準備開始使用RoboCopy指令,可是發現它的參數說明是全英文的
某些參數說明我是翻譯出來了,但不知道是否有錯誤?
還有些翻譯不出來的(便不了解它的功能),可否請您幫個忙?


來源參數
/S :
複製每個目錄及其包含的子目錄,不複製空目錄 copy Subfolders
/E :
複製每個目錄及其包含的子目錄,也複製空目錄 copy Subfolders, including Empty Subfolders.
/SEC :
複製安全性 copy SECurity info (both source and dest must be NTFS).##

/A :
只複製設定成保存屬性的檔案,不要改變屬性的設定 copy only files with the Archive attribute set.
/M :
只複製設定成保存屬性的檔案,並清除保存屬性 like /A, but remove Archive attribute from source files.
/LEV:n : only copy the top n LEVels of the source tree.##

/MAXAGE:n :
排除比指定日期要舊的檔案 MAXimum file AGE - exclude files older than n days/date.##
/MINAGE:n :
排除比指定日期要新的檔案 MINimum file AGE - exclude files newer than n days/date.##
(If n < 1900 then n = n days, else n = YYYYMMDD date).

複製參數
/L :
顯示要複製的檔案 List only - don't copy, timestamp or delete any files.
/MOV :
移動檔案 MOVe files (delete from source after copying).##
/MOVE :
移動檔案與資料夾 Move files and dirs (delete from source after copying).

/Z :
在可重新開始的模式中複製網路檔案 copy files in restartable mode (survive network glitch).##

/R:n : number of Retries on failed copies - default is 1 million.
/W:n : Wait time between retries - default is 30 seconds.
/REG : Save /R:n and /W:n in the Registry as default settings.

/TBD : wait for sharenames To Be Defined (retry error 67).##

目的地參數

/A+:[R][A][S][H] : set file Attributes on destination files - add.
/A-:[R][A][S][H] : set file Attributes on destination files - remove.
/FAT :
將目的檔案設定成FAT8.3名稱(不太了解意思) create destination files using 8.3 FAT file names only.##
/SECFIX : FIX SECurity info on existing files and dirs.##
/TimFix : FIX Timestamp on all existing destination files,
including skipped files. ##
(prior to version 1.95 this was /T it's not backwards compatible
so scripts that use /T may fail)

/CREATE : CREATE directory tree structure + zero-length files only.

/PURGE :
刪除目的檔案,當來源檔案已不存在時 delete dest files/folders that no longer exist in source.
/MIR : MIRror a directory tree - equivalent to /PURGE plus all subfolders (/E) ##

記錄參數
/L :
顯示要複製的檔案(前面也有個/L,但不知差異在哪) List only - don't copy, timestamp or delete any files.
/NP :
不要顯示拷貝的百分比 No Progress - don't display % copied.
/LOG:file :
將記錄複寫到記錄檔 output status to LOG file (overwrite existing log). ##
/LOG+:file :
將記錄附加到記錄檔 output status to LOG file (append to existing log). ##

進階參數
/XO :
排除目的檔案的日期跟來源檔案一樣或更新 eXclude Older - if destination file exists and is the same date
or newer than the source - don't bother to overwrite it.
/XC | /XN :
排除變更過的檔案 eXclude Changed | 排除新增的檔案 Newer files
/XX | /XL : eXclude eXtra | Lonely files and dirs.
An "extra" file is present in destination but not source,
excluding extras will delete from destination.
A "lonely" file is present in source but not destination
excluding lonely will prevent any new files being added to the destination.
/IS :
複寫檔案,既使他們是一樣的(不太了解意思) Overwrite files even if they are already the same.

/XF file [file]... :
排除指定的檔案,可包含路徑與萬用字元 eXclude Files matching given names/paths/wildcards.##
/XD dirs [dirs]... :
排除指定的資料夾 eXclude Directories matching given names/paths. ##
XF and XD can be used in combination e.g.
ROBOCOPY c:\source d:\dest /XF *.doc *.xls /XD c:\unwanted /S

/MAX:n :
排除比指定bytes要大的檔案 MAXimum file size - exclude files bigger than n bytes. ##
/MIN:n :
排除比指定bytes要小的檔案 MINimum file size - exclude files smaller than n bytes.##
/XA:[R][A][S][H] : eXclude files with any of the given Attributes
/IA:[R][A][S][H] : Include files with any of the given Attributes ##

/X : report all eXtra files, not just those selected & copied.
/V : produce Verbose output log, showing skipped files.
/ETA :
顯示預估完成的時間 show Estimated Time of Arrival of copied files.

2009年8月12日 星期三

windows 2008 license activate

http://technet.microsoft.com/en-us/library/cc303280.aspx#_Activate_MAK_Clients

Activate MAK Clients

After a client is converted to MAK activation, it attempts to activate over the Internet at the next scheduled interval. You can force an immediate activation through the System application, over the Internet, using a telephone, or using the Volume Activation Management Tool (VAMT).

To confirm that your computer is activated, check the bottom right corner of the desktop for Windows is activated. You can also run Slmgr.vbs /dli from a command prompt to view the activation status of a computer.

Activate MAK Clients over the Internet

To complete the following procedures, you must have administrative rights on the MAK client computer and the MAK client computer must have access to the Internet. Windows reports whether the activation was successful or a failure. If you are unable to activate, the wizard presents additional options.

To activate MAK manually using System properties

1.      Log on to the MAK client.

2.      Open the System application in Control Panel. To do this, click Start, click Control Panel, and then double-click System.

3.      Click the option Click here to activate Windows now.


To activate a MAK client manually over the Internet

1.      Log on to the MAK client.

2.      Open an elevated command prompt. To do this, click Start, click All Programs, click Accessories, right-click Command Prompt, and then click Run as administrator.

3.      At the command prompt, type Regedit.exe and then press Enter.

4.      Type the following at the command prompt, and then press Enter:
cscript \windows\system32\slmgr.vbs /ato

5.      The script reports whether activation was a success or failure and includes a result code.

2009年7月13日 星期一

freebsd 安裝 bash

真神奇居然預設沒有安裝bash....

1.
安裝 bash

# cd /usr/ports/shells/bash
# make install clean


2.
shell 改成 bash

# chsh <==
這個指令就是 change shell 的意思
#Changing user database information for root.
Login: root
Password:
Uid [#]: 0
Gid [# or name]: 0
Change [month day year]:
Expire [month day year]: Class: Home directory: /root
Shell: /bin/tcsh <==
/bin/tcsh 改成 /usr/local/bin/bash
Full Name: Charlie &
Office Location: Office Phone: Home Phone: Other information:
3.
存檔離開
4.
編輯 bash 設定檔
# vi /etc/profile
加入 export LANG=zh_TW.Big5 #設定繁體中文 export LC_ALL=zh_TW.Big5 #設定繁體中文
alias ls='ls -fGa' #
ls 能顯現出顏色
alias rm='rm -i' #
刪除確認 alias cp='cp -i' # 拷貝確認
alias mv='mv -i' #
搬移確認
5.
自訂命令提示字元 PS1="[\u@\h \W]\\$ " 說明: \u --> 顯示使用者帳號
\h -->
顯示系統的 hostname
\w -->
完整路徑
\$ -->
# 表示 root, $ 表示一般使用者

6.
存檔離開,重新登入即可生效...

2009年7月8日 星期三

rebuild freebsd soft raid

(2) 如果 mirror 中某一個硬碟壞掉了,怎麼辦?

# gmirror remove gm0 ad0    # 移除 mirror 壞掉的 ad0

# gmirror forget gm0   # 忽略 mirror 中之前存在,而現在不存在的裝置

# shutdown -h now      # 關機拔掉壞掉那棵 HD 假設壞掉的是 ad0 更換新的 HD 接著重開 gm0 就會使用 ad1 進入 OS 可看看是否正常運作

# shutdown -h now    # 再次關機接上新的硬碟

# gmirror insert gm0 /dev/ad0     # 重開後再 insert 新的硬碟

 

http://freebsd.ntut.idv.tw/document/freebsd_software_raid_geom.html

 

2009年7月6日 星期一

ProFTPd quick intallation

ProFTPdbsdports裡面就有的一個ftpd

所以想安裝的請到/usr/ports/ftp/proftpd

make install clean

就可以安裝了

 

然後請

cd /usr/local/etc

vi proftpd.conf

修改ServerName

使""內和你hostname顯示的相同

ServerType可選standalone或是inetd

然後請在檔案內加一行

ScoreboardFile /var/run/proftpd.scoreboard

加完之後

離開vi

touch /var/run/proftpd.scoreboard

 

然後應該就可以執行

/usr/local/etc/rc.d/proftpd.sh start

來啟動proftpd

 

然後就可以/usr/local/etc/rc.d/proftpd.sh status

來看proftpd有沒有執行

 

不過這樣設定的情況下 是不能匿名登入的

就剛開始的設定 使用者也不會被限制在他的家目錄

 

如果要開放匿名目錄

<Anonymous ~ftp>

</Anonymous>

前面的#去掉即可

看看要不要改什麼設定

 

根據上面的說明

#DefaultRoot ~

把這行前面的#去掉

就可以限制使用者只能在他的家目錄活動

 

官方網站

http://www.proftpd.org/

2009年7月5日 星期日

freebsd ftp script command

#!/bin/sh
#
# ftp script to send/get file automatically
#

# define the variables
filename1="/path1/filename1"
filename2="/path1/filename2"
hostname="ftp.domain_name.com"
username="username"
password="password"

# main
ftp -n $hostname <<EOF
quote USER $username
quote PASS $password
binary
put $filename1
get $filename2
quit
EOF

2009年6月24日 星期三

可以用php寄信的程式,可以指定mail server IP 與設定 user/pw

http://support.oss.org.tw/wiki/index.php/Php_phpmailer

 

解決 windwos 2003 認不到超過4G的記憶體

http://support.microsoft.com/kb/283037

 

To enable PAE, use the /PAE switch in the Boot.ini file

The following is an example of a Boot.ini file where the PAE switch has been added:

[boot loader]
timeout=30
default=multi(0)disk(0)rdisk(0)partition(2)\WINDOWS
[operating systems]
multi(0)disk(0)rdisk(0)partition(2)\WINDOWS="Windows Server 2003, Enterprise" /fastdetect /PAE

 

2009年6月17日 星期三

WinAD 第一台角色轉移

因為舊的Windows 2000 Server越來越不穩定,
預計要把它重灌或是汰換下來,
所以灌了一台Windows 2003 Server來替代,
用了dcpromo升級成DC後,
就得想辦法把AD主控權搶過來啦,
找到了MS官方的這篇文章:「使用 Ntdsutil.exe 抓取或傳輸 FSMO 角色到網域控制站」
http://support.microsoft.com/kb/255504,
但是後來又看到了這篇網誌:「AD移轉(FSMO&GC移轉步驟)」
http://tw.myblog.yahoo.com/welcom-jabamo/article?mid=4&prev=5&next=-1,
對懶的用cmd下指令的人,真是福音啊,轉移非常成功。

-----我是分隔線-----我是分隔線-----我是分隔線-----我是分隔線-----我是分隔線-----
FSMO 角色

在樹系中,至少會有五個 FSMO 角色被指派到一個或一個以上的網域控制站。這五種 FSMO 角色如下:

* 架構主機:架構主機網域控制站會控制對架構所做的所有更新及修改。如果要更新樹系的架構,必須具有架構主機的存取權限。整個樹系中只能有一個架構主機。
* 網域命名主機:網域命名主機網域控制站會控制在樹系中新增或移除網域。整個樹系中只能有一個網域命名主機。
* 基礎結構主機:基礎結構負責更新自己網域中物件對其他網域中物件的參考。在任何時候,每個網域中只能有一個網域控制站做為基礎結構主機。
* 相對 ID (RID) 主機:RID 主機負責處理來自特定網域中所有網域控制站的 RID 集區要求。在任何時候,每個網域中只能有一個網域控制站做為 RID 主機。
* PDC 模擬器:PDC 模擬器是一個網域控制站,它會對執行舊版 Windows 的工作站、成員伺服器和網域控制站通告自己是主要網域控制站 (PDC)。例如,如果網域中包含不是執行 Microsoft Windows XP Professional (商用版) 或 Microsoft Windows 2000 用戶端軟體的電腦,或者如果其中包含 Microsoft Windows NT 備份網域控制站,PDC 模擬器主機就會成為 Windows NT PDC。它也是網域主機瀏覽器 (Domain Master Browser),而且會處理密碼不符的問題。在任何時候,樹系的每個網域中只能有一個網域控制站做為 PDC 模擬器主機。

您可以使用 Ntdsutil.exe 命令列公用程式或 MMC 嵌入式工具來轉移 FSMO 角色。根據您要轉移的 FSMO 角色而定,您可以使用下列三種 MMC 嵌入式工具之一:
Active Directory 架構嵌入式管理單元
Active Directory 網域及信任嵌入式管理單元
Active Directory 使用者和電腦嵌入式管理單元
如果電腦不再存在,就必須取回角色。如果要取回角色,請使用 Ntdsutil.exe 公用程式。
回此頁最上方
轉移架構主機角色
使用 Active Directory 架構主機嵌入式管理單元,轉移架構主機角色。在您使用這個嵌入式管理單元之前,必須先登錄 Schmmgmt.dll 檔案。

登錄 Schmmgmt.dll

1. 按一下 [開始],再按一下 [執行]。
2. 在 [開啟] 方塊中輸入 regsvr32 schmmgmt.dll,再按一下 [確定]。
3. 當您收到操作成功的訊息時,請按一下 [確定]。

轉移架構主機角色

1. 按一下 [開始],再按一下 [執行],在 [開啟] 方塊中輸入 mmc,然後按一下 [確定]。
2. 在 [檔案] 功能表上按一下 [新增/移除嵌入式管理單元]。
3. 按一下 [新增]。
4. 按一下 [Active Directory 架構],接著按一下 [新增],再按一下 [關閉],然後按一下 [確定]。
5. 在主控台樹狀目錄中,以滑鼠右鍵按一下 [Active Directory 架構],再按一下 [變更網域控制站]。
6. 按一下 [指定名稱],輸入即將成為新角色持有者的網域控制站名稱,再按一下 [確定]。
7. 在主控台樹狀目錄中,以滑鼠右鍵按一下 [Active Directory 架構],再按一下 [操作主機]。
8. 按一下 [變更]。
9. 按一下 [確定],確認您要轉移角色,再按一下 [關閉]。


轉移網域命名主機角色

1. 按一下 [開始],指向 [系統管理工具],再按一下 [Active Directory 網域及信任]。
2. 以滑鼠右鍵按一下 [Active Directory 網域及信任],再按一下 [連線到網域控制站]。

注意:如果您不在要轉移角色的網域控制站上,必須執行此步驟。如果您已經連線到要轉移角色的網域控制站,則不必執行此步驟。
3. 請執行下列其中一項操作:
* 在 [輸入另一網域控制站的名稱] 方塊中,輸入即將成為新角色持有者的網域控制站名稱,再按一下 [確定]。
- 或 -
* 在 [或選擇可用的網域控制站] 清單中,按一下即將成為新角色持有者的網域控制站,再按一下 [確定]。
4. 在主控台樹狀目錄中,以滑鼠右鍵按一下 [Active Directory 網域及信任],再按一下 [操作主機]。
5. 按一下 [變更]。
6. 按一下 [確定],確認您要轉移角色,再按一下 [關閉]。


轉移 RID 主機、PDC 模擬器和基礎結構主機角色

1. 按一下 [開始],指向 [系統管理工具],再按一下 [Active Directory 使用者和電腦]。
2. 以滑鼠右鍵按一下 [Active Directory 使用者和電腦],再按一下 [連線到網域控制站]。

注意:如果您不在要轉移角色的網域控制站上,必須執行此步驟。如果您已經連線到要轉移角色的網域控制站,則不必執行此步驟。
3. 請執行下列其中一項操作:
* 在 [輸入另一網域控制站的名稱] 方塊中,輸入即將成為新角色持有者的網域控制站名稱,再按一下 [確定]。
- 或 -
* 在 [或選擇可用的網域控制站] 清單中,按一下即將成為新角色持有者的網域控制站,再按一下 [確定]。
4. 在主控台樹狀目錄中,以滑鼠右鍵按一下 [Active Directory 使用者和電腦],指向 [所有工作],再按一下 [操作主機]。
5. 按一下要轉移的角色所對應的索引標籤 (RID、PDC 或 基礎結構),再按一下 [變更]。
6. 按一下 [確定],確認您要轉移角色,再按一下 [關閉]。


以 上是「FSMO」五大角色的轉移,但其實這樣子的轉換還不夠完整!連 Microsoft 都犯了這個錯,在 AD 的環境中還有一個更重要的一大角色:通用類別目錄(Global Catalog,以下稱 GC),在整個樹系一開始建立時的第一台 DC,預設會擁有 GC,GC 保存有整個樹系的資訊,GC 允許保存在多部 DC 上,但預設只會存在第一台 DC 內,但一般會有硬體老舊問題,或面臨角色轉移的,也是第一台機器。
轉移通用類別目錄

1. 在「Active Dierctory 站台和服務」的圖示上點選「Sites → Default-First-Site-Name → Servers」,先選擇要增加的 DC,然後選擇右方欄位中的「NTDS Settings」按滑鼠右鍵選擇「內容」。
2. 將「通用類別目錄」勾選,啟動。
3. 再依相同步驟,選擇計劃不保存 GC 的 DC。

以上大功告成

2009年6月2日 星期二

freebsd ntp sync

How to: FreeBSD Setup Time / Clock Synchronization with NTP server and ntpdate command

http://figs.cyberciti.biz/3rdparty/freebsd_logo_sm.png

FreeBSD use the Network Time Protocol (NTP) for synchronizing the clocks of computer systems over packet-switched, variable-latency data networks. NTP uses UDP port 123. If you have one computer or single server then you can easily synchronization time with other NTP servers. All you need is ntp client called ntpdate. It is use to set the date and time via NTP servers.

FreeBSD: Install NTP Client

Use any one of the following command to install NTP:

# pkg_add -rv  ntp

OR

# cd /usr/ports/net/ntp
# make; make install

Pick appropriate NTP Servers

Visit public ntp timeserver list to pick up your NTP server.

Open UDP port 123 at firewall

If you are running FreeBSD ipfilter firewall, you need to open the UDP port 123. Just add following rule to your firewall script:

pass out quick on lnc0 proto udp from YOUR-SERVER to any port = 123
keep state

OR

pass out quick on lnc0 proto udp from YOUR-SERVER to
TIME-SERVER-IP port = 123 keep state

For example, my FreeBSD workstation IP is 192.168.1.16 and 61.246.176.131 is IP of NTP server then my rule is in ipf.conf file as follows:

pass out quick on lnc0 proto udp from 192.168.1.16
to 61.246.176.131 port = 123 keep state

FreeBSD test clock synchronization

Just run ntpdate command as follows to see you can set date and clock via NTP:
Set wrong date (Mon Dec 13 4:27 pm):

# date 0412131627

Now set correct date with ntp client:

# ntpdate -v -b in.pool.ntp.org

13 Dec 16:27:50 ntpdate[997]: ntpdate 4.2.0-a Thu Nov 3 07:34:22 UTC 2005 (1)
25 Jan 12:35:47 ntpdate[997]: step time server 61.246.176.131 offset 35237275.965726 sec

You can verify that correct data is setup:

# date

Output:

Wed Jan 25 12:36:21 IST 2006

Enable date and time/ clock Synchronization at boot time

You need to set ntpdate via /etc/rc.local file.

# vi /etc/rc.conf

Append following line to it:
ntpdate_enable="YES"
ntpdate_hosts="asia.pool.ntp.org"

Save and close the file. Make sure you have correct ntpdate_hosts server entry.

See also:

2009年4月29日 星期三

透過AD讓XP電腦電源一直開啟

http://support.microsoft.com/kb/915160/zh-tw

2009年4月25日 星期六

bsd6+apach20+mysql50

啟動時可能發生的錯誤
若你是使用apache13的版本,在啟動時可能會注意到,明明設定都正確
但為什麼就是都動不起來!

請開啟 /usr/locale/etc/apache/httpd.conf 這個檔
將有關"mod_unique_id"的行句都註解起來(有兩行)

但確定如此一來,apache 就能啟動了!

2009年4月21日 星期二

修改 XP 序號的方式

如因特殊情況需更改 Windows XP 的序號可按下程序執行

 

1. 在〔開始〕→〔執行〕→〔Regedit〕→〔HKEY_LOCAL_MACHINE〕→〔SOFTWARE →〔Microsoft〕→〔Windows NT〕→〔CurrentVersion〕在〔WPAEvents〕內將〔OOBETimer〕的頭兩個數值〔CA〕刪除

 

2. 在〔開始〕→〔執行〕→〔oobe/msoobe /a〕進入〔啟動畫面〕→選擇第二項〔電話啟動〕在進入下一個視窗,選擇〔change product key〕來修改序列號及輸入新的序列號,完成後點擊〔update〕進行更新及選〔remind me later

 

3. 重新啟動電腦後 在〔開始〕→〔執行〕→〔oobe/msoobe /a〕進入〔啟動畫面〕時應該顯示已經啟動

2009年4月13日 星期一

windows 2003設定 ntp client

w32tm /configure /manualpeerlist:clock.stdtime.gov.tw /syncfromflags:manual /update

net stop w32time && net start w32time

w32tm /resync /rediscover  從新sync time

 

然後用schedule做排程就可以一天sync 一次

2009年4月9日 星期四

顯示隱藏裝置

cmd
set devmgr_show_nonpresent_devices=1
start devmgmt.msc
檢視-->顯示隱藏裝置
把不必要的移除掉

常用的網站

http://ithelp.ithome.com.tw/

2009年3月21日 星期六

在vista 中ultravnc 可以使用ctrl+alt+del

先安裝好ultravnc1.5
打開群組原則(本機)
3° Within the console, expand Computer Configuration |
Windows Settings | Security Settings | Local Policies.
4° Click Security Options. The various security options are
displayed in the details pane.
電腦設定\安全設定\本機原則\安全性原則\
5° Scroll through the options and locate Interactive Logon:
Do not require CTRL + ALT + DEL.
互動式登入:不要求按ctrl+alt+del
6° Double click the security option.
7° Select Disabled to require users to press CTRL + ALT + DEL.
8° Click OK.
Run MsConfig from Run option.
2° In System Configuration window, click on the Tools tab.
工具
3° Scroll down and locate “Disable UAP” or “Disable UAC” option item. Click on that line.
選停用-->啟動
4° Click the Launch button.
5° A command prompt window will open and automatically execute and run certain process to disable UAC.
6° Close CMD window when done.
7° Close Msconfig.
8° Restart computer for changes to apply and effective.
To re-enable UAC, simply select “Enable UAP” or “Enable UAC” instead of “Disable UAP” or “Disable UAC”, and then click on Launch button.

在測試ultravnc時就可以用ctrl+alt+del了

manually remove symantec enterprise 10

http://service1.symantec.com/SUPPORT/ent-security.nsf/docid/2006111618085848?Open&docid=2002031914291648&nsf=ent-security.nsf&view=ppfdocs

2009年3月15日 星期日

wins server 出現無法回應的狀況

server上面區域網路裡面的wins設定改為NetBIOS預設值,從DHCP伺服器取得wins的設定,如果使用靜態IP則啟用NetBIOS over RCP/IP

Wins server的狀態就會改為有回應了

2009年3月8日 星期日

可以由server端測試RPC連線

http://support.microsoft.com/kb/831051

outlook 連接 exchange會出現無法解析名稱

除了把outlook裡面的資訊砍掉以外

把整個outlookprofile都拿掉

重新建立就可以加入exchange

2009年3月5日 星期四

2009年1月12日 星期一

wsus 上面電腦都出現沒有狀態

在user電腦裡面的log中看到
+++++++++++ PT: Synchronizing server updates +++++++++++
2009-01-13 00:11:11:411 1108 fc PT + ServiceId = {3DA21691-E39D-4DA6-8A4B-B43877BCB1B7}, Server URL = http://adsrv2:8530/ClientWebService/client.asmx
2009-01-13 00:11:13:114 1108 fc PT WARNING: SyncUpdates failure, error = 0x8024400E, soap client error = 7, soap error code = 400, HTTP status code = 200
2009-01-13 00:11:13:114 1108 fc PT WARNING: SOAP Fault: 0x000190
2009-01-13 00:11:13:114 1108 fc PT WARNING: faultstring:Fault occurr

確定GPO有寫進去
查了0x8024400E後發現要wsus升級到sp1才有KB可以套

更新以後就可以正常下載了

wsus sp1 kb下載
http://support.microsoft.com/kb/954960

升級sp1下載
http://www.microsoft.com/downloads/details.aspx?FamilyId=F87B4C5E-4161-48AF-9FF8-A96993C688DF&displaylang=en

2009年1月8日 星期四

wsus2.0 不過我也在3.0上面解決client電腦沒有出現的問題

WSUS無法偵測解決方法 分類:電腦資訊2006/09/29 10:00這問題我先前也有遇過...我的解決方法就是在 GPO 讓 client 端去執行
一個 regedit 檔 內容如下:
Windows Registry Editor Version 5.00

[HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\CurrentVersion\WindowsUpdate]
"PingID"=-
"AccountDomainSid"=-
"SusClientId"=-

執行完後你在 wsus 就會看到那些原先沒列出來的都會重新出現....只要執行一次就
好, 不然你會發現會有重覆的一直出現喔!! 希望對你有幫助...



您好:
請從兩方面來檢查,第一,檢查 WSUS client 的設定
1. 開啟 [命令提示字元],輸入下列指令:
net stop wuauserv
2. 執行 regedit,找到下列路徑:
HKLM\Software\Microsoft\Windows\CurrentVersion\WindowsUpdate\AutoUpdate
*刪除 LastWaitTimeout 這個機碼
*若 DetectStartTime 機碼存在的話,一併刪除
*確認 AUState 的設定為 2 (0x2) ,若不是,請修改
3. 將 %windir%\Windows Update.log 更名成 %windir%\Windows Update.bak
4. 回到 [命令提示字元],輸入下列指令:
net start wuauserv
5. 輸入下列指令:wuauclt.exe /detectnow
6. 靜待幾分鐘,檢查 %windir%\Windows Update.log 與 WSUS 的 IIS log 是否有錯誤



您好:
請問 client 是否有符合 WSUS client 的需求,亦即確認 Windows update agent 是否為 ver:2.0:
Windows 2000 SP3 以上
Windows XP Professional (Home 無法在 domain 下進行部署)
Windows Server 2003

在此提供其他步驟與資訊供您參考:
a. 那 windows update.log 是否有相關的錯誤訊息?

b. 檢查 WSUS Server 上面的 IIS log,利用關鍵字 /SelfUpdate/wuident.cab 搜尋,看看有問題的 client 是否有連線的紀錄,若沒有連線紀錄,請參考這邊的作法:
http://www.microsoft.com/taiwan/community/newsgroups/dgbrowser/zh-tw/default.mspx?dg=microsoft.public.tw.security&mid=1dc1e4aa-77d6-4e7e-b959-2dbe410a631a&sloc=zh-tw

c. 若上個步驟成功的話,請手動設定 WSUS 用戶端:
1. [開始]->[執行],在 [開啟] 處打上 [regedit],按下 [確定]
2. 找到下面的路徑:
HKEY_LOCAL_MACHINE\Software\Policies\Microsoft\Windows\
3. 若沒有WindowsUpdate這個子目錄,請新增一個 [機碼] ,其名稱為:WindowsUpdate
4. 雙擊WUServer,輸入您的WSUS server 的網址,如:http://192.168.1.20:8530,並按下 [ENTER](若WUServer字串值不存在,請自行建立)
5. 雙擊WUStatusServer,輸入您的WSUS server 的網址,如:http://192.168.1.20:8530,並按下 [ENTER](若WUStatusServer字串值不存在,請自行建立)
6. 找到下面的路徑:
HKEY_LOCAL_MACHINE\Software\Policies\Microsoft\Windows\WindowsUpdate\AU
7. 確認UseWUServer 的設定是否為1 (0x1),若不是,請修改(若UseWUServer
DWORD值不存在,請自行建立)
8. 找到下面的路徑:
HKEY_LOCAL_MACHINE\Software\Microsoft\Windows\CurrentVersion\WindowsUpdate\Auto
Update
9. 開啟控制台裡的 [自動更新]
10. 指定 [自動更新的運作方式],請不要勾選 [關閉自動更新]
11. 確認AUState 的設定為 2 (0x2) ,若不是,請修改(可以不用檢查)
12. 若LastWaitTimeout的設定存在,請刪除
13. 若DetectionStartTime的設定存在,請刪除
14. 開啟 [命令提示字元],輸入下面的指令,以停止自動更新服務,並按下 [Enter]:

net stop wuauserv
15. 在 [命令提示字元],輸入下面的指令,以停止自動更新服務,並按下 [Enter]:
net start wuauserv
16. 輸入下列指令,並按下 [Enter]:wuauclt.exe /detectnow
17. 請稍待 6 到 10 分鐘,以便自動更新運作,並檢查 %windir%\Windows
Update.log 與 WSUS 的 IIS log 是否有錯誤

您好:
而使用者的電腦也有加入群組,WSUS也看的到使用者電腦需要的更新,
但是時間到了之後,也沒有自動更新,
1. 請查閱 client 上的 %windir%\windows update.log 是否有相關的錯誤訊息

2. 檢查 client 機碼
HKEY_LOCAL_MACHINE\Software\Microsoft\Windows\CurrentVersion\WindowsUpdate\Auto
Update裡面的 LastWaitTimeout 與 DetectionStartTime 的時間
若在機碼裡面沒有那兩個機碼值,就表示 client 跟 server 沒連上線,請確認您的
GPO 設定是可以 work 的


您好:
請從兩方面來檢查,第一,檢查 WSUS client 的設定
1. 開啟 [命令提示字元],輸入下列指令:
net stop wuauserv
2. 執行 regedit,找到下列路徑:
HKLM\Software\Microsoft\Windows\CurrentVersion\WindowsUpdate\AutoUpdate
*刪除 LastWaitTimeout 這個機碼
*若 DetectStartTime 機碼存在的話,一併刪除
*確認 AUState 的設定為 2 (0x2) ,若不是,請修改
3. 將 %windir%\Windows Update.log 更名成 %windir%\Windows Update.bak
4. 回到 [命令提示字元],輸入下列指令:
net start wuauserv
5. 輸入下列指令:wuauclt.exe /detectnow
6. 靜待幾分鐘,檢查 %windir%\Windows Update.log 與 WSUS 的 IIS log 是否有錯誤