2015年1月23日 星期五

save password in Subversion


Enable the following options in ~/.subversion/config and /etc/.subversion/config:

store-passwords = yes
store-auth-creds = yes
And ~/.subversion/server and /etc/.subversion/config:
store-passwords = yes
store-ssl-client-cert-pp = yes
store-plaintext-passwords = yes
store-ssl-client-cert-pp-plaintext = yes

For unknown reason, my ~/.subversion became (I don't remember I have ran svn with sudo...):
drwx------  6 root root 4.0K  1月 20 21:18 auth
-rw-r--r--  1 root root 7.7K  1月 23 21:38 config
-rw-r--r--  1 root root 4.2K  1月 20 21:18 README.txt
-rw-r--r--  1 root root 8.2K  1月 23 21:39 servers
This prevent svn from storing/reading the password to/from the directory auth. After the following fixed my problem.
chown test:test ~/.subversion -R; chmod +r ~/.subversion/auth -R
It's just too stupid that I don't want to waste my time again.....


svn - How to save password when using Subversion from the console - Stack Overflow
http://stackoverflow.com/questions/2899209/how-to-save-password-when-using-subversion-from-the-console

SVN not storing password
http://www.wandisco.com/svnforum/threads/62783-SVN-not-storing-password

2015年1月20日 星期二

Huawei E3276 (Мегафон М150-1) on Ubuntu 14.04

Question #211095 : Questions : gnome-nettool package : Ubuntu
https://answers.launchpad.net/ubuntu/+source/gnome-nettool/+question/211095

Insert the dongle,

[  136.590998] usb 2-1: new high-speed USB device number 4 using xhci_hcd
[  136.608068] usb 2-1: New USB device found, idVendor=12d1, idProduct=14fe
[  136.608078] usb 2-1: New USB device strings: Mfr=2, Product=1, SerialNumber=0
[  136.608083] usb 2-1: Product: HUAWEI Mobile
[  136.608087] usb 2-1: Manufacturer: HUAWEI Technology
[  136.727118] usb-storage 2-1:1.0: USB Mass Storage device detected
[  136.727169] scsi4 : usb-storage 2-1:1.0
[  136.727244] usb-storage 2-1:1.1: USB Mass Storage device detected
[  136.727289] scsi5 : usb-storage 2-1:1.1
[  136.727349] usbcore: registered new interface driver usb-storage
[  137.726594] scsi 4:0:0:0: CD-ROM            HUAWEI   Mass Storage     2.31 PQ: 0 ANSI: 2
[  137.726600] scsi 5:0:0:0: Direct-Access     HUAWEI   TF CARD Storage  2.31 PQ: 0 ANSI: 2
[  137.727334] sd 5:0:0:0: Attached scsi generic sg1 type 0
[  137.728198] sd 5:0:0:0: [sdb] Attached SCSI removable disk
[  137.734924] sr0: scsi-1 drive
[  137.734930] cdrom: Uniform CD-ROM driver Revision: 3.20
[  137.735114] sr 4:0:0:0: Attached scsi CD-ROM sr0
[  137.735200] sr 4:0:0:0: Attached scsi generic sg2 type 5
[  137.833273] Buffer I/O error on device sr0, logical block 9
[  137.833280] Buffer I/O error on device sr0, logical block 9
[  137.833301] Buffer I/O error on device sr0, logical block 0
[  137.833304] Buffer I/O error on device sr0, logical block 0
[  137.833309] Buffer I/O error on device sr0, logical block 2
[  137.833311] Buffer I/O error on device sr0, logical block 2
[  137.833315] Buffer I/O error on device sr0, logical block 0
[  137.833318] Buffer I/O error on device sr0, logical block 0
[  137.833323] Buffer I/O error on device sr0, logical block 0
[  137.833326] Buffer I/O error on device sr0, logical block 1
[  137.835010] systemd-udevd[2260]: Failed to apply ACL on /dev/sr0: No such file or directory
[  137.835022] systemd-udevd[2260]: Failed to apply ACL on /dev/sr0: No such file or directory
[  137.853699] usb 2-1: USB disconnect, device number 4
[  143.088133] usb 2-1: new high-speed USB device number 5 using xhci_hcd
[  143.104880] usb 2-1: New USB device found, idVendor=12d1, idProduct=1506
[  143.104890] usb 2-1: New USB device strings: Mfr=2, Product=1, SerialNumber=0
[  143.104895] usb 2-1: Product: HUAWEI Mobile
[  143.104899] usb 2-1: Manufacturer: HUAWEI Technology
[  143.109191] usb-storage 2-1:1.2: USB Mass Storage device detected
[  143.109412] scsi6 : usb-storage 2-1:1.2
[  143.109604] usb-storage 2-1:1.3: USB Mass Storage device detected
[  143.109742] scsi7 : usb-storage 2-1:1.3
[  143.121976] usbcore: registered new interface driver usbserial
[  143.122001] usbcore: registered new interface driver usbserial_generic
[  143.122018] usbserial: USB Serial support registered for generic
[  143.169158] usbcore: registered new interface driver option
[  143.169173] usbserial: USB Serial support registered for GSM modem (1-port)
[  143.169226] option 2-1:1.0: GSM modem (1-port) converter detected
[  143.169324] usb 2-1: GSM modem (1-port) converter now attached to ttyUSB0
[  143.230122] usbcore: registered new interface driver cdc_ncm
[  143.246865] usbcore: registered new interface driver cdc_wdm
[  143.249678] huawei_cdc_ncm 2-1:1.1: MAC-Address: 0c:5b:8f:27:9a:64
[  143.249744] huawei_cdc_ncm 2-1:1.1: cdc-wdm0: USB WDM device
[  143.250045] huawei_cdc_ncm 2-1:1.1 wwan0: register 'huawei_cdc_ncm' at usb-0000:00:14.0-1, Huawei CDC NCM device, 0c:5b:8f:27:9a:64
[  143.250076] usbcore: registered new interface driver huawei_cdc_ncm
[  144.107254] scsi 7:0:0:0: Direct-Access     HUAWEI   TF CARD Storage  2.31 PQ: 0 ANSI: 2
[  144.107469] sd 7:0:0:0: Attached scsi generic sg1 type 0
[  144.111051] scsi 6:0:0:0: CD-ROM            HUAWEI   Mass Storage     2.31 PQ: 0 ANSI: 2
[  144.113405] sd 7:0:0:0: [sdb] Attached SCSI removable disk
[  144.114554] sr0: scsi-1 drive
[  144.114662] sr 6:0:0:0: Attached scsi CD-ROM sr0
[  144.114728] sr 6:0:0:0: Attached scsi generic sg2 type 5
[  144.338466] ISO 9660 Extensions: Microsoft Joliet Level 1
[  144.356014] ISOFS: changing to secondary root
git clone https://github.com/Janhouse/4g-connect-linux

Modify 4g-connect-linux/huawei-4g-linux.pl, and ensure the following is correct:
my $device="/dev/ttyUSB0";
my $interface="wwan0";
my $apn="Aeroflex.com";
sudo ./huawei-4g-linux.pl

sudo dhcpcd wwan0
To release:
sudo dhcpcd -k wwan0
sudo dhclient wwan0

/var/lib/dhcp/dhclient.leases
option routers 10.10.1.1;
For unknown reason, the default gw is not set properly.
sudo route add default gw 10.10.1.1

The connection is setup if DHCP client get an IP.

Known issue: only work for the first time dongle plugged into system. wwan0 is missing at second re-plug. Need reboot.

E3276: Failed to find primary AT port
http://lists.freedesktop.org/archives/modemmanager-devel/2014-June/001241.html

(20150123) After tested several times, the dongle cannot get detected on my 14.04 any more even after reboot:
[21274.647803] usb 2-2: new high-speed USB device number 12 using xhci_hcd
[21274.664877] usb 2-2: New USB device found, idVendor=12d1, idProduct=14fe
[21274.664887] usb 2-2: New USB device strings: Mfr=2, Product=1, SerialNumber=0
[21274.664892] usb 2-2: Product: HUAWEI Mobile
[21274.664896] usb 2-2: Manufacturer: HUAWEI Technology
[21274.731839] usb-storage 2-2:1.0: USB Mass Storage device detected
[21274.732441] scsi4 : usb-storage 2-2:1.0
[21274.732533] usb-storage 2-2:1.1: USB Mass Storage device detected
[21274.732647] scsi5 : usb-storage 2-2:1.1
[21274.733080] usbcore: registered new interface driver usb-storage
[21275.731766] scsi 4:0:0:0: CD-ROM            HUAWEI   Mass Storage     2.31 PQ: 0 ANSI: 2
[21275.731898] scsi 5:0:0:0: Direct-Access     HUAWEI   TF CARD Storage  2.31 PQ: 0 ANSI: 2
[21275.732925] sr0: scsi-1 drive
[21275.732931] cdrom: Uniform CD-ROM driver Revision: 3.20
[21275.733132] sr 4:0:0:0: Attached scsi CD-ROM sr0
[21275.733245] sr 4:0:0:0: Attached scsi generic sg1 type 5
[21275.736527] sd 5:0:0:0: Attached scsi generic sg2 type 0
[21275.744259] sd 5:0:0:0: [sdb] Attached SCSI removable disk
[21275.838665] Buffer I/O error on device sr0, logical block 7
[21275.838670] Buffer I/O error on device sr0, logical block 7
[21275.839880] systemd-udevd[6071]: Failed to apply ACL on /dev/sr0: No such file or directory
[21275.839886] systemd-udevd[6071]: Failed to apply ACL on /dev/sr0: No such file or directory
[21275.843089] systemd-udevd[6071]: Failed to apply ACL on /dev/sr0: No such file or directory
[21275.843096] systemd-udevd[6071]: Failed to apply ACL on /dev/sr0: No such file or directory
 

Ubuntu 14.04 的中文輸入法...唉


sudo apt-get install ibus-chewing
重開機後
[System Settings] -> [Text Entry] 
或者到右上角去點去點輸入法的[En] -> [Text Entry Settings]
點[+] -> [選擇Chinese (Chewing)]




Change log : Trusty (14.04) : ibus-chewing package : Ubuntu
https://launchpad.net/ubuntu/trusty/+source/ibus-chewing/+changelog

language - 14.04 Chinese Ibus Input - No Options - Ask Ubuntu
http://askubuntu.com/questions/455682/14-04-chinese-ibus-input-no-options

Pinyin Joe - Ubuntu 10 - 14 Chinese input methods: IBus Pinyin, Chewing and more
http://www.pinyinjoe.com/linux/ubuntu-10-chinese-input-pinyin-chewing.htm

Pinyin Joe - Ubuntu 14.04 Chinese FAQ - ibus-pinyin and invalid utf-8 bugs
http://www.pinyinjoe.com/faq/ubuntu-1404-chinese-ime-problems-faq.htm

2015年1月16日 星期五

Tabatas

大腿肌群很有感...

Burpee jack  & Squat jump


 很累...所有肌群都有一些...心肺





精神百倍!!!
https://www.youtube.com/watch?v=phCfrsiNwkE


燃燒吧脂肪實驗生活30天 Day26,tabata 4 分鐘 @ The Stand Up Paddling Girl ~ SUP女孩 ~ :: 痞客邦 PIXNET ::
http://supgirl.pixnet.net/blog/post/318602840-%E7%87%83%E7%87%92%E5%90%A7%E8%84%82%E8%82%AA%E5%AF%A6%E9%A9%97%E7%94%9F%E6%B4%BB30%E5%A4%A9-day26%EF%BC%8Ctabata-4-%E5%88%86%E9%90%98

每天4分鐘練出六塊肌,TABATA四分鐘腹肌運動(中階版) | 健塑身 - Yahoo奇摩運動
https://tw.sports.yahoo.com/blogs/fit/%E6%AF%8F%E5%A4%A94%E5%88%86%E9%90%98%E7%B7%B4%E5%87%BA%E5%85%AD%E5%A1%8A%E8%82%8C%EF%BC%8Ctabata%E5%9B%9B%E5%88%86%E9%90%98%E8%85%B9%E8%82%8C%E9%81%8B%E5%8B%95-%E4%B8%AD%E9%9A%8E%E7%89%88-095622089.html

4 分鐘燃脂 12 小時!快來做 TABATA 間歇訓練超享瘦 | BuzzOrange
http://buzzorange.com/2014/10/24/sport-about-tabata/

2015年1月10日 星期六

棒式(Plank)

[MIKE BOYLE 頂尖表現] 建構核心之棒式變化式│動一動│運動小知識│山姆伯伯│棒式Don1Don
http://www.don1don.com/archives/37300

(彈力球)
馬拉松菁英Shalane Flanagan和Kara Goucher的核心課|Don1Don
http://www.don1don.com/archives/12257

2014年12月26日 星期五

minicom+kermit with u-boot

Ubuntu 13.10.

Installation:

  1. sudo apt-get install minicom ckermit
  2. /etc/kermit/kermrc
    set carrier-watch off
    set prefixing all
    set parity none
    set stop-bits 1
    set modem none
    set file type bin
    set file name lit
    set flow-control none
    set prompt "Linux Kermit> "

On minicom, give the following command to u-boot:
==> loadb 0x2000000
## Ready for binary (kermit) download to 0x02000000 at 115200 bps...
Then do ctrl+A+S with "kermit", select file to send. You should see the following screen:
C-Kermit 9.0.302 OPEN SOURCE:, 20 Aug 2011, testPC [192.168.1.105]

   Current Directory: /home/xxxx
Communication Device: /dev/ttyUSB0
 Communication Speed: 115200
              Parity: none
         RTT/Timeout: 01 / 03
             SENDING:  => u-boot.bin
                      BINARY
           File Size: 699264
        Percent Done: 4   //
                          ...10...20...30...40...50...60...70...80...90..100
 Estimated Time Left: 00:01:24
  Transfer Rate, CPS: 7887
        Window Slots: 1 of 1
         Packet Type: D
        Packet Count: 10
       Packet Length: 9024
         Error Count: 0
          Last Error:
        Last Message:

ERROR: ctrl+A+S with "kermit" doesn't work; nothing shown
Maybe something went wrong with kermit. In my case I didn't have kermrc set correctly. You can try to run kermit manually, for example:
# sudo kermit -i -l /dev/ttyUSB0 -b 115200 -s u-boot.bin

?Carrier required but not detected
It might be required for minicom to quit to run this command in console.



lazyf's den : A Personal Weblog: [技術] Linux下使用Minicon+Kermit
http://lazyflai.blogspot.tw/2010/06/linuxminiconkermit.html

Problems running Kermit - FedoraForum.org
http://forums.fedoraforum.org/showthread.php?t=121720

2014年12月25日 星期四

徒手腿部訓練

跑者髖關節訓練│動一動│專欄│Balance的鐵工廠Don1Don
http://www.don1don.com/archives/31610

多向跨步(Lunge Clock)
和運動傷害說掰掰 9項單腳訓練<上>
http://www.sportsnote.com.tw/running/view_article.aspx?id=414c054e-42fb-47ba-b81d-ae149aa667b6
 單腳深蹲 (Single-Leg Squat)


單腿臀部運動(Single-Leg Hip Drive)


單腳跳躍(Single-Leg Hops)
直線前跳後跳左右跳


單腳橫向跳躍(Single-Leg Lateral Hops)
定點左右跳
和運動傷害說掰掰 9項單腳訓練<下>
http://www.sportsnote.com.tw/running/view_article.aspx?id=6d6eb732-72c5-4b99-9a17-9cb6cf2e2efb
單腳星狀跳躍(Hopstar)

LTE

全球LTE標準必要專利佈局(一) LTE技術持續演進的重點方向
http://iknow.stpi.narl.org.tw/post/Read.aspx?PostID=10451

測試LTE基地台OTA 手持式頻譜分析儀走紅 - 學技術 - 新電子科技雜誌
http://www.mem.com.tw/article_content.asp?sn=1410150006&page=2

2014年12月10日 星期三

Strongswan and Cisco ASR5000 SeGW

  1. strongswan would enumerate all the available transform in the first IKE_SA_INIT. But it might be too much and there are some that are not recognizable by Cisco SeGW, and SeGW will just drop it and no response.....
    ike=aes128-sha1-prfsha1-
    modp1024,aes256-sha1-prfsha1-modp1024,3des-md5-prfmd5-modp1024,3des-sha1-prfsha1-modp1024,des-sha1-prfsha1-modp1
    esp=aes128-sha1-modp1024,3des-md5
    Cisco SeGW reports:
    Too Many Transforms:             110
    And dump the packet at Cisco show something like:
    (........a lot of transforms.........)

          Transform Header #39
            Last                 (U08): Yes/0 (0x00)
            Reserved             (U08): 0
            Transform Length     (U16): 8 (0x8) bytes
            Transform Type       (U08): DHGROUP/4 (0x04)
            Reserved             (U08): 0
            Transform ID         (U16): UNKNOWN/30 (0x001E)
    FIX: To fix this, force to use only one of the transform instead let it choose automatically, e.g.
    ike=aes128-sha1-prfsha1-modp1024!
    esp=aes128-sha1-modp1024!
     
  2. By default the mobike is enabled in strongswan, while Cisco SeGW doesn't support it. The tunnel is created without any problem. However, all packets encrypted with ESP is received by SeGW, but "somehow" not recognized. For example, encrypted ping request is received by SeGW, but not decrypted and is dropped.
    And on strongswan PC, all encrypted ping from SeGW is not received.

    FIX: Disable mobike will fix this issue.
    mobike=no

2014年11月28日 星期五

Tabata

每天這樣做,三個月練就完美人魚線! LIFE生活網
http://www.life.com.tw/?app=view&no=115609

將這8個動作依次練20秒然後休息10秒繼續下一個動作

1. 2. 3. 4. 5. 6. 7. 8. 

2014年10月15日 星期三

32.593

3GPP specification: 32.593
http://www.3gpp.org/DynaReport/32593.htm

LTE; Telecommunication management; Home enhanced Node B (HeNB) Operations, Administration, Maintenance and Provisioning (OAM&P); Procedure flows for Type 1 interface HeNB to HeNB Management System (HeMS) (3GPP TS 32.593 version 11.0.0 Release 11)
http://www.etsi.org/deliver/etsi_ts/132500_132599/132593/11.00.00_60/ts_132593v110000p.pdf

2014年10月7日 星期二

PeaZip

PeaZip 免費中文壓縮軟體,支援解壓縮 RAR、7Z、ZIP 等超過 150 種格式
http://free.com.tw/peazip/

PeaZip | Free Zip files utility, free Rar files extractor
http://peazip.sourceforge.net/

2014年10月2日 星期四

泰雅族歡樂歌 Ri muy Sola Ri muy Yo

泰雅族歡樂歌 Rimuy Sola Rimuy Yo
https://www.youtube.com/watch?v=8JeaSYepua0

Ri muy so la ri muy yo

ri muy so la ri muy yo
ri muy so la ri muy yo
ya ba ya ya ya ki
p q(k)a sun(saw) ta ryax soni

p g(t)a sun(saw) ta
p q(k)a sun(saw) ta
(g)u tux ryan so ni

歡樂歌

我們大家聚在一起
爸爸,媽媽,孩子今天都歡喜
讓我們此刻歡喜的聚在一起


台中市立梨山國民中小學母語日網站: 社團活動─泰雅歌謠社
http://lseslanguage.blogspot.com/2013/11/blog-post_7598.html

2014年9月29日 星期一

[Python] Generate executable binary in Linux

Freezing Your Code — The Hitchhiker's Guide to Python
http://docs.python-guide.org/en/latest/shipping/freezing/

How can I create a stand-alone binary from a Python script?
http://effbot.org/pyfaq/how-can-i-create-a-stand-alone-binary-from-a-python-script.htm



Freeze.py

What is the Python freeze process? - Stack Overflow
http://stackoverflow.com/questions/9916647/what-is-the-python-freeze-process

30.1. imp — Access the import internals — Python 2.7.8 documentation
https://docs.python.org/2/library/imp.html#imp.init_frozen

Freeze - Python Wiki
https://wiki.python.org/moin/Freeze

python/freeze.py at master · python-git/python · GitHub
https://github.com/python-git/python/blob/master/Tools/freeze/freeze.py

[projects] Index of /python/trunk/Tools/freeze
http://svn.python.org/view/python/trunk/Tools/freeze/

ubuntu - Error in using Python freeze.py - Stack Overflow
http://stackoverflow.com/questions/20313886/error-in-using-python-freeze-py

Ubuntu 13.10
  1. sudo apt-get install python2.7-examples
    The one mark in red is the freeze.py we need.
    dpkg -S freeze.py
    python-pip: /usr/share/pyshared/pip/commands/freeze.py
    python-pip: /usr/lib/python2.7/dist-packages/pip/commands/freeze.py
    python2.7-examples: /usr/share/doc/python2.7/examples/Tools/freeze/makefreeze.py
    python2.7-examples: /usr/share/doc/python2.7/examples/Tools/freeze/freeze.py
  2. sudo ln -s /usr/lib/python2.7/config-x86_64-linux-gnu/ /usr/lib/python2.7/config
  3. python /usr/share/doc/python2.7/examples/Tools/freeze/freeze.py test.py
  4. make
  5. If make finished successfully, the executable binary should be available at ./test.

cxfreeze script — cx_Freeze 5.0 documentation
http://cx-freeze.readthedocs.org/en/latest/script.html#script


2014年8月8日 星期五

Linux Core Dump

CONFIG_ELF_CORE
CONFIG_CORE_DUMP_DEFAULT_ELF_HEADERS

Busybox uses softlimit to set RLIMIT_CORE.

sysctl -w "kernel.core_pattern=/var/cores/%h-%e-%p.core"; mkdir /var/cores -p;
sysctl -w "kernel.core_pattern=/core";
sysctl -w "kernel.core_pattern=/tmp/core-%e-%s-%u-%g-%p-%t";
sysctl -w "kernel.core_uses_pid=1";
sysctl -w "fs.suid_dumpable=2";

cat /proc/sys/kernel/core_pattern;
cat /proc/sys/kernel/core_uses_pid;
cat /proc/sys/fs/suid_dumpable;

mount -t tmpfs tmpfs /tmp;
softlimit -c 1048576 /mnt/app/test &

killall -11 test
kill -s SIGSEGV 8257
ls -al /var/cores
ls -al /tmp




Linux Applications Debugging Techniques/Core files - Wikibooks, open books for an open world
http://en.wikibooks.org/wiki/Linux_Applications_Debugging_Techniques/Core_files

HowTo: Debug Crashed Linux Application Core Files Like A Pro - nixCraft
http://www.cyberciti.biz/tips/linux-core-dumps.html

core(5) - Linux manual page
http://man7.org/linux/man-pages/man5/core.5.html

How to: Enable/Generate/Debug Core Dump In Linux? » IT Sprite
http://www.itsprite.com/how-to-enablegeneratedebug-core-dump-in-linux/

linux - Who generate a core dump file? Kernel or glibc? - Stack Overflow
http://stackoverflow.com/questions/20969239/who-generate-a-core-dump-file-kernel-or-glibc

Linux: Understanding how much is malloc'ed in a coredump (Kevin Grigorenko's IBM WebSphere SWAT Blog)
https://www.ibm.com/developerworks/community/blogs/kevgrig/entry/linux_understanding_how_much_is_malloc_ed_in_a_coredump?lang=en


