c3d2-wiki/Wpa_supplicant.mw

83 lines
1.8 KiB
Plaintext
Raw Normal View History

2014-06-19 17:47:10 +02:00
== wpa_supplicant ==
Ist eine Variante wie die WLAN-Netzwerke konfiguriert werden können. Im Vergleich zum Networkmanager u.a. unter Gnome (Paket gnome-network-manager) ist dies weniger Fehleranfällig und leichter direkt aus dem Terminal konfigurierbar.
=== Installation ===
==== Debian ====
1. Paket installieren
<source lang=bash>
sudo apt-get update
sudo apt-get install wpasupplicant
</source>
2. Rechte auf Interfaces beschränken
<source lang=bash>
sudo chmod 0600 /etc/network/interfaces
</source>
3. Interfaces prüfen
<source lang=bash>
cat /etc/network/interfaces
</source>
oder setzen:
<source lang=bash>
sudo cat >/etc/network/interfaces<<EOF
# The loopback network interface
auto lo
iface lo inet loopback
auto wlan0
iface wlan0 inet dhcp
wpa-conf /etc/wpa_supplicant/wpa_supplicant.conf
EOF
</source>
4. Offenes WLAN konfigurieren
erstmal ansehen:
<source lang=bash>
cat /etc/wpa_supplicant/wpa_supplicant.conf
</source>
die Datei kann so zum freien WLAN im HQ führen:
<source lang=bash>
cat >/etc/wpa_supplicant/wpa_supplicant.conf<<EOF
### ### ### C3D2 ### ### ###
network={
ssid="C3D2"
key_mgmt=NONE
priority=0
}
### ### ### C3D2 ### ### ###
EOF
</source>
5. Passwortgecshütztes WLAN konfigurieren
mit wpa_passphrase am Bsp. [[C3D2-fallback]] als Einzeiler:
<source lang=bash>
wpa_passphrase C3D2-fallback >> /etc/wpa_supplicant/wpa_supplicant.conf
</source>
mit <code>wpa_cli</code> (nähere Erläuterung s. Quelle)
<pre>scan
scan_results
add_network
set_network 0 ssid "WLAN-Network"
set_network 0 psk "SupahSecretPassphrase"</pre>
== Quellen ==
* wpa_supplicant im [https://wiki.debian.org/WiFi/HowToUse#wpa_supplicant Debian-Wiki]
* [http://sirlagz.net/2012/08/27/how-to-use-wpa_cli-to-connect-to-a-wireless-network/ wpa_cli erläutert]