Wednesday, February 26, 2014

TXT_DB error number 2

TXT_DB error number 2 when generating openvpn client certificates

You may have followed the openvpn quick start instructions either from the online tutorial or using the README file in easy-rsa where it asks you to go through these steps:

[edit vars with your site-specific info]
source ./vars
./clean-all
./build-dh
./pkitool --initca
./pkitool --server myserver
./pkitool client1
 and then you get
failed to update database TXT_DB error number 2
at the last step. I did and a web search mostly turned up suggestions to run ./clean-all again. But this article was the key. It's about openssl, but openvpn's easy-rsa is just a front-end to openssl. The important observation is that every certificate must have a unique CN in the database. In the file vars, this is controlled by KEY_CN. You left the settings read in from vars unchanged between generating the server cert and the client cert. You could edit vars before generating the client certificate and re-source vars, or you could do this before generating each client key.
KEY_CN=someuniqueclientcn ./pkitool client1
and you will stop getting that TXT_DB error.


I'm a bit surprised that the documentation for openvpn hasn't been updated to make this clear.


NB: It is also affected by the setting unique_subject = yes in the file keys/index.txt.attr, but I prefer not to go against the default setting.


http://blog.kenyap.com.au/2012/07/txtdb-error-number-2-when-generating.html

Tuesday, February 25, 2014

how to install canon mp287 scanner driver in debian linux

  • install MP280series_scanner_driver.tar.gz from canon's official website
  • sane-find-scanner
  • /lib/udev/rules.d/60-libsane.ruled
    add
    ATTRS{idVendor}=="04a9", ATTRS{idProduct}=="1746", ENV{libsane_matched}="yes"
  • run scangearmp

ไว้อาลัย TOT 3G

รู้สึกเสียใจมาก TOT 3G จะปิดตัวแล้ว ใช้มานาน 2 ปีกว่า ชื่นชอบมาก เน็ต 2Mbps เต็มตลอด ไม่จำกัดปริมาณ เพียงเดือนละไม่เกินหนึ่งพันบาท เชื่อว่าที่คุณภาพดีเป็นเพราะคนรู้จักน้อย คนใช้น้อย ทำให้ไม่มีคนมาแย่งผมใช้ (ทฤษฎีดังจะกล่าวต่อไป) แต่ด้วยเหตุเดียวกันนี้กลายเป็นทำให้ผมต้องสูญเสียมันไป ... แต่ถ้ามันดัง ก็น่าจะกลายพันธฺุ์เป็นเน็ต 3G ด้อยคุณภาพเหมือนเจ้าอื่นๆเช่นกัน *เพราะ* (ทฤษฎีที่ผมตั้งเอง) บริษัท A ลงทุน X บาท สร้างระบบเพื่อรองรับผู้ใช้งาน N คน ต่อมามีผู้ใช้งานมากขึ้นเป็น 2*N แต่ A จะไม่เพิ่มทุนเพื่อสร้างระบบ กล่าวคือ ระบบที่ถูกออกแบบมาให้รองรับผู้ใช้เพียง N แต่กลับถูกเอามาใช้กับผู้ใช้มากถึง 2*N ผลของทฤษฎีนี้คือ หากอยากได้เน็ตดีๆใช้งาน ต้องหมั่นหา ISP ที่มีลูกค้าน้อยๆ หรือ ระบบเน็ตแบบใหม่ที่ผู้ใช้ยังไม่เปลี่ยนมาเยอะ แล้วลองใช้ ถ้าดีก็ให้ใช้ไปจนกว่าจะเจ๊งแบบทีโอที หรือ ถ้าไม่เจ๊งแต่มีผู้ใช้เพิ่มขึ้นเน็ตก็จะห่วยลง ก็ถึงเวลาต้องหาเจ้าใหม่ที่ผู้ใช้น้อยๆอีกครา เป็นวัฏจักร แต่ถ้าจะมีบริษัท B ที่เพิ่มระบบรองรับผู้ใช้ที่เพิ่มขึ้นได้... เราก็คงไม่ต้องคอยเปลี่ยนเจ้า หรือ เปลี่ยนเทคโนโลยีอะไรกันบ่อยๆแบบนี้

http://www.blognone.com/node/53742

Thursday, February 13, 2014

Thursday, January 2, 2014

all of a sudden my kindle cannot connect to wifi anymore

Don't be panic.  Please make sure your wifi channel is not set to auto and is set to anything not higher than 11.

Sunday, December 29, 2013

Saturday, December 28, 2013

raspbmc (raspberry pi + xbmc) and remote controller

I had problem with raspbmc.  My remote controller of Samsung TV Series 5 didn't work.  The TV is connected with raspbmc with HDMI cable.  I found out later that it is because of my outdated version of HDMI cable (HDMI cable has versions!!!).  Replaced it with the new one with newer version, then I can use remote controller with raspbmc!

Thursday, December 26, 2013

apache mod qos

Want to control limit of request per each url and etc with apache?  Try mod_qos.

http://opensource.adnovum.ch/mod_qos/

You can install it from debian's repository too.

Wednesday, December 25, 2013

How to reset password of user in TWiki

Simply go to /twiki/data/.htpasswd and replace the password field with the result from "htpasswd -d" ( Force CRYPT encryption of the password).  htpasswd is an Apache's tool.

Monday, December 16, 2013

kindle fails to look up dictionary

The problem is that I can't look up words from English dictionary with this specific book.  I manage to find out that this book's meta data has error.  It is set to be Spanish while, in fact, it has to be English.

Here is an easy fix.
  1. Download the book from amazon.com as .azw format to your computer.
  2. Open Calibre (http://calibre-ebook.com/).  Add this book to Calibre.
  3. Use Calibre to "edit metadata" of this book.  Change it from Spanish into English.
  4. Export this book (save to disk).
  5. Send the new azw file to you Kindle as a personal document (probably via Kindle's email).
YES