kernel/git/torvalds/linux.git - Linux kernel source tree
coredump: make core dump functionality optional
http://git.kernel.org/cgit/linux/kernel/git/torvalds/linux.git/commit/?id=046d662f481830e652ac34cd112249adde16452a

How to handle SIGSEGV, but also generate a core dump - Alex on Linux
http://www.alexonlinux.com/how-to-handle-sigsegv-but-also-generate-core-dump

2014年8月6日 星期三

Linux Crash Dump






echo 1 > /proc/sys/kernel/sysrq  #enable SysRq
echo c > /proc/sysrq-trigger #trigger Crash

Magic SysRq key - Wikipedia, the free encyclopedia
http://en.wikipedia.org/wiki/Magic_SysRq_key



linux - core dump not generated - Stack Overflow
http://stackoverflow.com/questions/6809227/core-dump-not-generated

google-coredumper - A neat tool for creating GDB readable coredumps from multithreaded applications - Google Project Hosting
http://code.google.com/p/google-coredumper/


eCrash: Debugging without Core Dumps | Linux Journal
http://www.linuxjournal.com/article/8724?page=0,0

Embedded Crash Handler | Free software downloads at SourceForge.net
http://sourceforge.net/projects/ecrash/


Documentation for Kdump - The kexec-based Crash Dumping Solution
https://www.kernel.org/doc/Documentation/kdump/kdump.txt


