October 2008

You are currently browsing the articles from KomKid.Net written in the month of October 2008.

PDF Reader & Creator

เริ่มจาก PDF Reader ตัวเล็ก จิ๋วแต่แจ๋ว เร็วได้ใจจริงครับ ที่สำคัญ Free ครับ
ขอแนะนำ FoxIt Reader
ของเค้ามีหลาย Version ครับ ทั้งสำหรับ Windows, Linux, Symbian ฯลฯ
ในส่วนของ Windows ก็ใช้ได้ทั้ง Windows Me/2000/XP/2003/Vista
นี่ข้อดีตามที่เค้าโฆษณาครับ
* Incredibly small: The download size of Foxit Reader is only 2.55 M which is a fraction of Acrobat Reader 20 M size.
* Breezing-fast: When you run Foxit Reader, it launches instantly without any delay. You are not forced to view an annoying splash window displaying company logo, author names, etc.
* Annotation tool: Have you ever wished to annotate (or comment on) a PDF document when you are reading it? Foxit Reader allows you to draw graphics, highlight text, type text and make notes on a PDF document and then print out or save the annotated document.
* Text converter: You may convert the whole PDF document into a simple text file.
* High security and privacy: Foxit Reader highly respects the security and privacy of users and will never connect to the Internet without users’ permission. While other PDF readers often silently connect to the Internet in the background. Foxit PDF Reader does not contain any spyware.

ส่วนนี่ก็ Feature ที่มีให้
* Bookmark Design
* Multi-tab Browsing
* Multimedia Player Support
* Callout and Text box Tool
* Commenting Text Tool
* Rulers and Guides
* Magnifier
* Automatic Scrolling
* OCG Support
* FDF Related
* Optimized Rendering
* Improved Link Tools
* Improved Snapshot
* Search Enhancement
* Better Annotation control
* Font Information
* Updated Command Line
* Streamlined UI

เท่าที่ลองใช้ดูแล้ว ก็ติดใจมากครับ เร็วได้ใจดีจริง ๆ

ต่อมาก็ PDF Creator ครับ Free เช่นกัน (ความจริงของ FoxIt ก็มีตัว Creator แต่ไม่ Free)
ชื่อตรงตามหน้าที่เลย PDF Creator
พอติดตั้งเสร็จก็จะมี Printer โผล่มาตัวนึงชื่อ PDFCreator
ที่นี้อยากเปลี่ยนไฟล์อะไรให้เป็น PDF ก็แค่สั่งพิมพ์แล้วเลือก Printer ตัวนี้ก็เรียบร้อย รองรับภาษาไทยซะด้วย

Feature ที่เค้าบอกไว้ก็มี ดังนี้
* Create PDF’s from just about any program that prints using Windows printers.
* Create documents in the following formats: Portable Document Format (PDF), Postscript (PS), Encapsulated Postscript (EPS), PNG, JPEG, BMP, PCX, and TIFF.
* Combine multiple documents into one PDF.
* Password protect and apply up to 128 bit encryption to your PDF documents.
* Automatically save PDF documents with current settings without being prompted for information

นอกจากนี้ในส่วนของ Security ก็มี เช่น
* Password required to open document
* Password required to change Permissions and Password
* Disallow User to Print, Modify, Copy text and image, Modify comments

อีกตัวที่แนะนำก็คือ PrimoPDF (ยี่ห้อนี้มีตัวที่ไม่ฟรีด้วย คือ Nitro PDF Professional)
คุณสมบัติเค้า ก็คือ
* รองรับภาษาไทย
* PDF files conform to the PDF 1.4, 1.5 specification.
* Create PDF files from 300+ file types.
* Make PDF documents for different uses, including online viewing, eBooks, office printing, and prepress (high-end printing).
* Combine PDF files after they are converted.
* Secure with passwords and add document information (title, author, etc.) during creation.

มีชุดนี้ไว้ ก็ไม่ต้องง้อ Adobe Acrobat กันแล้วครับ

Written by admin on October 29th, 2008 with 1 comment.
Read more articles on Software.

Time Server Synchronization

Setup Time Server ตาม พรบ. กันหน่อย

ข้อ ๙ เพื่อให้ข้อมูลจราจรมีความถูกต้องและนำมาใช้ประโยชน์ได้จริงผู้ให้บริการ ต้องตั้งนาฬิกาของอุปกรณ์บริการทุกชนิดให้ตรงกับเวลาอ้างอิงสากล (Stratum 0) โดยผิดพลาดไม่เกิน ๑๐ มิลลิวินาที

