Sat 14 Jun 2008
Endian auto login allows reboot and reset to factory-default
Posted by เอเองครับ under รักษาความปลอดภัย , ลีนุกซ์ โอเพนซอร์ส
ช่วงนี้ไม่ค่อยได้เขียนบทความเกี่ยวกับคอมพิวเตอร์เอาซะเลย วันนี้เลยขอปัดฝุ่นคำถามเก่าๆจากน้องคนหนึ่งที่ถามเข้ามาผ่านทาง msn จริงๆผมอยากให้ทิ้งคำถามไว้ในบล็อคนี้เลย ยังไงเสียคำถามของท่านอาจจะเป็นคำตอบของอีกหลายคนก็ได้ จะได้แบ่งๆกัน
ว่าด้วย Endian firewall กับระบบ auto login ที่เมื่อบูทระบบขึ้นมาแล้วผ่านทางหน้าจอเราจะเห็นเมนูประมาณด้านล่างนี้
0 shell 1 reset to factory default 2 reboot
เมื่อเลือกเมนู 0 ระบบมีการถาม user และ password แต่กับเมนู 1 และ 2 กลับไม่ถาม ก็ลองคิดดูว่าไฟล์วอลล์ที่ใช้ในการรักษาความปลอดภัย แต่กลับถูก reset to factory default ง่ายๆ ไม่ว่าจะผ่านคีย์บอร์ด หรือผ่าน rs232 console หรือแค่เอามือเผลอไปเฉี่ยวๆคีย์บอร์ดก็อาจจะเดี้ยงแล้ว
ผมได้แนะนำการแก้ปัญหาไปดังนี้คือ ให้ดูที่ไฟล์ /etc/inittab โดยจะมีข้อมูลอยู่ดังนี้
# # $Id: inittab,v 1.6 2003/12/24 19:51:23 riddles Exp $ # id:3:initdefault: l0:0:wait:/etc/rc.d/rc.halt halt l6:6:wait:/etc/rc.d/rc.halt reboot si::sysinit:/etc/rc.d/rc.sysinit # Trap CTRL-ALT-DELETE ca::ctrlaltdel:/sbin/shutdown -r now # Run gettys in standard runlevels 1:2345:respawn: /sbin/mingetty --autologin root --loginprog /usr/sbin/efw-console tty1 2:2345:respawn: /sbin/mingetty --autologin root --loginprog /usr/sbin/efw-console tty2 3:2345:respawn: /sbin/mingetty --autologin root --loginprog /usr/sbin/efw-console tty3 4:2345:respawn: /sbin/mingetty --autologin root --loginprog /usr/sbin/efw-console tty4 5:2345:respawn: /sbin/mingetty --autologin root --loginprog /usr/sbin/efw-console tty5 6:2345:respawn: /sbin/mingetty --autologin root --loginprog /usr/sbin/efw-console tty6 # s0:2345:respawn: /sbin/agetty -n -l /usr/sbin/efw-console -L 38400 ttyS0 vt100
จะเห็นว่ามันทำ autologin โดยผู้ใช้ root เลย แล้วก็รันสคริป /usr/sbin/efw-console เลย แก้ใหม่เป็นดังนี้
# # $Id: inittab,v 1.6 2003/12/24 19:51:23 riddles Exp $ # id:3:initdefault: l0:0:wait:/etc/rc.d/rc.halt halt l6:6:wait:/etc/rc.d/rc.halt reboot si::sysinit:/etc/rc.d/rc.sysinit # Trap CTRL-ALT-DELETE ca::ctrlaltdel:/sbin/shutdown -r now # Run gettys in standard runlevels 1:2345:respawn: /sbin/mingetty tty1 2:2345:respawn: /sbin/mingetty tty2 3:2345:respawn: /sbin/mingetty tty3 4:2345:respawn: /sbin/mingetty tty4 5:2345:respawn: /sbin/mingetty tty5 6:2345:respawn: /sbin/mingetty --autologin root --loginprog /usr/sbin/efw-console tty6 # s0:2345:respawn: /sbin/agetty -n -l /usr/sbin/efw-console -L 38400 ttyS0 vt100
จากนั้นลอง boot ใหม่ หรือรัน init q ก็จะสามารถใช้งานแก้ปัญหา autologin ได้แล้ว ผมทิ้งเทอมินอลที่ 6 ไว้เผื่อจำเป็นอยากจะ reset to factory default แบบตั้งใจด้วย หรือถ้าอยากให้แจ่มจริงๆก็ทำทั้งหมดเลยได้ครับ
ปล. เรื่องนี้ที่ http://bugs.endian.it/ ก็มีคุยกันด้วยแฮะ..
ปล2. ตอนนี้กำลังลอง Endian Firewall Community release 2.2.beta4 บั๊กบานเลย อ้อแล้วก็กำลังโหลด Endian Firewall Community 2.2 RC1 อยู่
June 14th, 2008 at 7:02 pm
Endian Firewall Community release 2.2.beta4 บั๊กอุ่นหนาฝาคลั่งทีเดียว ใช้อยู่ข้ามคืนตื่นเช้าต้องรีบอัพเป็น Endian Firewall Community 2.2 RC1 ทันที - -” เวอร์ชั่นนี้ค่อยดีหน่อย หาบั๊กยากขึ้น ถ้าเป็นตัวเต็มคงจะเนียนเชียว
June 18th, 2008 at 8:57 pm
ฝากคำถามด้วยครับ
ปัญหา Endian Firewall : Authentication cache TTL
จากการที่ได้ติดตั้ง Endian Firewall (ทั้ง version 2.1 และ 2.2 rc1) ได้กำหนดการใช้งาน Proxy และ Authentication แบบ local ทุกอย่างทำงานได้ถูกต้องหมด มีการถามชื่อและรหัสผ่าน เมื่อทำการเรียกเวปทุกครั้งแต่ติดปัญหาตรง Authentication cache TTL (in minutes): ซึ่งกำหนดเวลาไว้ 20 นาที เมื่อไม่มีการกระทำใดใน web นั้นๆที่เปิดค้างไว้ ควรจะ Expire เมื่อล่วงเลยเวลาที่กำหนดและถ้ามีการเรียกใช้งานไปยังที่อื่นจากหน้าเดิม (session เดิม) ควรจะ popup ถาม login name และ password ก่อนที่จะทำงานต่อไป แต่ปรากฏว่าไม่มีการถามใดๆ สามารถไปยังหน้าเวปใหม่ได้(session เดิม) ได้ตลอดเหมือน Authentication cache TTL ไม่ทำงาน
ไม่ทราบว่าต้อง config เพิ่มเติมตรงไหน หรือแก้ไขปัญหานี้ได้อย่างไร?
ได้ทำการ reboot Endian Firewall แล้วภายหลังที่ได้กำหนดค่าต่างๆ ปัญหายังคงเดิม
ขอบคุณสำหรับคำตอบครับ
June 18th, 2008 at 10:28 pm
ถ้าเวลาหมดใน session เดิมเมื่อมีการร้องขอจาก session เดิมอีก เวลาของ TTL จะถูก reset
แต่ถ้าเวลาหมด แล้วเราเปิด session ใหม่มันถึงจะpopup ขึ้นมาให้กรอก user , password อีกทีครับ
June 19th, 2008 at 7:46 am
++ ขอบคุณ คุณเอ เป็นอย่างสูงครับ ++
แต่ผมว่าตาม manual เมื่อหมดเวลาแล้วต้องให้ กรอกชื่อกับรหัสผ่านใหม่นะครับแม้ว่าจะเป็นsessionเดิม แต่ถ้ายังไม่หมดเวลา จะต่อเวลาให้ไปเรื่อยๆ ผมนำส่วนที่เกี่ยวข้องจากคู่มือมาให้คุณ เอ ดูด้วยครับ หรือว่าผมเข้าใจผิด แต่ตรง Note ข้างล่างก็คู่มือก็เขียนไว้ชัดเจนในเรื่องเปิด session ใหม่แม้จะยังไม่หมดเวลาก็ต้อง ป้อนชื่อและรหัสผ่านใหม่ (ต้อง authentication ใหม่)
Authentication cache TTL
Duration in minutes how long credentials will be cached for each single session. If this time expires, the user has to re-enter the credentials for this session. The default is set to 60 minutes, the minimum will be 1 minute. The TTL will always be reset when the user sends a new request to the Proxy Server within a session.
Note
If the user opens a new session, the credentials must always be entered, even if the TTL has not expired for another session.
นำมาจาก
http://www.endian.com/fileadmin/documentation/efw-admin-guide/en/efw.proxy.http.html#efw.proxy.http.squid
July 1st, 2008 at 9:28 pm
ผมได้คำตอบจากทาง Endian ดังนี้ครับ
It will not re-authenticate if the password did not change
the browser authenticates every time a request is sent to the proxy.
the browser asks the user only once for a password. that will be cached
and used for every request.
on the proxy side, the information that the user has been authenticated
successfully will be cached for this TTL time.
After expiration, you will not notice that there is a re-authentication
in progress, since that is only communitcation between the proxy and the
active directory (or ldap..).
If the password changed, and thus authentication fails then, because the
browser stored an old password, the browser will re-ask the user for
authentication.
ยังไงก็ให้คนใช้ปิด browser ทุกครั้งที่ใช้เสร็จก็น่าจะดีกว่าครับ
หนุ่ม
July 1st, 2008 at 9:43 pm
สวัสดีครับคุณหนุ่ม
ผมว่าจะลองดูอีกที แต่ตอนนี้เครื่องเทสผมไม่มีเลย จะแอบลองเครื่องที่ใช้งานอยู่ก็กลัวมีคนเดือดร้อนเลยยังไม่ได้ลองอะไรเลย ต้องขอโทษด้วยครับที่เงียบไป
ปิด browser ก็เป็นทางออกที่ดีครับ