2022/12/13

QNAP TS-432XU(4.3.6)更換故障硬碟

 一台QNAP TS-432XU(4.3.6)有4顆硬碟做RAID5,最後一顆硬碟已出現警告建議更換,雖然還可以用,但這顆硬碟的讀寫速度慢很多,所以影響到一些日常作業。

原本同型號的硬碟停產了,所以就買一個同廠牌同容量,但轉速更快的來換。

雖然知道是熱插拔,但一開始還上網看一下是不是要在管理介面上做什麼操作,後來查到的畫面又跟自己的不同,就決定直接插拔更換了。

插上後系統就自己在重建了,蠻方便的,剩下就讓它跑完重建程序了。


Replacing a Faulty Hard Drive on QNAP TS-432XU(4.3.6)

On a QNAP TS-432XU(4.3.6) device with a RAID 5 configuration using four hard drives, the last drive started showing warning signs and advised replacement. Although it was still functional, its read and write speeds had significantly decreased, affecting daily operations.

Since the original model of the hard drive was no longer available, I purchased a higher-speed drive from the same manufacturer with the same capacity as a replacement.

While I knew that the device supported hot-swapping, I initially checked online to see if there were any specific actions required through the management interface. However, the instructions and screenshots I found were different from what I encountered, so I decided to proceed with a direct replacement.

Once I inserted the new drive, the system automatically initiated the rebuilding process. It was quite convenient, so I allowed it to complete the rebuilding procedure.



2022/12/09

QNAP NAS無法發信 Failed to send a test message using SMTP Service.

在QNAP NAS設定好電子郵件設定,用來發送警告信給管理者,設定好後測試,卻都失敗,錯誤訊息就是示"Failed to send a test message using SMTP Service."。

從不同網段連到QNAP的管理web都正常,所以就覺得網路設定都沒問題。

後來就想用ssh連上QNAP,去ping在不同網段的mail server,卻是不通的,然後再執行route -n 顯示路由表時,卻沒有0.0.0.0的路由,這就妙了。

本來想直接用指令去加,但查到的指令route add default gw 192.168.24.1 br0有錯誤,所以就決定回管理web上看看是不是少設了什麼。

結果發現了一個東西,有一個系統預設閘道的設定,之前都沒去理它,後來進去這設定,在把gateway設定上去之後,回到ssh裡,route -n 顯示路由表時,就有0.0.0.0的路由,發送信件的功能也就正常了。



The QNAP NAS is unable to send emails.
When setting up the email configuration on the QNAP NAS to send alert messages to the administrator and testing it, all attempts fail with the error message "Failed to send a test message using SMTP Service."

Since accessing the QNAP management web interface from different networks works fine, it is believed that there are no issues with the network settings.

Later on, an attempt was made to connect to the QNAP using SSH and ping the mail server in a different network segment, but the connection was unsuccessful. Upon executing the command "route -n" to display the routing table, it was noticed that there was no route for 0.0.0.0, which was puzzling.

Initially, there was a plan to manually add the route using the command "route add default gw 192.168.24.1 br0," but it was found to be incorrect. Therefore, the decision was made to go back to the management web interface and check if anything was missing.

As a result, it was discovered that there was a default gateway setting that had been overlooked. Previously, it had not been addressed. After accessing this setting and configuring the gateway, upon returning to the SSH session and executing "route -n" to display the routing table, the route for 0.0.0.0 appeared, and the email sending functionality started working correctly.

2022/11/21

AD查詢4776 登入失敗的電腦 來源工作站錯誤

 在AD查看被鎖定的帳號,用id 4776去撈出登入出敗的訊息,要找出是在哪台電腦做登入行為的。

結果在來源工作站的資訊,是一台沒看到的電腦名稱,也ping不到,覺得很奇怪。

就想到之前遇到來源工作站是空白的問題,那時就繼續在事件檢視器裡去找NTLM的log,可以找到相關的訊息。

這次也想說去NTLM裡面找找,就找到了,在NTLM裡記錄的登入失敗log裡,除了來源工作站,還多了一個安全通道名稱,這邊顯示的才是正確的電腦名稱。

