ปัญหาก็เลยเกิด เมื่อ Alt + Shift จาก Windows ไปเจอกับปุ่มเปลี่ยนภาษาบน Mac ที่ใช้ Caps Lock
ความจำกัดบน Windows คือ Windows นั้น (แม้จะเป็น Windows 11 แล้วก็ตาม) ให้เลือกปุ่มเปลี่ยนภาษาได้จำกัดมาก เลยต้องหาทางแก้ด้วยทางอื่น เมื่อตัว OS ทำไม่ได้
Last month, we got a chance to build a new product from scratch again. It’s a simple project that build REST API on top of .NET 5 as a backend and React as a frontend. And this is the first time that we build a frontend TypeScript that do not host with .NET web project, this is how we found this challenge.
เมื่อเราพร้อมแล้ว เราก็ ssh เข้าไปที่ NAS ของเรา โดยแนะนำดังนี้
backup file เก่า เมื่อเรา ssh เข้าไป ปกติเราจะอยู่ที่ home directory ของ user เราก็ควรจะก๊อปไฟล์มาเก็บไว้ กันเหนียวเผื่อเราแก้ผิด ใช้คำสั่งประมาณ cp /etc/init.d/smb.sh .
เริ่มแก้ไฟล์ บน NAS ไม่มี Editor หรูๆอย่าง nano เราก็ต้องใช้ของที่มีคือ vi ที่ติดมากับ NAS (ส่วนตัวจะไม่พยายามลงอะไรไปนอกเหนือจากที่มีอยู่) วิธีการใช้ vi คงต้องไปหาเพิ่มเติมนะครับ อยู่นอกเหนือจากโพสต์นี้
เริ่มโดย vi /etc/init.d/smb.sh เมื่อเปิดไฟล์มาแล้ว หา function configure() ซึ่งในนั้นจะมีบรรทัดที่เรียก
/usr/local/sbin/nas_configgen -c samba
if [ $? -ne 0 ]; then
echo "$0 configure fail"
exit 1
fi
เราต้องแก้ให้เป็นแบบนี้
/usr/local/sbin/nas_configgen -c samba
if [ $? -ne 0 ]; then
echo "$0 configure fail"
exit 1
fi
/bin/sed -i '3i\\
min protocol = SMB2\\
max protocol = SMB2\\
' /etc/samba/smb.conf