Skip to main content
2 of 2
Add content of configuration script.
JJD
  • 587
  • 3
  • 10
  • 27

How to automatically apply wpa_supplicant configuration?

To authenticate in a corporate network I have to run the following command:

$ sudo wpa_supplicant -i eth0 -D wired -c /etc/wpa_supplicant/mywired.conf -B

The configuration script loaded thereby looks like this:

# global configuration
ctrl_interface=/var/run/wpa_supplicant
#ctrl_interface_group=wheel
ap_scan=0

# 802.1x wired configuration    

# eap-ttls
network={
    key_mgmt=IEEE8021X
    eap=TTLS
    identity="[email protected]"
    anonymous_identity="[email protected]"
    password="password"
    ca_cert="/home/user/deutsche-telekom-root-ca-2.pem"
    phase2="auth=PAP"
    eapol_flags=0
    priority=5
}

# eap-peap
network={
    key_mgmt=IEEE8021X
    eap=PEAP
    identity="[email protected]"
    anonymous_identity="[email protected]"
    password="password"
    ca_cert="/home/user/deutsche-telekom-root-ca-2.pem"
    phase2="auth=MSCHAPV2"
    eapol_flags=0
    priority=10
}

Without the configuration I do not get an IP address assigned via DHCP.
How can I automatically apply this configuration at startup? I am running Ubuntu 14.10.

JJD
  • 587
  • 3
  • 10
  • 27