WPA2 Wireless Internet connection without wicd, wifi Radar and Network Manager

How to connect to your secure WIFI connection without installing, using Network Manager, wicd or any other heavy graphical applications.

This post is intended for people who want a lightweight GNU Linux system and a WPA2 encrypted wireless Internet connection. Plus, make sure you have installed the wireless card driver necessary for your computer, do some reading on the topic, and back up your data.


Let's get started:




You can find and install the necessary drivers by installing and use jockey:
sudo apt-get install jockey-gtk jockey-common
Install wpasupplicant, and wireless-tools.

sudo apt-get install wpasupplicant wireless-tools

Next create a file:
sudo gedit /etc/wpa_supplicant.conf

Add copy and paste into the file (do not remove the quote in the code):

ctrl_interface=/var/run/wpa_supplicant

network={
ssid="YOUR SSID"
psk="YOUR PASSWORD"
key_mgmt=WPA-PSK
proto=RSN WPA
pairwise=CCMP TKIP
}


Now create a bash script
gedit ./wifi
copy and paste inside it:

#!/bin/bash
pkill wpa_supplicant
ifconfig wlan0 up
iwconfig wlan0 essid YOUR-ESSID-NAME-HERE
wpa_supplicant -B Dwext -i wlan0 -c /etc/wpa_supplicant.conf
dhclient wlan0


Make the batch ./wifi executable:
chmod +x ./wifi

into your menu, and start up file, add gksudo ./wifi &

Add now, when X server start up, you will be prompt to enter your password to connect to the Internet.

Advices:
*Make the /etc/wpa_supplicant.conf impossible to read by other users for security reason. Open terminal and enter those commands:

sudo chmod 0600 /etc/wpa_supplicant.conf
*Use wpa_passphrase and (>>) to add other network to /etc/wpa_supplicant.conf
*Disable or uninstall Network Manager (nm-applet), wicd, wifi radar...

Comments

  1. Thanks a lot for this one. But does it also work with WEP? I'm searching for a HowTo for setting up my WiFi without any GUI-Tools and without having to start the xserver in order to get online. Is there a possibility to do so with wpa-supplicant?

    ReplyDelete
  2. @Anonymous To start the connection without a GUI, follow the same tutorial, just use an Vi or nano instead of gedit, and sudo instead of gksudo.

    WEP is an unsecured connection. Use WPA2 or more secure up to date type of connection.

    ReplyDelete
  3. hi, thanks for this...i just didn't understand the last instruction..."gksudo ./wifi &"

    could you explain it to me a bit more... i am resonable new with linux.


    thanks again.

    ReplyDelete
  4. @nato gksudo is a graphical version of sudo.
    gksudo ./wifi &
    is the commands that will run ./wifi with the security privileges of a superuser or an administrator.

    ReplyDelete
  5. I would try this at home. Our wireless internet now still has no password because I haven't set it up yet. I would try to do this. Thank you. data cabling

    ReplyDelete
  6. Putting password on your wireless internet is important so that you have a secured access. It also lessen interruptions for a faster internet surfing. If you also use it for document storage and management, it secures your files shared.

    ReplyDelete

Post a Comment

Popular Posts