至於為啥來源工作站是一個奇怪的名稱,目前也不知原因。


When checking the locked accounts in Active Directory, I used ID 4776 to retrieve the information about failed logins in order to determine the workstation where the login attempts originated.

The result showed an error in the workstation information, indicating a computer name that I couldn't find or ping, which seemed unusual.

I recalled a previous encounter where the workstation information was blank, so I continued searching for NTLM logs in the Event Viewer, as they often contain relevant details.

This time, I decided to check the NTLM logs and successfully found the failed login log. In addition to the workstation information, there was also a security channel name recorded. The computer name displayed in this section was the correct one.

As for why the workstation information appeared as a strange name, I am currently unaware of the underlying reason.

2022/11/16

win7 chrome 播放線上影片 有聲音沒畫面

最近發現在透過chrome看一些線上課程影片時,影片會有聲音沒畫面。

win10的電腦都沒問題,只有win7的電腦會有這種狀況,所以排除影片本身的問題。

後來才發現竟是chrome裡面設定造成的,在win7電腦中,需要把chrome裡面有一個硬體加速的功能關閉,影片的畫面才能正常顯示。



No Video but Sound when Playing Online Videos in Chrome on Windows 7

Recently, I noticed that when using Chrome to watch online course videos, there would be sound but no video playback. This issue was specific to computers running Windows 7, as there were no problems on Windows 10 machines. Therefore, I ruled out any problems with the videos themselves.

Later, I discovered that the issue was actually caused by a setting within Chrome. On the Windows 7 computers, it was necessary to disable a feature called hardware acceleration in Chrome to enable proper video playback.

2022/11/04

Teams JavaScript error the specified procedure could no be found

 突然有幾台電腦的teams開啟都會有這個錯誤,無法使用。









重裝teams也沒用。

查了一下,原來是可轉發套件的問題,處理流程如下。

1. 移除teams,並把%appdata%底下teams相關的資料夾全刪除。

2. 移除電腦內所有的visual c++可轉發套件,然後重開機。

3. 安裝最新的2015to2022,visual c++可轉發套件。

4. 安裝teams。

之後就可以正常開啟了。


Teams JavaScript error: "The specified procedure could not be found."

Suddenly, several computers are experiencing this error when opening Teams, rendering it unusable.

Reinstalling Teams did not resolve the issue.

Upon investigation, it was discovered that the problem lies with the redistributable package. The following steps can be taken to address it:

Uninstall Teams and delete all related folders under "%appdata%".

Remove all Visual C++ redistributable packages from the computer and restart.

Install the latest version of the Visual C++ redistributable package (2015 to 2022).

Install Teams.

After following these steps, Teams should open without any errors.


2022/11/03

OUTLOOK編輯郵件貼圖沒東西

 outlook在編輯郵件時,要直接把圖貼在內文中,但貼上後,就是空白沒東西。

有時後在郵件的預覽內文視窗,在上下滾動畫面時,畫面也會很頓。

後來有查到,就是WIN10的DPI設定。

就是在解析度的設定上面,還有一個百分比可以調整畫面上字型與項目的大小,如果設定是超過100%,像是125%或150%時,就會造成在編輯郵件時的一些問題,只要調成100%,就可以排除這個怪問題,很奇特的一個問題。



There is nothing in the image pasted in the email while editing it in Outlook.

Sometimes, when scrolling up and down in the preview pane of the Outlook, the screen becomes sluggish. Later, it was found that it is due to the DPI (Dots Per Inch) settings in Windows 10. In the display settings, there is a percentage that can be adjusted to change the size of fonts and items on the screen. If the setting is above 100%, such as 125% or 150%, it can cause issues when editing emails. By adjusting it to 100%, this strange issue can be resolved.

2022/10/31

7zip 壓縮檔案指令

為了想要定期把一些檔案壓縮成一個檔案,所以就想到要用batch加排程的方式。

7zip有提供相關的指令可以做

指令如下,

7z a d:\backup[%DATE:~0,4%-%DATE:~5,2%-%DATE:~8,2%].7z  @d:\list.txt 

