2020年11月3日 星期二

Solaris Hostid 設定

 Reference:

How to Change the Hostid In Solaris

Step 1: Convert Hostid 850168ae<hexdecimal format> to Decimal format <2231462062>

http://www.easycalculation.com/hex-converter.php

sample convert 850168ae<hexdecimal format> to 2231462062 <Decimal format >

Step 2: Convert Decimal format <2231462062> to Hex Value format <32 32 33 31 34 36 32 30 36 32>

http://www.easycalculation.com/ascii-hex.php

sample convert 2231462062<Decimal format> to 32 32 33 31 34 36 32 30 36 32 <Hex Value format>

Step 3: backup S20sysetup with #cp /etc/rc2.d/S20sysetup to /etc/rc2.d/S20sysetup.old

Step 4: Change the /etc/rc2.d/S20sysetup file & save

在最後一行加上

echo "hw_serial/v 32 32 33 31 34 36 32 30 36 32 00 00" | mdb -kw

Step 5: Run #sh S20sysetup or ./S20sysetup or reboot Machine



2020年10月28日 星期三

sshpass sftp

Reference:

 如何使用Bash脚本中的密码运行sftp命令?


sshpass -p <mypasswd> sftp user@sftp.mydomain.com > ${LOG}/filename.log <<!

cd /from_ch

ls -ltr

bye

!


2020年10月24日 星期六

2020/10/24 第十二屆遠東新世紀盃經典馬拉松賽

天氣涼爽,但風超大~~~

第十屆有魔王大上坡,第十一屆路平平的。

今年第十二屆除了魔王大上坡還延伸到箭竹窩,超級陡的!回程在河邊一路逆風,眼睛都睜不開了~~~

成績比去年慢1分鐘,不過今年多了魔王上下坡,所以應該算有一點進步吧。

2020年10月23日 星期五

SunOS / Solaris printer setup

List printer: lpstat -s


Add printer: 

SunOS 4

Edit /etc/printcap

Ex: 

lp|lw|ps|postscript|PostScript:\

        :lp=:rm=m5191:rp=aux:sd=/var/spool/lpd:


SunOS 5

透過Xwindow,指令admintool



Reference:

https://docstore.mik.ua/orelly/networking_2ndEd/tcp/ch09_02.htm




2020年9月2日 星期三

Disable weak versions of SSL/TLS Protocols on Windows Server 2012 R2

 Reference:

Microsoft IIS: Disabling the SSL v3 Protocol

How to Enable TLS 1.2 as the Default Security Protocol on Windows Servers

How to disable weak versions of SSL/TLS Protocols on Windows Servers


Windows 2012 R2 預設有 SSL 2.0, SSL 3.0, TLS 1.0, TLS 1.1, TLS 1.2,只保留 TLS 1.2 其餘關閉。

步驟:

執行 regedit.exe,切換到 HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Control\SecurityProviders\Schannel\Protocols\

新增機碼,沒有的就手動加上

SSL 2.0\Server\Enabled = 0 (Dword)

SSL 2.0\Client\DisabledByDefault  = 1 (Dword)

SSL 3.0\Server\Enabled = 0 (Dword)

SSL 3.0\Client\DisabledByDefault  = 1 (Dword)

TLS 1.0\Server\Enabled = 0 (Dword)

TLS 1.0\Client\DisabledByDefault  = 1 (Dword)

TLS 1.1\Server\Enabled = 0 (Dword)

TLS 1.1\Client\DisabledByDefault  = 1 (Dword)

重開機後生效。

驗證:

用 https://www.ssllabs.com/ssltest/ 確認狀態