[Ubuntu] Kernel Crash Dump
https://help.ubuntu.com/12.04/serverguide/kernel-crash-dump.html

[Fedora] How to use kdump to debug kernel crashes - FedoraProject
http://fedoraproject.org/wiki/How_to_use_kdump_to_debug_kernel_crashes

[Red Hat] A quick overview of Linux kernel crash dump analysis
http://magazine.redhat.com/2007/08/15/a-quick-overview-of-linux-kernel-crash-dump-analysis/

[Red Hat] Crash
http://people.redhat.com/~anderson/
https://github.com/crash-utility/crash

Linux Kernel Crash Book
https://www.dropbox.com/s/ktbz9fy7qbwsyfa/www.dedoimedo.com-crash-book.pdf

2014年8月4日 星期一

sshd always wants to change password

It's solved for me by setting it to non-zero:

sshd:"PASSWORD":1:0:99999:7:::
Or run the following every time after useradd or passwd:
sed -e 's/^\([^:]*:[^:]*:\)0:/\11:/' /etc/shadow -i
Is it because busybox passwd always update the "last changed" field to 0?

No, it's because the System time is not set correctly.

libbb/update_passwd.c
/* "name:" + "new_passwd" + ":" + "change date" + ":rest of line" */
fprintf(new_fp, "%s%s:%u%s\n", name_colon, new_passwd,
        (unsigned)(time(NULL)) / (24*60*60), cp);