第一欄(7z) - 就是執行程式的名稱,最好是用完整路徑

第二欄(a) - 就是要壓縮的意思

第三欄(d:\xxx) - 就是壓縮檔的名稱,上面的範例是檔名會自動產生當天的日期,後面的副檔名也可以改用zip

第四欄(@:xxx) - @後面要接一個文字檔,這個文字檔裡就列出要壓縮的檔案存放的路徑,所以有3個不同資料夾的檔案要壓在一起,就把三個路徑分三行存在文字檔裡就行了。

以上就是batch檔的內容。



7zip File Compression Command


In order to periodically compress files into a single archive, I decided to use batch scripting along with scheduled tasks. Fortunately, 7zip provides relevant commands to achieve this.

The command is as follows:

7z a d:\backup[%DATE:~0,4%-%DATE:~5,2%-%DATE:~8,2%].7z @d:\list.txt

Here is a breakdown of the command:

The first field (7z) represents the name of the executable program. It is recommended to use the full path to the program.

The second field (a) indicates the action of compressing.

The third field (d:\xxx) specifies the name of the compressed file. In the example above, the file name will be automatically generated based on the current date. You can also change the file extension to .zip if desired.

The fourth field (@:xxx) specifies a text file. This text file contains the paths of the files to be compressed. So, if you have files from three different folders that need to be compressed together, you can list the three paths on separate lines in the text file.

The above instructions can be included in a batch file to automate the process.

2022/10/19

發信通知AD帳號 密碼快到期的人

 windows系統內建的提醒實在太小了,就縮在右下角,而且預設兩週前會天天提醒,到剩一週後,就不會在顯示了,使用者早就忘了,所以需要一個比較顯示的提示。

 可以參考這個下列這個powershell,就可以執到此功能,裡面程式碼有夠多,但只要先把要搜尋的dc位置,mail server位置,管理者信箱這3個設定值,調成自己環境內的資訊,就可以執行測試了。

預設是測試模式,所以只會寄給管理者,測試ok後再關閉測試模式,通知信就會發給使用者了,不需要修改太多東西就可以用了,讚。

https://gist.github.com/meoso/3488ef8e9c77d2beccfd921f991faa64#file-example-com-password-expiration-notifications-ps1



Notifying Users of Expiring Passwords via Email in Active Directory

The default built-in password reminder in Windows is quite inconspicuous, residing in the bottom right corner. Additionally, it only displays reminders every day up to two weeks before the expiration date. Once there is only one week left, the reminder disappears, and users tend to forget about it. Therefore, a more prominent notification is needed.

You can refer to the following PowerShell script to achieve this functionality. Although the code may seem extensive, you only need to adjust three configuration values: the location of the domain controller (DC), the mail server, and the administrator's email address. Once you set them according to your environment, you can execute a test run.

By default, the script runs in test mode, sending notifications only to the administrator. After confirming that it works correctly, you can disable test mode, and the notifications will be sent to the users. It requires minimal modifications, making it easy to use.

You can find the PowerShell script at the following link:

https://gist.github.com/meoso/3488ef8e9c77d2beccfd921f991faa64#file-example-com-password-expiration-notifications-ps1

2022/10/07

outlook 收件都變成純文字格式

 outlook正常的話,收進來的信會是html格式。

如果信突然都變成文字格式,就是設定被調到,改回來就行了,就在信任中心裡有個以純文字讀取所有標準郵件,取消就行了。


















Outlook emails are appearing as plain text format.
In a normal Outlook setup, incoming emails are displayed in HTML format.

If suddenly all emails are appearing as plain text, it means that a setting has been changed. To revert back to the original format, follow these steps:

Open Outlook and go to the Trust Center.
Look for the option "Read all standard mail in plain text" within the Trust Center settings.
Uncheck this option to disable plain text reading for all standard emails.
Once you have made this change, Outlook will display emails in their original format again.

選擇權單賣 慘啊

 最近兩個月真的就是上下刷,做單賣當沖實在慘,一直打到停損,超累的。

還好都有控制好停損,至少都沒大賠。