google code-beautifer

星期三, 9月 28, 2016

Mageia 5 WPA2 Enterprise setting [solved]!

If your you need to connect to a WPA2 Enterprise wireless  server similar to this setting in Ubuntu's network manager
    Wireless security: WPA & WPA2 Enterprise
    Authentication: Protected EAP (PEAP)
    Anonymous Identity: NetID
    CA certificate: None
    PEAP version: Automatic
    Inner Authentication: MSCHAPv2
    Username: NetID
    Password: password

This is the Ubuntu's WPA2 for setting above using network manager in wpa_supplicant.conf
network={
    pairwise=CCMP
    proto=RSN
    ssid="YOURWPA2_AP_SSID"
    password="MYPASSWD"
    eap=PEAP
    key_mgmt=WPA-EAP
    phase2="auth=MSCHAPV2"
    identity="MYNETID"
    auth_alg=OPEN
     phase1="peaplabel=auto peapver=0"
    eapol_flag s=0                  
    disbaled=1                    
}

This is the setting of  the default Mageia 5 WPA2 Enterprise setting using network manager.   in /etc/wpa_supplicant.conf.  This will not work.
network={
    pairwise=TKIP
    proto=WPA
    identity="MYNETID"
    ssid="YOURWPA2_AP_SSID"
    password="MYPASSWD"
    scan_ssid=1
    group=TKIP
    mode=0
    eap=PEAP
    key_mgmt=WPA-EAP
    phase2="auth=MSCHAPV2"
}

This is the Mageia's  working WPA2 Enterprise  setting equivalent to the one in Ubuntu .  It works!
network={
    pairwise=CCMP
    proto=RSN
    identity="MYNETID"
    ssid="YOURWPA2_AP_SSID"
    password="MYPASSWD"
    scan_ssid=1
    group=CCMP TKIP
    mode=0
    eap=PEAP
    key_mgmt=WPA-EAP
    phase2="auth=MSCHAPV2"
}

the difference between Ubuntu and Mageia's default  WPA2 enterprise setting
+ scan_ssid=1        // mageia default
+ group=TKIP        // mageia old use TKIP
+ mode=0              //  mageia default
- auth_alg=OPEN // Ubuntu's, not needed in
- phase1="peaplabel=auto peapver=0"   // Ubuntu      
- eapol_flags=0    // Ubuntu                           
-  disbaled=1        // Ubuntu

diff wpa_supplicant.conf wpa_supplicant.conf.old (the later the is Mageia's non-working default setting)
<    pairwise=CCMP
<    proto=RSN
<    group=CCMP TKIP
>    pairwise=TKIP
>    proto=WPA
>    group=TKIP

This is the 2/20 of my 開放改變20 initiative in this year.

星期六, 9月 03, 2016

.emacs 除錯

emacs 是個很強大的編輯器,把.emacs 設好就會展現強大功能,但要新手一下就能對.emacs除錯不易。

覺得emacs 起始頁說要你用emacs --debug-init真是胡扯,我照做了,啥都看不見。正解應該是(至少是在v24.4 之類在xwindows 下跑的emacs):不管錯誤先進emacs再說 ,然後用meta-x ielm進入 inferior lisp mode,下面幾乎就跟完整lisp 解譯發展環境一樣隨你跑,打入一個變數,他就會立即顯示他的值,然後去觀察這值為何沒有設定好。emacs 的外掛大部份時候其實就是把變數設正確就成了。理論上不跑 ielm 用熱鍵contrl-h v 也可以,可是變數一多,重複打熱鍵這就會很煩

而且既然是個lisp 解譯發展環境,可以拿來解決一些生活上的小問題,或拿來練練功也不錯