ตามที่ค้นหามา ทำให้รู้ว่า Stratum คือลำดับชั้นของการเทียบเวลา
- Stratum 0 เป็น เวลาสากล หรือ International Atomic Time : TAI (แปลกใจตัวย่อล่ะสิ ที่จริงก็คือ ตัวย่อมาจากภาษาฝรั่งเศส คือ Temps Atomique International ครับ) ดูแลโดย BIPM
- Stratum 1 เป็นเครื่องคอมพิวเตอร์แม่ข่ายที่เชื่อมต่อกับ stratum 0 ได้รับค่าเวลามาจาก stratum 0 โดยตรง
- Stratum อื่น ๆ ก็ถ่ายทอดเวลากันมาเรื่อย ๆ

ดังนั้นถ้าจะทำตาม พรบ. เราก็ต้องเทียบเวลากับ เครื่องคอมพิวเตอร์แม่ข่าย ที่อยู่ใน Stratum 1 (เพราะเราไม่สามารถรับเวลาโดยตรงจาก stratum 0 ได้) ซึ่งเลือกได้ตามรูป

ใน Windows มี Service อยู่แล้วชื่อ Windows Time service (W32Time) โดยใช้ Simple Network Time Protocol (SNTP) ตามข้อกำหนด RFC 1769

วิธีใช้งานผ่าน Command line ได้ดังนี้
1.ดูว่าตอนนี้ใช้บริการ Time Server ตัวไหนอยู่

net time /querysntp

ถ้ายังไม่เคย set มาก่อนเลย ก็จะได้ค่าเป็น time.windows.com,0×1

2.เลือกใช้ Time Server ตัวอย่าง เช่น เลือกใช้ของ สถาบันมาตรวิทยาแห่งชาติ ก็ใช้คำสั่ง

net time /setsntp:”time1.nimt.or.th,0×1 time2.nimt.or.th,0×1″

ตามคำบอกเล่าของ Microsoft ,0×1 ต้องมีต่อท้ายไว้กรณีที่เราระบุ Time Server โดยใช้ DNS name แต่ถ้าใช้ IP ก็ไม่ต้อง เช่น

net time /setsntp:”203.185.69.60 203.185.69.59″

3.ทำการ restart Windows Time service ด้วยคำสั่ง

net stop w32time

ตามด้วย

net start w32time

Microsoft เค้ามีรายละเอียดเพิ่มเติมให้ที่ Knowledge Base ครับ

แล้วนี่ก็ link สำหรับอธิบายที่มาของ AnnounceFlags = 5 ครับ

ที่นี้ถ้าเราใช้ DHCP ก็จะง่ายในการกำหนดให้กับ Client ทั้งหลาย
โดยเข้าไปที่ Server Options แล้วกำหนด Time Server (004) ลงไป

ที่นี้เวลา Client ติดต่อขอ IP มา ก็จะได้ค่าของ Time Server ไปด้วย

Written by admin on October 29th, 2008 with no comments.
Read more articles on Admin and Internet.

Install SSH on Ubuntu

ติดตั้ง SSH ไว้ใช้ดีกว่า เผื่อต้อง remote จากเครื่องอื่นมาใช้งาน Ubuntu ของเรา
1.เลือกใช้ SSH ตัวที่เป็นที่นิยมก็คงเป็น OpenSSH
2.ติดตั้ง ด้วยคำสั่ง

sudo apt-get install ssh openssh-server

3.ตั้งค่า port ที่จะใช้สำหรับการเชื่อมต่อ ซึ่งค่าปกติจะเป็น 22
เวลาพวก hacker จะเจาะเข้ามา ก็สุ่ม port นี้ก่อนเลยแหล่ะ งั้นก็เปลี่ยนซะเลยโดยแก้ใน file /etc/ssh/sshd_config
4.restart ssh ด้วยคำสั่ง

sudo invoke-rc.d ssh restart

Written by admin on October 27th, 2008 with 1 comment.
Read more articles on Ubuntu.

Authenticate Ubuntu Logins with Active Directory

Login เข้าใช้ Ubuntu ด้วย User จาก Active Directory
1.อันดับแรกก็ต้องติดตั้งโปรแกรมเพื่อการนี้ก่อน ได้แก่ likewise-open จาก www.likewisesoftware.com

sudo apt-get install likewise-open

2.ต่อไปก็ join Ubuntu เข้ากับ Active Directory ด้วยคำสั่ง

sudo domainjoin-cli join [ชื่อ domain แบบ FQDN] [ชื่อ User ที่มีสิทธิ]

ในที่นี้ User ที่มีสิทธิ ก็คือ Administrator นั่นเอง
ดังนั้น ถ้า domain ชื่อ sci.com ก็ต้องใช้คำสั่งแบบนี้

sudo domainjoin-cli join sci.com Administrator

จากนั้นโปรแกรมจะถาม password ของ Administrator ก็ป้อนไป รอสักครู่ ถ้าไม่มีปัญหาก็จะขึ้นคำว่า SUCCESS

3.จากนั้นก็ทำการสั่งให้โปรแกรมทำงานทุกครั้งที่ boot ด้วยคำสั่ง

