Acme Evil

I want more and more knowledge....每天進步一點點
顯示具有 Work 標籤的文章。 顯示所有文章

過去,學校都會以WAM來建置學生當年電腦課所需的帳號密碼,學生都得背一組新的帳號密碼以便在新的學年裡上課及繳交電腦作業或其他課程作業使用,而一年之後,就得重新來過,包括當年所完成的作業也是一併刪除,最後,當孩子到六年級的時候他們所能帶走的就只有六年級的電腦作品(如果學生每年沒有自己備份的話)。
為了改變此種情形,我們規劃新的方式:
1、學生在校期間只有一組帳號密碼。
2、每年作業不刪除,直至學生畢業,作為畢業光碟的一部分。
3、老師檢視學生作業方便。
4、每年不管學生是否在原班或是升級,都可以以最簡單最快的方式來update。

最後想的方法是以學生入學時的學號當作帳號,密碼以身分證字號為主,每個學生的配額為100MB,作業以學生自己建置之資料夾來區分年級及作業別。
建立帳號之時先建立學生群組,學生之家目錄建置於學生群組的資料夾之下;
建立一資料夾,只有老師與管理者才讀寫,學生唯獨,作為老師欲分享給學生之區域;
老師可瀏覽及修改學生群組之目錄底下的所有資料夾(資料夾下包含所有學生之家目錄)。

Samba之smb.conf部分內容如下:

