Mini Howto Subject:การทำ Welcome Messages สำหรับ linux By: Dome Potikanond and Pruet Boonma Date: Apr 4, 1998 Update from: Apr 3, 1998 License: สงวนลิขสิทธิ์เอกสารนี้ โดย โดม โพธิกานนท์ และ พฤษภ์ บุญมา การเผยแพร่เอกสารนี้จะต้องอยู่ภายไต้ เงื่อนไขของ GNU General Public License เวอร์ชั่น 2.0 ที่ออกโดย Free Sofware Foundation กรุฒาอ่านรายละเอียดของ GPL ที่ Introduction: ในระบบ Unix เมื่อผู้ใช้เข้าใช้ระบบจะมีข้อความต้อนรับ ซึ่งจะใช้ในการแจ้งข่าวโดยทั่วไปให้แก่ผู้ใช้ทราบ รวมถึงการแจ้งชนิดของเครื่อง รวมถึงรุ่นของ OS ด้วย ใน Linux จะมี file ที่ทำหน้าที่เป็น welcome message อยู่ 2 file คือ /etc/issue และ /etc/motd ( motd = message of this day) ซึ่งทั้งสอง file จะเป็น test file เหมือนกัน แต่จะแตกต่างกันตรงที่ file /etc/issue จะแสดงข้อความตอนที่ผู้ใช้ขอเข้าใข้บริการ (ก่อนขึ้น prompt login) ส่วน /etc/motd จะแสดงหลังจากที่ผู้ใช้เข้าใช้บริการได้แล้ว การแก้ไข /etc/issue และ /etc/motd: สามารถใช้ text editor ทั่วไปแก้ไขได้ทันที และข้อความก็จะปรากฏ ดังตัวอย่าง # telnet 202.44.145.20 Trying 202.44.145.20... Connected to 202.44.145.20. Escape character is '^]'. <---- issue เริ่มที่บรรทัดนี้ Linux 2.0.30 (ds90.intanon.nectec.or.th) (ttyp1) <---- issue สิ้นสุดที่บรรทัดนี้ ds90 login: pruet Password: Welcome to Northern ThaiSarn Internet Consortium Network. <--- motd เริ่มที่บรรทัดนี้ Info : - Dial-in number for NTIC user is - 810617-8, 810652-3, 275726 , 275764 - If you have any problem please mail to root@ds90.intanon.nectec.or.th Tips : - use command "news" to see News and Information from Sys-Admin - For speed-up your web surfing ,please set you web browser to use our proxy server with IP address 202.44.145.100 and port 8080 <--- motd สิ้นสุดที่บรรทัดนี้ Last login: Sat Apr 4 21:47:18 on ttyp1 from lulu.mptc.eng.cm. No mail. ds90:~$ นอกจากนั้น ใน file /etc/motd ยังสามารถใส่ escape character เพื่อให้มีสีสันสวยงามได้ด้วย ตัวอย่าง file /etc/motd ที่ใช้ escape character