sudo update-rc.d likewise-open defaults

4.และสุดท้ายด้วยการ สั่งให้โปรแกรมทำงาน

sudo /etc/init.d/likewise-open start

ที่นี้ก็มาทดสอบกันได้เลยด้วยเจ้า PuTTY

เรียบร้อยครับพี่น้อง สำเร็จ!

Tip1 : ถ้าขี้เกียจ พิมพ์ domain ตามตัวอย่างก็คือ SCI\ ให้แก้ไขไฟล์ /etc/samba/lwiauthd.conf โดยเพิ่มเติมเข้าไปดังนี้

winbind use default domain = yes

Tip2 : ถ้าอยากให้แสดง netbios domain name ให้แก้ไขไฟล์ /etc/nsswitch.conf โดยเพิ่มเติมเข้าไปดังนี้


passwd: compat winbind lwidentity
group: compat winbind lwidentity
shadow: compat winbind
hosts: files dns winbind

Written by admin on October 26th, 2008 with no comments.
Read more articles on Networking and Ubuntu.

VirtualBox on Ubuntu

จากเจ้าไปแต่ใจยังอาวรณ์
ลง Ubuntu เสร็จก็มิวายคิดถึง Windows XP เลยต้องหาทางเอามาใช้ ที่พึ่งก็คือ VirtualBox นี่เอง

1.อันดับแรกก็เข้าไปที่ Aoolications > Add/Remove…
VirtualBox จะอยู่ในส่วนของ System ดังรูป

2.พอติดตั้งเสร็จก็จะมีโปรแกรม VirtualBox OSE อยู่ใน Applications > System Tools เวลาเรียกใช้ก็จะมีหน้าตา ดังรูป

3.ที่นี้ก็กด New เพื่อสร้าง Virtual Machine ของเรา สำหรับติดตั้ง Windows XP
ตั้งชื่อให้มัน แล้วก็เลือกชนิดเป็น Windows XP ดังรูป

4.จากนั้นก็เลือกขนาดของ Memory ที่จะให้ใช้ เลือก 192 MB ตามที่โปรแกรมแนะนำมาก็ได้ แล้วก็ต่อด้วยการกำหนดขนาดของ Hard disk ซึ่งเลือกตามที่โปรแกรมแนะนำก็จะเป็น 10 GB

5.ทำต่อจนเสร็จก็จะได้หน้าตา ดังรูป

ที่นี้เราจะติดตั้งก็ต้องมีแผ่นติดตั้ง Windows XP ให้คลิกตรง CD/DVD-ROM เพื่อเลือกว่าจะใช้จาก Drive จริง หรือ ISO Image file

6.แต่พอเราจะเริ่มใช้งาน โดยคลิกที่ Start จะพบว่าใช้งานไม่ได้ โดยจะฟ้องว่า

VirtualBox kernel driver not installed. The vboxdrv kernel module was either not loaded or /dev/vboxdrv was not created for some reason. Please install the virtualbox-ose-modules package for your kernel, e.g. virtualbox-ose-modules-generic..
VBox status code: -1908 (VERR_VM_DRIVER_NOT_INSTALLED).

เป็นเพราะเรายังไม่ได้ลง driver นี่เอง ซึ่งต้องลงให้ตรงกับ kernel ของเราด้วย
วิธีการก็คือ เปิด terminal แล้วพิมพ์คำสั่ง uname -r จะได้รุ่นของ kernel ดังรูป

7.พอรู้รุ่นของ kernel แล้วก็ทำการ download และติดตั้ง ด้วยคำสั่ง

sudo apt-get install virtualbox-ose-modules-2.6.24-21-generic

แล้วก็รอจนติดตั้งเสร็จ
จากนั้นก็สั่งให้ driver ทำงาน ด้วยคำสั่ง

sudo /etc/init.d/vboxdrv start

คราวนี้พอกลับไป Start ก็จะเจอ Error อันใหม่ คือ

The VirtualBox kernel driver is not accessible to the current user. Make sure that the user has write permissions for /dev/vboxdrv by adding them to the vboxusers groups. You will need to logout for the change to take effect..
VBox status code: -1909 (VERR_VM_DRIVER_NOT_ACCESSIBLE).

ให้เข้าไปที่ System > Administration > Users and Groups
คลิก Manage Groups แล้วเลือก vboxusers คลิก Properties

จากนั้นก็ทำเครื่องหมายที่ user ของเราเพื่อให้อยู่ใน group นี้
พอทำเสร็จก็ให้ logout แล้วกลับเข้ามาใหม่ เท่านี้ก็เป็นอันเรียบร้อยโรงเรียน Ububtu

Written by admin on October 23rd, 2008 with no comments.
Read more articles on Software and Ubuntu.

« Older articles

No newer articles