Anan Phonphoem

      Computer Engineering Dept., Faculty of Engineering, Kasetsart University

RSS icon Email icon Home icon
  • ปัญหา ไม่สามารถแสดงผลจอภายนอกแต่เพียงจอเดียวพร้อมกับปิดจอของ notebook

    Posted on January 6th, 2012 anan No comments

    อาการ  notebook ทำได้เพียง clone/extend จอภาพภาพนอก (monitor , VGA projector)  และจอ notebook ได้เท่านั้น ไม่สามารถสั่งปิดจอ notebook และเปิดเฉพาะจอภายนอก

    การแก้ปัญหา

    * เข้าไปที่ /home/anan/.config แล้วทำการลบ file ที่มีชื่อว่า monitors.xml ทิ้ง

    * reboot เครื่องใหม่ จากนั้นก็ทำการ ตั้งค่าจอปกติจาก System setting –> Display แล้วเลือกการตั้งค่าที่ต้องการ

    * ระบบจะทำการสร้าง file ที่มีชื่อว่า monitors.xml ให้ใหม่ (แต่จะมีเฉพาะข้อมูลของจอที่ใช้อยู่เท่านั้น ถ้าไปทำการใช้งานจอภาพนอกอันอื่น monitors.xml ก็จะถูก update)

    ตัวอย่าง file ที่ชื่อ monitors.xml

    <monitors version="1">
         <configuration>
            <clone>no</clone>
            <output name="LVDS1">
              <vendor>LCD</vendor>
              <product>0x58eb</product>
              <serial>0x01010101</serial>
            </output>
            <output name="VGA1">
              <vendor>SAM</vendor>
              <product>0x049a</product>
              <serial>0x434d3232</serial>
              <width>1920</width>
              <height>1080</height>
              <rate>60</rate>
              <x>0</x>
              <y>0</y>
              <rotation>normal</rotation>
              <reflect_x>no</reflect_x>
              <reflect_y>no</reflect_y>
              <primary>yes</primary>
            </output>
            <output name="DVI1">
            </output>
            <output name="TV1">
            </output>
         </configuration>
    </monitors>
  • การสร้าง password สำหรับ protect การเข้าถึง directory หรือหน้า Web

    Posted on April 28th, 2011 anan No comments

    สามารถทำได้โดยการใช้ .htaccess

    เช่นต้องการสร้างให้ user ชื่อ myGuest สามารถ เข้าใช้งาน directory ชื่อ /public-html/pweb
    โดยใช้ password ว่า “helloworld”

    วิธีการดังนี้

    1. สร้าง password file (.htpasswd)

    Anan@Moose$ htpasswd -c .htpasswd myGuest
    New password: <— ใส่ password ที่ต้องการ ในที่นี้คือ helloworld
    Re-type new password: <— ใส่ helloworld อีกครั้ง
    Adding password for user myGuest

    ถ้าทดลองดู file .htpasswd จะพบ

    Anan@Moose$ cat .htpasswd
    myGuest:.AaK93J3nybioP <— ตัวอย่าง

    2. สร้าง .htaccess file

    Anan@Moose$ cd public-html/pweb <— ย้ายไป directory ที่ต้องการ protect
    Anan@Moose:~/public-html/pweb$ vi .htaccess

    uthType Basic
    AuthName “restricted area”
    AuthUserFile /home/Anan/passwd
    require valid-user
    ServerSignature Off

    2. ทดสอบดู โดยการพยายามเข้าที่หน้านั้น จะพบว่าให้ใส่ username และ password
    ก็ให้ใส่ myGuest และ helloworld ก็จะมองเห็น file ใน directory ที่ต้องการ protect
    แต่ถ้าใส่ผิด จะถาม username และ password โดยไม่ยอมให้เข้าครับ

  • ประกาศงานประชุมวิชาการ ICSEC 2011

    Posted on April 24th, 2011 anan No comments

    ขอเชิญร่วมส่งบทความวิจัยเพื่อตีพิมพ์ในงาน ICSEC 2011 ซึ่งเปลี่ยนชื่อจากเดิมคือ NCSEC มาเป็น International Conference โดยยังคงมี Thai Track (ส่งบทความภาษาไทย)

    http://icsec2011.org หรือที่ http://icsec2011.cpe.ku.ac.th/

    Download call for paper: ICSEC2011

    Full paper submission:June 1, 2011
    Notification of acceptance:July 20, 2011
    Camera-ready submission:Aug 5, 2011
    End of early-registration:Aug 15, 2011
    Tutorial date:Sep 7, 2011
    Conference dates:Sep 8-9, 2011

  • Wiping Hard Disk (No Recovery)

    Posted on March 4th, 2011 anan No comments

    พอดีมี hard disk เก่า หลังจากนำข้อมูลเก็บขึ้นมาหมดแล้ว ต้องการนำ เครื่องคอม + hard disk ตัวเก่านี้ไปบริจาค แต่ก็กลัวข้อมูลสำคัญที่อยู่ใน Harddisk จะหลุดไปจึงต้องทำการ wipe out ข้อมูลทั้งหมด (ซึ่ง format อย่างเดียว สามารถใช้โปรกแกรมกู้คืนได้) ต้องทำการเขียนบางอย่างทับลงไปซักหลาย ๆ  รอบ เพื่อให้ไม่สามารถทำการกู้คืนได้

    สามารถทำได้โดย

    root@anan# shred -n2 -v /dev/sdb

    ในที่นี้กำหนดให้ทำการเขียนทับ 2 รอบ (-n2)

    ผลการทำงานดังข้างล่างนี้

    shred: /dev/sdb: pass 1/2 (random)…
    shred: /dev/sdb: pass 1/2 (random)…139MiB/19GiB 0%     <——– เริ่มทำรอบแรก
    shred: /dev/sdb: pass 1/2 (random)…250MiB/19GiB 1%
    shred: /dev/sdb: pass 1/2 (random)…358MiB/19GiB 1%
    shred: /dev/sdb: pass 1/2 (random)…471MiB/19GiB 2%
    shred: /dev/sdb: pass 1/2 (random)…579MiB/19GiB 3%
    shred: /dev/sdb: pass 1/2 (random)…690MiB/19GiB 3%
    shred: /dev/sdb: pass 1/2 (random)…804MiB/19GiB 4%

    shred: /dev/sdb: pass 1/2 (random)…18GiB/19GiB 96%
    shred: /dev/sdb: pass 1/2 (random)…19GiB/19GiB 100%
    shred: /dev/sdb: pass 2/2 (random)…
    shred: /dev/sdb: pass 2/2 (random)…157MiB/19GiB 0%     <——– เริ่มทำรอบที่สองครับ
    shred: /dev/sdb: pass 2/2 (random)…266MiB/19GiB 1%
    shred: /dev/sdb: pass 2/2 (random)…374MiB/19GiB 1%
    shred: /dev/sdb: pass 2/2 (random)…486MiB/19GiB 2%
    shred: /dev/sdb: pass 2/2 (random)…593MiB/19GiB 3%
    shred: /dev/sdb: pass 2/2 (random)…698MiB/19GiB 3%
    shred: /dev/sdb: pass 2/2 (random)…807MiB/19GiB 4%

    shred: /dev/sdb: pass 2/2 (random)…17GiB/19GiB 91%
    shred: /dev/sdb: pass 2/2 (random)…18GiB/19GiB 96%
    shred: /dev/sdb: pass 2/2 (random)…19GiB/19GiB 100%

    พอดี harddisk นี้ลูกเล็ก (20 GB) ทำสองรอบใช้เวลาไปประมาณ 20 นาที ถ้าลูกใหญ่กว่านี้ก็คงนามพอสมควร