Rully's Blog

05 April 2007

WPA di GNU/Linux Debian

Assalamu'alaikum Warahmatullahi Wabarakatuh


Nyoba WPA di Sid, susah-susah gampang. Kurang lebih gini lah:

1. Cari dulu
:~# apt-cache search wpa
wpasupplicant - Client support for WPA and WPA2 (IEEE 802.11i)

2. Install
:~# apt-get install wpasupplicant

3. Copy contoh file konfigurasi
:~# cp /usr/share/doc/wpasupplicant/examples/wpa_supplicant.conf.template /etc/wpa_supplicant.conf

4. Edit file konfigurasi
:~# vim /etc/wpa_supplicant.conf
ctrl_interface=/var/run/wpa_supplicant
network={
ssid="SSID-nya"
psk="KEY-nya"
key_mgmt=WPA-PSK
}

5. Coba ah ...
~# wpa_supplicant -ieth1 -Dipw -B -c/etc/wpa_supplicant.conf
ioctl[IPW_IOCTL_WPA_SUPPLICANT]: Operation not supported
Failed to set encryption.

Walah, gagal. Gugling. Wah, ipw gak support. Ganti sama wext.

6. Coba ganti driver
:~# wpa_supplicant -ieth1 -Dwext -B -c/etc/wpa_supplicant.conf
Berhasil. Tapi belum dapet IP nih dari dhcp server. Tanya ke yang lain, dikasih tau sama pak Budi.

7. Jalanin dhcp client.
:~# dhclient
Berhasil dapet IP & connect ke Internet.

8. Baca dulu.
:~# less /usr/share/doc/wpasupplicant/README.Debian

9. Copy file daemon-nya.
:~# cp /usr/share/doc/wpasupplicant/examples/wpa_supplicant.init-daemon /etc/init.d/wparoamd

10. Buat jadi executable.
:~# chmod +x /etc/init.d/wparoamd

11. Edit sesuai kebutuhan.
:~# vim /etc/init.d/wparoamd
CONFIG="/etc/wpa_supplicant.conf"
INTERFACE="eth1"
DRIVER="wext"

12. :~# update-rc.d wparoamd start 15 2 3 4 5 . stop 90 0 1 6 .
:~# invoke-rc.d wparoamd start


13. Expand dulu, terus baca.
:~# gunzip /usr/share/doc/wpasupplicant/README.modes.gz
:~# less /usr/share/doc/wpasupplicant/README.modes


14. Set interfaces seperlunya.
:~# vim /etc/network/interfaces
auto lo
iface lo inet loopback

auto eth1
iface eth1 inet dhcp
wpa-driver wext
wpa-conf /etc/wpa_supplicant.conf

15. :~# /etc/init.d/networking stop
:~# /etc/init.d/networking start


Beres.


Wassalamu'alaikum Warahmatullahi Wabarakatuh

04 April 2007

E: Sub-process /usr/bin/dpkg return an error code (1)

Assalamu'alaikum Warahmatullahi Wabarakatuh


Udah lama gak update blog ini. Error ini muncul udah lama. Intinya sih karena rubah sources.list, update & dist-upgrade, font jadi ngaco & terakhir ... KDE gak jalan. He he. Tapi sekarang udah ok lagi. Kurang lebih kayak gini lah:

1. Rubah sources.list kembali ke semula.
:~# vim /etc/apt/sources.list
deb http://mirrors.kernel.org/debian/ sid main
deb-src http://mirrors.kernel.org/debian/ sid main


2. :~# apt-get update && apt-get dist-upgrade -f
Soalnya kalo gak pake option -f, gak bisa terus.

3. Nah disini muncul error. Gak beres-beres dist-upgrade-nya.
dpkg: error processing /var/cache/apt/archives/x11-common_1%3a7.1.0-15_i386.deb (--unpack):
trying to overwrite '/usr/X11R6/bin', which also in package nessusclient
Errors were encountered while processing:
/var/cache/apt/archives/x11-common_1%3a7.1.0-15_i386.deb
E: Sub-process /usr/bin/dpkg return an error code (1)


4. Pas kebetulan tanya ke pak Andika, terus dijelasin. Dicoba & berhasil.
:~# dpkg -i --force overwrite /var/cache/apt/archives/x11-common_1%3a7.1.0-15_i386.deb

5. Lanjutin lagi.
:~# apt-get dist-upgrade -f

6. KDE & font yang rusak, ok lagi. Gak bisa login langsung root. Ya bisa liat posting sebelumnya di blog ini. Masih banyak yang belum dicek. Nanti aja lah.
:~# apt-get update && apt-get upgrade

Beres.


Wassalamu'alaikum Warahmatullahi Wabarakatuh