# Why is wpa_supplicant starting automatically?

## Xander314

I recently noticed that wpa_supplicant is being started and is connecting to my wireless network, but I have no idea what is starting it. The corresponding OpenRC services are not running,

```

# /etc/init.d/net.wlp3s0 status

 * status: stopped

# /etc/init.d/wpa_supplicant status

 * status: stopped

```

but nonetheless something is spawning a wpa_supplicant process,

```

# ps aux | grep wpa_supplicant

root ....... wpa_supplicant -B -c /etc/wpa_supplicant/wpa_supplicant.conf -iwlp3s0

```

/etc/conf.d/net contains

```

modules_wlp3s0="wpa_supplicant"

config_wlp3s0="dhcp"

```

but since net.wlp3s0 is disabled, I don't think this is relevant.

So my question is, what is starting wpa_supplicant, or at least how can I find this out? Thanks.

----------

## szatox

You can try grepping through 

ps ajx

```
ps jax

 PPID   PID  PGID   SID TTY      TPGID STAT   UID   TIME COMMAND

    0     1     1     1 ?           -1 Ss       0   0:05 init [3]   

    0     2     0     0 ?           -1 S        0   0:00 [kthreadd]

    2     3     0     0 ?           -1 S        0   5:46 [ksoftirqd/0]

    2     5     0     0 ?           -1 S<       0   0:00 [kworker/0:0H]

    2     7     0     0 ?           -1 S        0  16:14 [rcu_sched]

----// snip //----

```

PPID stands for "Parrent's PID"

Another way is answer a simple question:

How do you configure your network?

----------

## Xander314

Thanks. Turns out wpa_supplicant was indeed started by init (PPID was 1). As for how I configure my network, the answer is I don't. I had configured wpa_supplicant and everything was working, so I assumed I had already gone through all the network config. However, I recently realised that in fact I never created /etc/init.d/net.wlan0 or added it to any runlevel. dpcpcd is being started as a dependency, so is it possible that dhcpcd is bringing up the interface with wpa_supplicant even though there is no OpenRC service file for net.wlan0?

----------

## UberLord

 *Xander314 wrote:*   

> so is it possible that dhcpcd is bringing up the interface with wpa_supplicant even though there is no OpenRC service file for net.wlan0?

 

Yes, dhcpcd will start wpa_supplicant by default IF the interface is wireless AND it can find a wpa_supplicant.conf AND wpa_supplcant.conf is configured for ctrl_interface AND wpa_cli claims wpa_supplicant is not running.

And, again by default, dhcpcd will start every interface it can if not restricted.

----------

## szatox

 *Quote:*   

> As for how I configure my network, the answer is I don't.

 

Yes, you do:

 *Quote:*   

>  dpcpcd is being started as a dependency

 

Glad you got it sorted  :Wink: 

----------