[www]
comment = 學生個人空間
browseable = yes
path = %H/www
writeable = yes
create mode = 0711
directory mode = 0755
veto files = /*.exe/*.eml/*.bat/*.nws/*.vbs/*.com/*.dll/*.msi//*.zip/*.rar/*.reg/*.sh
;預防學生存入不允許之多餘檔案,佔掉空間,譬如:遊戲
delete veto files = yes

[works]
browseable = yes
writeable = yes
printable = no
path = /home/students
write list = @teachers,@admins,
comment = 學生作品(老師專用)
valid users = @admins,@teachers
admin users= @admins,@teachers

[share]
browseable = yes
read list = @students
writeable = yes
printable = no
write list = @teachers,@admins
path = /share/share
comment = 共享區

另外,自己寫了一支小程式應付每年因升級或編班而有變動之網頁,用以方便瀏覽學生作業。
下載http://cid-9383760834731968.skydrive.live.com/self.aspx/Public/createform.zip
(倉促之下寫成,版面處理很差,如有先進幫忙修正,感激不盡)
^^

(圖片取自LAM官方網站)
LDAP Account Manager( LAM )在我架好LDAP Server at CentOS 5.2之後裝的GUI的管理介面,安裝的方法很簡單:

首先,先至官方網站下載最新版本的LAM:Source code - ldap-account-manager-2.3.0.tar.gz
至網頁根目錄,或是您要執行的網頁目錄。

#wget http://nchc.dl.sourceforge.net/sourceforge/lam/ldap-account-manager-2.3.0.tar.gz
//下載

#tar zxvf ldap-account-manager-2.3.0.tar.gz //解壓縮套件

#mv ldap-account-manager-2.3.0 lam //修改資料夾名稱(可以不用改)

#cd lam //進入LAM資料夾

#cp config/config.cfg_sample config/config.cfg //複製一份config.cfg

#cp config/lam.conf_sample config/lam.conf //複製一份lam.conf設定檔

#chown apache.apache sess/ tmp/ lib/ config/config.cfg
//修改sess/、tmp/、lib/、config/config.cfg這四個資料夾及檔案的屬性,使apache能使用它們,如果想要使用LAM修改lam.conf檔,還要修改lam.conf屬性,指令同上。

#vim /config/lam.conf //修改lam.conf設定檔
修改以下幾個設定:
------------略--------------
admins: cn=Manager,dc=domain,dc=com
passwd: **********
treesuffix: dc=domain,dc=com
defaultLanguage: zh_TW.utf8:UTF-8:繁體中文(台灣)
-----------略------------

接著修改php.ini
#vim php.ini
修改
memory_limit = 64M

#service httpd restart

這樣就完成了,接下來只要使用瀏覽器連結 http://host.doamin.com/lam
用上面所填的admin :cn=Manager來當作帳號,還有passwd的密碼登入即可。

enjoy...


改版的校內網,遇到最大的問題是如何把學校官方網站裡的公告納入校內網的一部分。學校官網是以改過的(為了要符合局內要求的"無障礙")XOOPS來架設 的,所以裡面的公告也只能使用某個模組來製作,而顯示在其中的一個區塊,而校內網的SERVER是以Windows Server為基礎,基本是跑ASP及HTML為主,如果要納入XOOPS的公告內容,勢必得寫一支ASP程式或是JavaScript來讀取資料庫內容才行。
或許,可以用RSS訂閱的方式來,在ASP或HTML裡寫一支程式當作RSS Reader來顯示內容,網路上有許多這一類程式,有適用於各類網頁語言的範例,可惜都不適用敝校的RSS Feed,原因是它為了要符合"無障礙"而被改成非常的不標準了
(http://www.taes.tp.edu.tw/html/backend.php),包含feedburner在內的feed creater或是rss javascript bulider都無法解析這敝校的RSS feed,只有,only one Google Reader可以完整解析,並且正確顯示正體中文。

使用Google帳號登入Google閱讀器,左邊點選"新增訂閱項目",在輸入RSS feed的網址或輸入有提供訂閱的網站。

接著,在欲分享的文章底下,選擇"分享",就可以分享該文章

決定要分享的文章之後,可以點選左上的"您的分享項目"。

如果要放置至自己的網站上或Blog上的話,可以選擇右邊選項"將分享項目的剪輯放到您的網站上"會跳出一視窗。

選定好顯示屬性,就可以複製視窗中的Script碼,加入您所要置入的網頁位置即可。
這樣就完成了。^^


但是,Google閱讀器我覺得少了一項功能,功能像是Gmail的篩選器,如果Google Reader可以含有篩選器,可以讓某些選項自動的"分享",譬如說來自於某個feed的就自動套用"分享"或只要含有某關鍵字的文章就自動套用自訂標籤等等,希望Google能加入此一功能。^^

今早突然老師來電,說她電腦畫面不停的跳動,螢幕還出現"顯示頻率超出範圍",但是,她是誰啊?音樂老師?!音樂老師的都年紀很大的,哀唷!今天精神不好很睏,居然一早就來"騷擾"我.......

拖著不情願的腳步出了Office,右轉走到第一棟樓,左轉到第二棟,下樓右轉走到第三棟,上樓。依現在這種精神狀況,這條路還真漫長。一進音樂教室,吓!是年輕的代課老師耶!還長的不錯!這下子精神都來了,不過我可沒忘記今天的任務,我是來修電腦的。

打開電腦,果然如她所說的:"頻率超出範圍"。這一行字還在這CRT螢幕面前跑來跑去,對我來說,這一行字彷彿在說:來抓我啊!來抓我啊!抓不到勒......

一開始我的確抓不到,閃爍的畫面,我進不了桌面。
重開機,"頻率超出範圍"還是對我說:抓不到哩!
後來,居然按F8,然後在選"上次良好的開機設定",就好了。

音樂老師笑得很開心,感覺那個時候我是她的英雄,哈!

走出音樂教室,我又睏了...........

前提:如果要保留原作業系統,須先製作備份檔,ghost或其他image檔喔!可以避免重做OS的時間。

Step 1. 如果原硬碟有安裝過任何作業系統須先格式化所有partition,把硬碟還原到最初出廠時的樣子。

Step 2.安裝灯塔的SafetyCard,如果顯示找不到分割區之類的訊息,在第一個步驟時就須以spfdisk(或其它磁碟管理工具)建立一個partition,quota是配置整顆硬碟。

Step 3.以SafetyCard上所附的"FDISK"來建立欲安裝的分割區。

Step 4.Linux須安裝在Window XP之前,所以第一個分割區須為Linux,第二為linux swap,第三為WinXP,第四則為Data(預作Windows與Ubuntu共用的NTFS磁區)。畫面上的排列大概是

系統名稱 XXXX 屬性 檔案系統 方式 復原 容量
1. Ubuntu 備份區 Linux native 還原 手動 ??????MB
2. Ubuntu swap 資料碟 Linux swap 清除 手動 ??????MB
3. WinXP 系統碟 HFPS/NTFS 還原 手動 ??????MB
4. Data 資料碟 HFPS/NTFS 清除 手動 ??????MB

以上,復原的頻率原則上我一開始都設為手動,因為我怕一不小心又得重來。

Step 5.重開機之後會出現選單,但是只是有選單,並沒有作業系統,我先安裝Ubuntu 7.10-desktop。放入光碟之後,在安全卡的選單上的Ubuntu上按Enter,如果沒有意外,會進入Ubuntu的光碟啟動畫面。

Step 6.進入Ubuntu後,桌面上會有一個"安裝"的圖示,要安裝,按它就對了!

Step 7.安裝畫面繁瑣的不說了,挑重點講:
(1)安裝磁區要選擇"手動",而不是其他兩項或三項,導引整顆硬碟或是最大連續空間之類的,手動就是手動。
(2)接下來這邊應該會有已經分割好的partition,最上面哪兩個就是掛載/(root)跟Swap的磁區,設定好順便給他格式化吧!Next
(3)來到最後一頁,別急著按"完成",按下去就馬上做白工;這一畫面的"完成"上面有個"Advance.."按鈕,輕輕用滑鼠按一下,跳出的小小視窗要設定開機管理員安裝在哪?把中間的(hd0)改成你Ubuntu的 / 磁區,如果沒有意外,應該是 /dev/hd0或是 /dev/sda1之類的,這裡如果沒有設,裝好之後就會看到 黑底白字"Missing Operation System"之類的畫面。繼續吧!

Step 8. 好了嗎?Ubuntu裝好了嗎?裝好就重開機吧!注意,重開到安全卡的開機選單時,記得要按F2儲存啊!不然就是....北了剛


Step 9.進入UBuntu看看,如果沒有意外應該成功了。(一進入的剎那我快哭出來了,失敗太多次了。)

Step 10.安裝WinXP的方式跟Ubuntu差不多,從Step 5開始repeat就好了。如果是用ghost檔還原的方式,就繼續看下去。

Step 11.用之前做的ghost檔把source還原到第三個partition裡就ok了。哈!真簡單!

Step 12.還原之後重開機時記得按F2儲存喔!

Step 13.喝咖啡,休息,準備下班!


備註:我用的還原方式是拿Win PE 3.0先開機,然後把WinXP跟Data磁區給格式化為NTFS,然後把source image放進Data裡再還原WinXP。為什麼我要這麼麻煩,沒有為什麼,只是不想浪費光碟片而已! ^^

With a teacher research program and the use of SQL call, suddenly the network is interrupted. Ping DNS Server and Firewall do not get reply. The first reaction is: firewall was crash again! (Last week, an unknown crash) Go to the mainframe to reboot the firewall, but not solve the problem, watch the firewall log and found some session will suddenly coursing through and error. Suspect a client of LAN be got virus and cause the Internet paralysis; DNS Server reopened after it opened. But good times never often, is only for 1 minutes. Originally guess: "The catch virus PC users should not use the Internet, thus shutdown, the Internet has returned to good" Waiting for a 20 minutes still no improvement, at time has ping any servers with no replies. Why all of the servers? Even if the network traffic congestion, at least there will be the occasional one or two reply correct. Then suddenly to a telephone conversation, reminded "Maybe the switch hub that connect all the servers was crashing?" It's right, all reopened were get after switch hub reboot. However, why switch hub crash for no reason at all?
--------
下午正與某位老師研究SQL的使用以及程式的呼叫,突然網路都斷線了。Ping DNS和防火牆卻得不到Reply回應,第一個反應就是:防火牆又掛了!(上星期才不明的掛了一次) 到了主機房再重開防火牆,沒有解決問題,進防火牆看日誌檔,發現某些session會突然飆高且error,懷疑是區域網路中有一台Client中毒了,而造成網路癱瘓;重開DNS Server之後卻通了。只是,好景不常,只通了一分多鐘。本來猜測:"中毒的PC使用者應該是覺得網路不能使用了,因而關機,所以網路又恢復順暢,等他在關機就好了。"等了一、二十分鐘還沒有改善,這時候已經Ping不到任何一台Server了,為什麼會Ping不到全部的Server呢?就算網路塞車,至少也會有偶爾的一、二個reply才對。這時突然來了一通電話,提醒了"會不會是串接所有主機的Switch Hub掛掉了?" 果然,重開Switch Hub一切就恢復正常了。可是,為什麼無緣無故Switch Hub會掛掉呢?

Received letters from the ICST, ask all units block the relay station's IP, is because some unknown malicious mail will be bogus ICST name of those relay stations to send. If received, do not open. Its characteristics are as follows:

寄件者:service@icst.org.tw

主旨:USB 2.0外接式硬碟安全刪除方案

附件名稱:外接式硬碟安全刪除.doc

This malicious code of the relevant information are as follows:

Path:
C: \ Documents and Settings \ \ Local Settings \ Temp \ 2.tmp (file name may change)

Registry:
HKEY_CURRENT_USER \ Software \ Microsoft \ Windows \ CurrentVersion \ Run

Value:
Data: C: \ Documents and Settings \ \ Local Settings \ Temp \ 2.tmp

Proposed units monitor and stop following relay station IP :

202.177.19.62

211.21.187.20

211.20.70.75

211.20.80.190

211.20.80.100
------------
日前收到國家資通中心來信,希望各單位擋掉一些中繼站IP,是因為有些不明的惡意郵件會冒充國家資通中心的名義以那些中繼站來發送,如有收到請勿開啟,特徵如下:

寄件者:service@icst.org.tw

主旨:USB 2.0外接式硬碟安全刪除方案

附件名稱:外接式硬碟安全刪除.doc

此惡意程式的相關資訊如下:

路徑:
C:\Documents and Settings\\Local Settings\Temp\2.tmp ( 檔名可能會改變 )

Registry:
HKEY_CURRENT_USER\Software\Microsoft\Windows\CurrentVersion\Run

Value:
Data: C:\Documents and Settings\\Local Settings\Temp\2.tmp

建議有關單位監控並阻擋以下中繼站IP

202.177.19.62

211.21.187.20

211.20.70.75

211.20.80.190

211.20.80.100

The past two days have received a case: user log on network domain there will be no domain found; Or at the same computer, only one user can login the network domain successfully, when logout, other people will not be able to re-sign and get the error messenge "domain XXXX not be able to use ..." and so on the message. But ask the user who can sign before to sign again, it can be used.
Why?
Unknown at present. After work, chat with afore manager, he mentioned that probable the second AD problems of backup. AD Account with no major changes simultaneously, and make conflict or domain authentication failure. " Today, dealt with a Client PC that previous two days unable to add or remove domain, but now can be added or removed, speculate the tow ADs two days ago were not synchronous changes Client-account, now handled when they are finished backup and can add to network domain. This problem must be maintained at work until next week.
-------------
這兩天紛紛接到一種案例:使用者在登入網域時會有找不到網域的現象;或者同一台電腦只有一個人可以登入網域,當登出後,其他人再行登入時便會出現"網域XXXX無法使用..."等等的訊息,但是再請可以登入之使用者登入時卻又可以使用網域。
為什麼?目前還未知,在下班後與之前的資訊組找聊天,他提到:"有可能是第二台備份AD出了問題。與主要AD的帳號沒有同步更改,以致產生網域衝突或認證失敗的原因。" 因今天處理一台Client PC在前兩天無法加入或移除網域,但現在卻可以,推測是兩台AD在兩天前處理時並未同步更改Client端帳號,現在處理時卻已備份完畢而可以加入網域。此番現象須待下星期上班時再做查修。

Today handling two repair cases.
First: A teacher of the school say the School Administrative System having error messages and she can't produce the statements. When I arrived at the scene, it can be used good........
Second thing: the teacher said: "my loudspeaker is voiceless, help me!" , OK! I arrived at the scene, it really broken,but installed in his computer it is bad, but ....... loudspeaker is good ...... ?.?
------
今天處理兩件報修案件,一件壞的莫名奇妙,一件好的莫名奇妙。
第一件:學校的校務行政系統有老師報修其使用時會出現錯誤訊息而不能產生報表。當我到場時卻可以使用了。這.......
第二件:老師說:"我的喇叭沒有聲音,麻煩幫我看一下!",OK!我到場了,結果它真的壞掉了,裝在他的電腦上是壞的,但是.......喇叭是好的,這......

Case: Someone colleague wish us to increase a RJ-45 cable in her used space to let the Tablet PC to access the Internet and the sharing or private resources of NFS.

Disposition: After exploration, this project is very troublesome, particularly in the wiring to bypass the existence of various fixed equipment. So, I propose to use wireless network access. But by security considerations, wireless network domain and the original domain are in the different networks, one is A Class(10.0.0.0 / 8) and another is B Class (172.16.0.0 / 8). Therefore, unable to use wireless network to access the NFS of original domain. Wish can be balanced both, we can set the "private IP address" of TCP/IP's IP address in a group of the NFS domain IP address. Then, we can access NFS domain resources and also use the internet by DHCP IP of wireless network.
--------------------------------
案例:某位同事欲在其使用空間內增加一條網路線,用以平板電腦來連結上網並存取網域上的共享或私有資源。

處理方式:經勘察後發現,此一工程甚是麻煩,尤在佈線,須繞過各種原存在之固定設備,因此建議以無線網路存取。但因安全的考量,無線網路網域與原欲存取之網域網段不同,一為A Class(10.0.0.0/8)、一為B Class(172.16.0.0/8),因此利用無線上網並無法存取原網域之NFS。希望兩者兼顧則可在TCP/IP的IP位置設定裡,"私有IP位址"設定裡自己給一組NFS網域的IP位址即可存取NFS網域的資源亦可使用無線網路DHCP給的IP位置上網。

Dealt with a PC that assembly by ourself. It has no screen when booting. Check CRT power that is OK, VGA line is OK, video demultiplexer is also. Finally check VGA card but it is onboard. This time there is a test steps: open the PC case, remove the battery from the motherboard, then countdown 10 seconds .......。 Set the battery back and boot!
Done!
Norm:
ASUSTeK Computer INC.
P5GD1-VM
Rev 1.xx

82915G/GV/GL/P/PL/GL Grantsdale Host Bridge/DRAM Controller
South Bridge 82801FB/FR (ICH6/ICH6R) LPC Interface Bridge
SMBus Intel Corporation 82801FB (ICH6) SMBus Controller @0400h

CPU Intel Pentium 4 LGA775 [Socket 775]
MAX CPU SPEED 4000 MHz
--------------
早上處理了一台自己組裝的PC,開機了卻沒有畫面。檢查螢幕電源是OK的,VGA線也OK,視訊分接器OK,最後就是檢查PC的顯示卡了。可是它是onboard的,這個時候還有一個測試的步驟:打開PC的case,把主機板上的電池拿掉,倒數10秒.......。裝上電池,開機!
收工!
對了,型號是:
製造商 ASUSTeK Computer INC.
型號 P5GD1-VM
版本 Rev 1.xx

晶片組供應商 Intel Corporation
晶片組型號 82915G/GV/GL/P/PL/GL Grantsdale Host Bridge/DRAM Controller
South Bridge 82801FB/FR (ICH6/ICH6R) LPC Interface Bridge
SMBus Intel Corporation 82801FB (ICH6) SMBus Controller @0400h

中央處理器(C) Intel Pentium 4
Cpu 插座 LGA775 [Socket 775]
處理器升級
最大 CPU 速度 4000 MHz

This morning our school give a relay race of Da-An Ward. I was asked to be officiate because I have any courses.
Students at the race and I found that it is really difference between training and no training .
Originally, I want to attend a course that about Windows Domain Management, but the sixth grade teachers have always complained that why aren't their prints changed yet? So, I stay and help to move. Alas~~~~
-----------------------------
早上來個大安區的接力比賽,因為早上沒課被抓去當裁判了。
看了學生在賽跑,發現,有練跟沒練真的有差!
下午本來要去上 第一階段Windows網域管理,可是六年的的老師一直抱怨他們的印表機怎麼還沒搬移完畢(奇怪哩!自己沒手沒腳嗎?急的話,自己搬就好啦!)?所以就留下不去研習了。 = =!!! 唉~流血流汗還被嫌,其娘之~~~

Q: Resource classroom (3) a laser color printer when prints phonetic notation fonts of the files will be garbage characters or incorrect results. It's driver is HP LJ 5100 PCL6.

A: Solution (Windows XP), Start -> Printers and Fax -> On the HP LJ5100 icon by right-clicking -> Content -> Print Preferences -> Appearance -> Details -> Enable " True Type fonts "option -> OK.

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

Q:資源教室(三)一台雷色印表機在印有注音字型的文件時,會出現亂碼或是不正確的結果,驅動程式為HP LJ 5100 PCL6。

A:解決方式(Windows XP),開始-->印表機和傳真-->在HP LJ5100的圖示上按滑鼠右鍵-->內容-->列印喜好設定-->外觀-->詳細資料-->勾選 "True Type字型"這個選項-->確定。

今天正好整天都沒課,趁機去幫幾位老師維修一下,問題大概如下:
1.螢幕畫面突然消失
A:一位的只要按個Reset鍵就OK了,因為CRT本身的電源指示燈是正常的綠色燈,這表示問題來自於PC本身,雖然不知道確切原因為何?另外一位比較天兵,指示燈沒亮,很明顯,插頭沒插好! = =!!!
2.網路磁碟無法使用,雖然用NetLogon登入網域了,但是依然不能用。
A:因為本機並沒有加入網域,只是用NetLogon來使用網域的資源;因此我將其加入網域,並移除NetLogon的捷徑,重新開機之後就可以正常使用了。另一個網路不通的,我去了就好了,也不知道為什麼?????
3.協助架設單槍。
A:老師來詢問其PC的Device少了一個,他想要可以一對二的視訊分接器(1 Input & 2 Output),通常每一班都會有,只有他沒有。當我過去看時,原來被之前的老師給收起來放在櫃子了。 / _\ What can I say?

這個學期開始,五、六年級的小朋友開始敎Blog的使用,理論上每個人都有一個Blog可以使用。但是,同學之間、老師與學生之間卻不知道彼此的blog address,這時候我們就得充當這"中間人",整合所有老師與學生的blog URL,讓彼此找到彼此。問題來了,要怎麼扮演這個中間人?口頭或Email(每個學生與老師均有Email)詢問,並整合所有URLs嗎?不可能,這樣太沒效率了,每年都要玩上一回,耗費太多時間與精力了。
或者,請老師在自己的blog發一篇文章,並請學生回應,回應自己的blog address,最後老師整理之後再以文章的方式post出來,這樣好嗎?如果時間久了,這篇整理過後的文章不就石沉大海了?除非另外做個link獨立出來,不過我還是質疑這種方式的未來性跟串連資訊的可靠性。
我要的是:可以自由分享、永續保存的東西,並且要簡單、容易及樂意使用的東西。之前的想法是我只要寫一支小程式,讓學生自己把自己的blog address給post上資料庫,然後我只要畫個表格,以班級為單位來顯示每個人的連結,像是

5年01班
01 02 03 04 05 06
07 08 09 10 11 12
13 14 15 16 17 18
19 20 21 22 23 24
25 26 27 28 29 30
31 32 33 34 35 36
37 38 39 40


但是,明年的五年級呢?要再以"學年度"來分?這樣似乎不是長久之計,學校也不該只是這樣"整合"!
有朋友建議我是不是自己架個blog server就好了,像是LifeType、WordPress MU這種的平台。只是,當初讓孩子們學習使用blog,並以此繳交作業的方式是希望能夠讓學生在畢業之後還能帶走自己的東西,並分享自己的學習歷程,以學校有限的資源,恐怕無法支持這樣的服務到一、二十年,甚至更久之後,但是單純的文字平台卻容易的多,就算網站掛點了,也不至於讓學生的心血消失,所以尋求外界免費的無限資源是必要的,我們不需要開發,只要整合就好了!
我有參考過像是 del.icio.usHEMiDEMifunP 推推王等等的網站,但是我找不到這種CMS套件可以架設,我也不知道他們平台環境,也許我該嘗試其他的方式......?

昨晚無意中翻到PC Office(9月號)這本雜誌的其中一篇,介紹Wiki 相關概念及應用,也許我該試試看這Wiki Power。

轉移學校所有教職員的信件之前,我在想如何能夠順利轉移,因為移轉需要原Mail Server上所有老師的帳號密碼,有考慮兩種思考:第一種方式:轉移必須知道所有人員的帳號跟密碼,要一一取得所有老師的密碼是件很困難又根本不會達成 的事,而Linux的shadow裡的密碼都是加密過的,用破解的是非常不道德且不允許的,只能用問的,但老師又不見得會告訴你;第二種是在原來的 Mail Server上把所有Mail User的密碼重設,等轉移過後,請使用者們自己在第一次登入時修改密碼。想當然爾,選擇第二種是簡單又迅速的的方法。
經資訊小組討論過後,決定找一個時間移轉,事前當然需要先公告Mail Server要移轉的緣由跟時間,給User準備跟期待。
移轉的步驟:

1、在原本的Mail Server主機上重設所有User的密碼。(我是在Webmin上把所有的User的帳號移出來,用Excel編輯成需求的格式,像這樣


A B C
1 username source username source password
2 picasso picasso 12345
3 claude.monet claude.monet 12345
4 lilies lilies 12345
)

2、匯回修改後的CSV檔,批次修改所有User的資料。

3、到Google Apps的電子郵件移轉(Email Migration)設定:此次轉移任務的名稱(不拘). (2)伺服器軟體、主機位置(IP或host.domain都可以)、安全性(看原本的Mail Server是不是採用SSL或STARTTLS模式,如果都沒有則選"無"). (3)通訊埠(安全性選"無"及"STARTTLS"為143,選"SSL"為993,不過要看原Mail Server所採用的協定). (4)IMAP路徑前置字串(Linux上通常為/var/spool/mail或是/var/mail/)

目前電子郵件轉移(Email Migration)所支援的伺服器軟體

設定完之後,按"繼續"
接著是要選擇移轉使用者帳戶的方式:一些或是大量

決定之後就選擇"繼續"。(我當然是選大量的囉!有幾百人呢!)
接下來就把之前做的CSV檔給傳上去,按個"上載並測試連線"

如果成功了,就會顯示所找到的信件匣(通常叫做Inbox)。

最後就可以開始快樂的轉移(Migration)了。

後記:
本來預估半天就可以搞定,但是一直顯示連線失敗,看了Google Apps所提供的錯誤訊息文件也 沒辦法解決,最後打算用最簡單的方式:"砍掉重練"。我把Mail Server(Postfix)相關套件移除(反正移轉後也要移除了),包含MailScanner、Spamassassin、Sasl2、F- prot、Devocet等等移除,只裝SendMail跟Devocet,結果居然伺服器驗證失敗,是帳號驗證失敗,不是伺服器連線測試失敗。後來才發 現我在耍笨,是我在重設老師的密碼,在批次modify時,少了一個欄位(原本webmin匯出的格是一個帳號是13個欄位,要modify時要增加一 個"被修改的帳號"的欄位),難怪伺服器OK,帳號驗證不OK;修正之後就一切正常了,也順利轉移,不過也搞到當天晚上十一點多才睡覺。@@!!!

幾個星期來,經過反覆的測試、宣導及半強迫,終於把學校的Mail Service丟給Google Apps了,這樣一來,伺服器的工作就少了一個負擔了。
之前遲遲不換到Google Apps的原因是因為學校本身的Mail Server上有老師留下來的信件,如果貿然換郵件系統而要求老師自行備份郵件的話,必定會招致許多的抨擊及抱怨,所以一直沒有轉換。直到近來Google Apps在教育版(Education Edition)上公告一項新的功能,寫著"

最新! 電子郵件移轉 - 將您現有的電子郵件封存檔移轉至「Google 應用服務」 - 開始使用(
New! Email Migration - Move your existing email archives into Google Apps - Get started)。一開始還不懂是什麼意思,抱著好奇的心態去測試這個功能,拿著自己的帳號來測試什麼叫做"Migration",結果,居然成功了!這一刻,有一種心中大石放下一塊的感覺,很想大聲的叫:"我終於要擺脫Mail Server的禁錮了!哈!哈!哈!",我分析,如果完全把所有教職員的Mail轉移到Google Apps的話有幾個優點也有缺點:
優點:
1、主機房可以騰出一台Server來做別的Service,譬如Web Server或是Samba Server或是NFS、Backup Server、Update Server等等。
2、Gmail優越的防堵垃圾信件及防毒機制(至少比我自己架設的Mail Server好很多)會避免校內使用OutLook收信或其他使用POP3收信的應用軟體在收取信件時容易中毒的情形,甚至蔓延到全校的區域網路當中;之前因為病毒郵件造成的PC中毒已經太多樁了,甚至教師用的PC被植入木馬程式而不自知。
3、郵件信箱的容量由原本的(自己架的)100MB提升為2GB。
4、其他功能:譬如Chat、Calender、Docs、Web Pages、Star Page等等。
缺點:
1、自己的技術不會進步,哈!

Mail Server in the machine after a shift and start to test ok, but over the past few days has occurred several problems. DNS aspects aside for the moment and the local server has some problems.

First : When sign openwebmail and it displayed "can not read lock /var/spool/mail/user! " or " Unknown error at user write lock error ) : " After an investigation and discovered that the original mail owner was lost, mail owner became root. I do not know all of accounts the passwords and were unable to test how many lost, so change one by one. However, my good friend Pcpark provide a batch file to modify quickly and saved a lot of time. Create a text file that contains all the mail users account and create a batch file to execute. For example :

#vi chownuser

may

john

apple

joe

mary

arthur

stacy

lee

jack

Save it.

#vi chownuser.sh

#!/bin/sh

for name in `cat chownuser`
do
chown $name.mail $name
done

Save it.

These two files on the mail directory and then execute.

#sh chownuser.sh

This will help you change all of mail owners! ^ ^

2nd : Some people sign will be displayed at the bottom bunch .

Software error:

Undefined subroutine &ow::htmltext::str2html called at /var/www/cgi-bin/openwebmail/shares/ow-shared.pl line 1283.

For help, please send mail to the webmaster (root@localhost), giving this error message and the time and date of the error.

The problem is user's home directory mistakes, as long as back into their original position.

Third : This is a big problem, the PC is not to be mail server originally. So the partition for /var in the first place is not allocated greater capacity, so the mail will fill /var partition. Don't re-install........ Finally I think solution in the bath:

#cd /var/spool/

#mkdir /home/mail

#mv /var/spool/mail/* /home/mail

#chown root.mail /home/mail

#mv mail mail_old

#ln -s /home/maol /var/spool/mail

As a result, all letters moved to /home/mail underground. If there is the question of mail owner occurred, you want to change mail owner again.

#cd /home/mail

#sh chownuser.sh

Done!^^


Mail Server在移機之後一開始試OK的,可是過幾天卻遇到許多的問題,DNS方面暫且不談,本機就有一些問題了。

第一:登入openwebmail時顯示"讀取無法鎖定 /var/spool/mail/user!

"或是"Unknown error at user write lock error):"經查證之後才發現,原來有些mail的權限已經跑掉了,擁有者變成root而不昰user本身,因我無所有user的帳號密碼,不能一一 測試到底有哪些權限跑掉了,於是就一個一個改權限。不過,我的好朋友pcpark提供一個batch改權限的方式,讓我省了不少時間:

先做一個文字檔,裡頭包含所有mail使用者的帳號,再寫一個sh檔來batch。範例如下:

#vi chownuser

may

john

apple

joe

mary

arthur

stacy

lee

jack

存檔.

#vi chownuser.sh

#!/bin/sh

for name in `cat chownuser`
do
chown $name.mail $name
done

存檔.

這兩個檔案一同放在mail目錄裡,然後執行。

#sh chownuser.sh

這樣就會幫你全部改好mail的擁有者了!^^

第二:有人登入時會顯示下面這一串

Software error:

Undefined subroutine &ow::htmltext::str2html called at /var/www/cgi-bin/openwebmail/shares/ow-shared.pl line 1283.

For help, please send mail to the webmaster (root@localhost), giving this error message and the time and date of the error.

這個問題昰user的家目錄位置錯誤了,只要放回原來的位置就可以了,哈!

第三:這是一個大問題,原本此PC不是要用來當作mail server的,所以當初在partition時倂沒有給/var很大的容量,所以移過來的/var/mail一下子就會把該partition塞爆,不想重灌.......。終於在洗澡時想到解決的方式:

把/var/spool/mail裡的信件移到/home底下去

#cd /var/spool/

#mkdir /home/mail

#mv /var/spool/mail/* /home/mail

#chown root.mail /home/mail

#mv mail mail_old

#ln -s /home/maol /var/spool/mail

這樣一來,信件就全部轉移到/home/mail底下了。

如果還有發生權限的問題,就再去修改各個權限。

#cd /home/mail

#sh chownuser.sh

完畢!^^

Because of the recent mail server was hacked and I also FreeBSD wake unable to make the best management, therefore take this opportunity to move Mail Server to Fedora Core 6. Previously prepared to put the work in advance is create all of the user accounts of FreeBSD in FC6. But no one should create account one by one! After all, the units have nearly 200 people Account. Therefore, due to this Webmin installed a suite, so we can export substantial account:

Login the FreeBSD system which own webmin service --->System---> Users and Groups --->Export users to select batch file--->Select the users and their options --->Export NOW

Login Fedora Core 6's webmin--->System --->Users and Groups--->Create, modify and delete users from batch file --->Browse you file---> select the set options --->Execute batch

Waitting implementation of the batch file .... . Done! ^ ^

This preparatory work is finish! Finish a "major event"!

Next, should the FreeBSD mail and mail folders of user home directory (because it was installed the openwebmail) transfer to FC6 (I use is that I want, is probably the most stupid way. .)

In FreeBSD :

#cd var * FreeBSD because my mail is under the /var

#tar zcvf mail.tar.gz mail/

*Entire mail folder compressed into one of tarball

# mv mail.tar.gz /var/www/html/ *moved to the web underground

# cd / * under /

#tar zcvf home.tar.gz home/ *all user home folders under /home

#mv home.tar.gz /var/www/html/ *moved to the web underground

Fedora Core 6 :

#cd /

#wget http : //freebsd.domain/home.tar.gz

*Catch FreeBSD's home directory file backup

#tar zxvf home.tar.gz

*decompress home.ta r.gz. This will directly cover the original home
directory file name all the same file or folder

#rm -rf home.tar. gz * Remove have already decompress off tarball

#cd /var/spool *to mail stored in the folder on the floor

#wget http://freebsd.domain/mail.tar.gz *FreeBSD's mail backup file.

#tar zxvf mail.tar.gz *decompress mail backup file

#rm -rf mail.tar.gz *delete the mail.tar.gz has been used.

Don't forget to back to FreeBSD to delete the files that are homr.tar.gz and mail.tar.gz under the website root directory! Otherwise, people can download arbitrary your backup file is, of course, your web servers are the starting. Now almost completed. YA!



最近因為Mail Server常被入侵,而且FreeBSD我也不熟,無法作最好的管理,於是趁此機會要將Mail Server移到Fedora Core 6上。

先前要準備的工作事先把FreeBSD上的使用者帳號在FC6上在重建一次,但應該沒有人會一個一個來重建吧!畢竟我們的單位也有將近兩百人的帳號。於是,因本身有安裝Webmin此一套件,所以我們可以把帳號大量匯出:

登入 FreeBSD的webmin--->系統--->使用者與群組--->Export users to batch file--->選好要匯出的使用者及其選項--->Export NOW

登入 Fedora Core 6的webmin--->系統--->使用者與群組--->使用批次檔一次過建立/修改/刪除使用者--->Browse你會出的檔案--->--->選好要設定的選項--->執行批次檔

Waitting.....Done! ^^

這樣先前的準備工作就做完了!做完一件”大事”了!

接下來要把FreeBSD上的mail及家目錄裡的mail資料夾(因為有裝openwenmail)轉移到FC6上(我用的是我想得到的方法,可能是最笨的方法。@.@)

在FreeBSD端

#cd /var *因我的bsd的mail是放在/var/mail底下

#tar zcvf mail.tar.gz mail/ *把整個mail資料夾壓縮成一個tar.gz的壓縮檔

# mv mail.tar.gz /var/www/html/ *移到網頁目錄底下

# cd / *到 / 底下

#tar zcvf home.tar.gz home/ *所有人的家目錄在home底下

#mv home.tar.gz /var/www/html/ *一樣移到網頁目錄底下

Fedora Core 6上

#cd /

#wget http://freebsd.domain/home.tar.gz

*把FreeBSD上所有人的家目錄備份檔抓過來

#tar zxvf home.tar.gz

*解開home.tar.gz,此會直接覆蓋原來家目錄裡所有檔名相同的檔案或資料夾

#rm -rf home.tar.gz *刪除已經解開過的壓縮檔(不解開就是暫空間而已)

#cd /var/spool *到FC6上存放mail的資料夾的上一層

#wget http://freebsd.domain/mail.tar.gz

*把FreeBSD上的mail備份檔抓過來
#tar zxvf mail.tar.gz *解開mail備份檔

#rm -rf mail.tar.gz *刪除已經用過的mail備份檔

記得回到FreeBSD上把網頁根目錄下的home.tar.g及mail.tar.gz都刪掉喔!不然別人是可以任意下載您的備份檔的,當然是您的網頁伺服器有開的情況下。

至此差不多就完成了!。

1. 早上跟小毛把資源教室(一)兩位陳老師的台碩的電腦(98)換成Windows XP的,就硬體來說只多了一條SD128MB的RAM而已,效能沒有差很多,只是XP支援性的問題會比98少一點。不過,對老師來說:XP就是新的,98就是舊的。 =.=!!!



2. 報修電腦教室(一)MBS多媒體廣播教學系統,報修(http://www.sinew.com.tw)內容如下:

(1). MBS上兩台Client端一直閃紅燈,不知為何?
(2).靠走廊整排client的pc在廣播時,畫面會變色或是廣播視窗變小,恢復自行操作時Client端就正常。



3.資源教室(三)taes1135網域設定有問題,導致該台分享之印表機的Client端都會出錯,重設就OK了!

My Random Post

Powered by Stuff-a-Blog

Categories

____

Subscribe via email

Enter your email address:

Delivered by FeedBurner

Add Me to Your MSN Contact

Subscribe Now

Visitor Map

Locations of visitors to this page

Bloggerads

Guest Book