So if system time is not set correctly, "last changed" field will always be 0 at the first day, and SSH will always asking for changing passwd.

Use date to update the system should fix this issue:
date -s 201401010000.00
This is not even busybox related. It might happened on any PC, just PC has battery and RTC and rarely lost the time.



lib.uclibc.buildroot - Re: sshd always wants to change password - msg#00125 - Recent Discussion OSDir.com
http://osdir.com/ml/lib.uclibc.buildroot/2007-05/msg00125.html

> >Here is the entry from my shadow file:
> >sshd:"PASSWORD":0:0:99999:7:::
>
> set the last changed field to non-null


Linux Password & Shadow File Formats
http://www.tldp.org/LDP/lame/LAME/linux-admin-made-easy/shadow-file-formats.html
smithj:Ep6mckrOLChF.:10063:0:99999:7:::
As with the passwd file, each field in the shadow file is also separated with ":" colon characters, and are as follows:
  • Username, up to 8 characters. Case-sensitive, usually all lowercase. A direct match to the username in the /etc/passwd file.
  • Password, 13 character encrypted. A blank entry (eg. ::) indicates a password is not required to log in (usually a bad idea), and a ``*'' entry (eg. :*:) indicates the account has been disabled.
  • The number of days (since January 1, 1970) since the password was last changed.
  • The number of days before password may be changed (0 indicates it may be changed at any time)
  • The number of days after which password must be changed (99999 indicates user can keep his or her password unchanged for many, many years)
  • The number of days to warn user of an expiring password (7 for a full week)
  • The number of days after password expires that account is disabled
  • The number of days since January 1, 1970 that an account has been disabled
  • A reserved field for possible future use

2014年7月31日 星期四

Certificate Management Protocol (CMP)v2

[wiki] Certificate Management Protocol (CMP)
http://en.wikipedia.org/wiki/Certificate_Management_Protocol

CMP patch for OpenSSL by Martin Peylo



(2008.02.26)Re: CMPV2 - ReadList.com
http://readlist.com/lists/openssl.org/openssl-users/1/8423.html

CMP patch for OpenSSL | Free Security & Utilities software downloads at SourceForge.net
http://sourceforge.net/projects/cmpforopenssl/
An implementation of the Certificate Management Protocol (CMP) version 2, defined in RFC 4210, as a patch for OpenSSL. Long term goal is to provide an RFC compliant implementation and proof of concept client - and then offer it to the OpenSSL project