2022/07/27

連兩週結算日翻船啊

 連續兩周的OP週結算都來個V轉,本來當週都有機會賺錢,最後都賠了。

結算日雙賣,做錯邊,基本上就跟做小台差不多的賺賠啊。

2022/07/20

選擇權下單真是亂啊

 選擇權不像股票或期貨,今天你買了一張,如果又賣一張,帳戶就是0庫存。

但選擇權是可以同時存在買跟賣,所以下單前要先確認好現在是新倉還是平倉的選項,三不五時就會因為這個事情下錯單,真的很不爽,會因此產生不必要的虧損。

還有結算日時,明明要下結算日的合約,有時也會不小心下到新合約。

有時後就是因為這樣,原本當天要小賺的,就變小賠,白做工,真的要小心一點才行。

2022/07/11

Teams 登入失敗 Error Code caa20002

 突然多位user的Teams登入失敗,錯誤代碼都是caa20002。

這些登入失敗的電腦,都是win7,但又不是每一台win7都有這個問題,有點奇怪。

後來找了幾台不同的電腦測試後,才發現原因。

主要是因為IE的關係,要IE11才能正常登入Teams程式,其他比較低階的版本,都會失敗。

很討厭的問題,因為錯誤訊息根本跟IE沒關係,很難查原因。


Teams Login Failure with Error Code caa20002

Multiple users suddenly encountered login failures in Teams, with the error code caa20002.

Interestingly, these login issues were observed on computers running Windows 7, but not every Windows 7 device was affected, which seemed puzzling.

After conducting tests on several different computers, the root cause was identified.

The problem primarily stemmed from Internet Explorer (IE) compatibility. Teams application requires IE11 to function properly, and lower versions of IE would result in login failures.

This issue was frustrating because the error message provided no indication of an IE-related problem, making it difficult to identify the cause.

2022/07/05

CentOS 建立有root權限的帳號

 因為不想讓其他人有root的密碼,但又需要root權限工作,所以需要建立一個有root權限的帳號。

帳號建好後,執行下列指令,讓該帳號能用sudo,又不需要輸入任何root密碼,就可用root權限工作。做完在把該帳號停用就好了。

[root@test ~]# visudo

在裡面找到下列這行

root    ALL=(ALL)       ALL

在底下加入其他用戶

newuser     ALL=(root) ALL  

存檔離開,然後newuser就可以在不輸入密碼的情況下執行sudo指令,達到有root權限的目的。


Creating a Root-privileged Account on CentOS

To prevent sharing the root password with others while still needing root privileges, it is necessary to create an account with root privileges.

Once the account is created, execute the following command to allow the account to use sudo without entering any root password, enabling it to perform tasks with root privileges. Afterward, the account can be deactivated.

[root@test ~]# visudo

Find the following line within the file:

root ALL=(ALL) ALL

Add the desired user below it:

newuser ALL=(root) ALL

Save the changes, exit the file, and then the newuser can execute sudo commands without entering a password, achieving the goal of having root privileges.


HPE switch reset 重置

 最近買了HPE的switch,然後在設定時設定錯了,造成登入後沒權限做任何設定的調整,只能做設定的重置。

但現在的switch已沒有實體的reset鍵,只好透過官網提供的方式來reset。


首先,先重開switch,在重開的過程中會提示,可以按下Ctrl+B進入進階的開機選單中

進到進階開機選單後,就先選7,這是讓你下次重開機後,會跳過原本的設定檔,就像新機一樣,這時就可以重新建立一個新的帳號,給他最高的權限,然後存檔覆蓋原本的設定檔,再重開機,就可以用新建的帳號進去了。

下面是原廠提供的操作畫面,可以參一下。   


    BOOT  MENU    


1. Download application file to flash  

2. Select application file to boot  

3. Display all files in flash  

4. Delete file from flash  

5. Modify bootrom password  

6. Enter bootrom upgrade menu  

7. Skip current configuration file  

8. Set bootrom password recovery  

9. Set switch startup mode  

0. Reboot    


Enter your choice(0-9):      

Enter 7 (Skip current system configuration) and restart the switch (opcion 0). The switch reboots with empty configuration, and can log in through the console port without entering the password to check the configuration file for the user password.



Enter your choice(0-9): 7  

The current setting will boot with current configuration file when rebooted.  

Are you sure you want to skip current configuration file when reboot? Yes or No [Y/N] y  

Setting......done!              


    BOOT  MENU    


1. Download application file to flash  

2. Select application file to boot  

3. Display all files in flash  

4. Delete file from flash  

5. Modify bootrom password  

6. Enter bootrom upgrade menu  

7. Skip current configuration file  

8. Set bootrom password recovery  

9. Set switch startup mode  

0. Reboot    


Enter your choice(0-9): 0    


Starting......