quinta-feira, 5 de agosto de 2010

kde - network manger plasmoid and wpa-wpa2

I had a problem connecting to my enterprise wireless network. They use WPA-WPA2 Enterprise with TTLS authentication and PAP as inner authentication.

I use the plasma widget of network manager, running on kubuntu 10.04

I figured it was a problem with reading/parsing the certificate file, from my syslog i got this message:

Aug 5 10:31:46 namikaze wpa_supplicant[848]: OpenSSL: tls_connection_ca_cert - Failed to parse ca_cert_blob error:0D0680A8:asn1 encoding routines:ASN1_CHECK_TLEN:wrong tag

I got on-line...with other means =)

and got to this bug report:

Bug 209673 - knetworkmanager applet (NOT THE PLASMOID) can't connect to WPA PEAP when validating by CA certificate

Well...they do say it's not related to the plasmoid...but i figured it should be similar...

They say it has something to do with network manager not feeding the certificate to the wpa_supplicant in the correct form/way (comment #21).

I've tried their workaround (comment #25)...well i failed...

~ #cat cacert.pem | grep -v "CERTIFICATE" | base64 -d > cacert.dem
base64: dados de entrada inválidos


so I thought to use openssl to convert the certificate to dem:

openssl x509 -in cacert.pem -outform der > cacert.dem

...and that did work!

I've just changed the configuration of the network...to point to the new certificate....and that actually did the trick =)

terça-feira, 6 de julho de 2010

Firefox - Mouse Middle Button

To click the mouse's middle button and firefox paste and load an url from clipboard:

In firefox enter: about:config

And change the value of middlemouse.contentLoadURL to true.

terça-feira, 11 de maio de 2010

wbinfo :: doesn't update new group information

After adding a new group to user, getent showed user on the group, but wbinfo -r user, didn't:

# wbinfo -a [domain\\]user%password

then

# wbinfo -r user

it should now print all the same groups as getent

* [optional]

source

quinta-feira, 29 de abril de 2010

linux :: bash :: removing duplicate files


find /dir/where/to/search -type f -print0 | xargs -0 -n1 md5sum | sort --key=1,32 | uniq -w 32 -d | awk {'print $2'} | while read a ; do rm $a ; done

quarta-feira, 28 de abril de 2010

linux :: 3g :: wvdial :: tmn :: vodafone :: zon

Configurações para utilizar com o wvdial de forma a ligar por 3g às redes tmn, vodafone e zon:

vim /etc/wvdial.conf

; ligacao tmn
[Dialer tmn]
Init2 = ATZ
Init3 = AT+CGDCONT=1,"ip","internet"
Stupid Mode = 1
ISDN = 0
Phone = *99***1#
Ask Password = 0
Modem = /dev/ttyUSB2
Username = tmn
Dial Command = ATD
Password = -PIN-DO-CARTAO-
Baud = 460800

; ligacao vodafone
[Dialer vodafone]
Phone = *99***1#
Username = vodafone
Password = vodafone
Stupid Mode = 1
Ask Password = 0
Dial Command = ATDT
Modem = /dev/ttyUSB0
Baud = 460800
Init1 = AT+CMEE=1
Init2 = ATZ
Init3 = ATE0V1&D2&C1S0=0+IFC=2,2
ISDN = 0
Modem Type = Analog Modem
Init5 =AT+CGDCONT=1,"IP","internet.vodafone.pt";

;ligacao zon
[Dialer zon]
Phone = *99***1#
Username = Zon
Password = Zon
Stupid Mode = 1
Ask Password = 0
Dial Command = ATDT
Modem = /dev/ttyUSB0
Baud = 460800
Init1 = AT+CMEE=1
Init2 = ATZ
Init3 = ATE0V1&D2&C1S0=0+IFC=2,2
ISDN = 0
Modem Type = Analog Modem
Init5 =AT+CGDCONT=1,"IP","internet.zon.pt";


num terminal/consola executar: wvdial _rede_
sendo que _rede_ poderá ter o valor tmn, vodafone ou zon.

no caso da pen estar protegida por pin usar:
gcom -d /dev/ttyUSB0
colocar o pin, e esperar pelo registo da pen na rede
poderá ser ttyUSB0, ttyUSB1 ou ttyUSB2, depende onde estiver o device.