WPA_PRIV(8)
π wpa_priv(8) β the privilege separation helper bestie π
okay so welcome to wpa_priv, the wpa_supplicant privilege separation helper β¨ it's giving "security bouncer at the club door" energy and honestly? iconic π«Ά
β¨ SYNOPSIS β¨
wpa_priv [ -c ctrl path ] [ -Bdd ] [ -P pid file ] [ driver:ifname
[driver:ifname ...] ]
πΈ OVERVIEW πΈ
so wpa_priv is a privilege separation helper, and its whole job is to shrink down the amount of wpa_supplicant code that has to run with root privileges. minimizing. slimming. protecting the main character π
when it's enabled, the privileged operations happen inside the wpa_priv process, and everything else β like EAP authentication and WPA handshakes β gets to live its best life in an unprivileged process (wpa_supplicant) that can be run as a non-root user. π¦
privilege separation restricts the effects of potential software errors by containing the majority of the code in an unprivileged process, so you avoid the possibility of a full system compromise. no cap, that's the whole point π
wpa_priv needs to be run with network admin privileges (usually, the root user, bestie π). it opens a UNIX domain socket for each interface that is included on the command line β and any other interface will be off limits for wpa_supplicant in this kind of configuration. periodt.
after all that, wpa_supplicant can be run as a non-root user (like, say, all the standard users on a laptop, or a special non-privileged user account created just for this purpose to limit access to user files even further π).
π EXAMPLE CONFIGURATION π
the following steps are an example of how to configure wpa_priv to allow users in the wpapriv group to communicate with wpa_supplicant with privilege separation:
- create user group (e.g.,
wpapriv) and assign users that should be able to usewpa_supplicantinto that group. π - create
/var/run/wpa_privdirectory for UNIX domain sockets and control user access by setting it accessible only for thewpaprivgroup:
mkdir /var/run/wpa_priv
chown root:wpapriv /var/run/wpa_priv
chmod 0750 /var/run/wpa_priv
- start
wpa_privas root (e.g., from system startup scripts) with the enabled interfaces configured on the command line:
wpa_priv -B -c /var/run/wpa_priv -P /var/run/wpa_priv.pid wext:wlan0
- run
wpa_supplicantas non-root with a user that is in thewpaprivgroup:
wpa_supplicant -i ath0 -c wpa_supplicant.conf
π COMMAND ARGUMENTS π
-cctrl pathβ specify the path to thewpa_privcontrol directory (Default:/var/run/wpa_priv/). π-Bβ run as a daemon in the background. bye bestie, off it goes π§-Pfileβ set the location of the PID file. πdriver:ifname[driver:ifname...] β the<driver>string dictates which of the supportedwpa_supplicantdriver backends is to be used. to get a list of supported driver types seewpa_supplicanthelp (e.g,wpa_supplicant -h). the driver backend supported by most good drivers iswext. β
the <ifname> string specifies which network interface is to be managed by wpa_supplicant (e.g., wlan0 or ath0). πΈ
wpa_priv does not use the network interface before wpa_supplicant is started, so it is fine to include network interfaces that are not available at the time wpa_priv is started. wpa_priv can control multiple interfaces with one process, but it is also possible to run multiple wpa_priv processes at the same time, if desired. multi-tasking queen π
π₯ SEE ALSO π₯
βοΈ LEGAL βοΈ
wpa_supplicant is copyright (c) 2003-2022, Jouni Malinen <j@w1.fi> and contributors. All Rights Reserved.
This program is licensed under the BSD license (the one with advertisement clause removed).
and that's the whole page, bestie π this one is from the wpa_priv(8) manual, dated 07 August 2019 β go forth and separate those privileges responsibly, mwah πβ¨
π¦ where this page comes from
- centos-stream 10: wpa_supplicant 1:2.11-5.el10 Β· BSD-3-Clause
- centos-stream 9: wpa_supplicant 1:2.11-2.el9 Β· BSD
- fedora 43: wpa_supplicant 1:2.11-7.fc43 Β· BSD-3-Clause
- fedora 44: wpa_supplicant 1:2.11-9.fc44 Β· BSD-3-Clause
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash on : a language model's rewrite of the original, under its terms