Solving network connection problems on Ubuntu 13.04 / Debian Wheezy

As Debian Wheezy got released I tested it out as well as Ubuntu 13.04. Most of what I saw I enjoyed but there was however one problem which came from network-manager error which thumbed down my experience. When I tried to connect my wireless via network-manager (nm-applet) I got an error saying I have insufficient rights and the connection could not be established. The previously mentioned error can luckily be fixed quite easily, even without having the network-manager installed, and here is how it is done. Note: This tuturial should also be valid on a variety of other Linux distributions like Linux Mint, Arch Linux and Fedora.

1. Open a terminal client and type as root or sudo

sudo nano /etc/network/interfaces

Note: Listed are some tweaked example entries for the network/interfaces file: adjust them according to your needs.

Further explanations: Lines marked with # are comments which will not be read by the system. Eth0 is the address of the wired network component. Commonly used alternative is also eth1. Wireless network component wlan0 might alternatively be wlan1. To wpa-ssid you put your wireless network name and to wpa-psk the password of your wireless network.

If you are not sure what is your wpa-ssid issue this command in terminal as root or sudo to scan the available ssids:

sudo iwlist wlan0 scan | grep ESSID

If you only use wired connection then uncomment the lines auto eth0 and iface eth0 inet dhcp below #Wired connection entry. If you only use wireless leave the entries similar to the example above.

Once you are done tweaking the network interfaces file save it and reboot the computer. You may also try out the traditional /etc/init.d/networking restart script to restart network interfaces (must be done as sudo or root). However I experienced a gui crash when the /etc/init.d/networking restart scrript was executed so to be safe from unneeded errors I would advice rebooting the computer.