Unix & Linux Stack Exchange is a question and answer site for users of Linux, FreeBSD and other Un*x-like operating systems. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

How can I make wpa_supplicant not connect to expressly disabled open networks when no configured network is available? (How can I make it not connect to anything whatsoever?)

This happens when my card fails to find my home network. In this case, wpa_supplicant connects to any other available network, even disabled networks.

For example, my neighbour has an open network (SSID: xfinitywifi) with a strong signal. This network is expressly disabled in my wpa_supplicant.conf: (See this question also by me.)


This works most of the time. However, if my card happens not to find my home network, wpa_supplicant then just ignores disabled=1 above, and connects to xfinitywifi.

This can be shown from wpa_cli output (reformatted):

> disconnect
> list_networks
0   neighbour1           any        [DISABLED]
1   xfinitywifi          any        [DISABLED]
2   neighbour2           any
12  neighbour12          any
13  any                             [CURRENT]
> reconnect
<3>SME: Trying to authenticate with 06:1d:d3:4c:37:00 (SSID='xfinitywifi' freq=2447 MHz)
<3>Trying to associate with 06:1d:d3:4c:37:00 (SSID='xfinitywifi' freq=2447 MHz)
<3>Associated with 06:1d:d3:4c:37:00 
<3>CTRL-EVENT-CONNECTED - Connection to 06:1d:d3:4c:37:00 completed (reauth) [id=13 id_str=]

Notice that #13 (any) is the current network ([CURRENT]), which turns out to be #1, xfinitywifi, a disabled network ([DISABLED]).

share|improve this question

Disable the default network configuration in wpa_supplicant.conf:

share|improve this answer

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.