source: networking/netprogs/wpa_supplicant.xml@ 9003787

12.0 12.1 gimp3 ken/TL2024 ken/tuningfonts lazarus lxqt plabs/newcss python3.11 rahul/power-profiles-daemon renodr/vulkan-addition trunk xry111/for-12.3 xry111/llvm18 xry111/spidermonkey128
Last change on this file since 9003787 was b3867c5, checked in by Bruce Dubbs <bdubbs@…>, 14 months ago

Add qt5-components page.

Also create an ENTITY for qt5 or qt5-alternate and use that
to specify the qt5 dependenies.

The complete KF5/plasma packages should use the full qt5 build, but
the lxqt kf5/plasma components only need qt5-alternate.

  • Property mode set to 100644
File size: 20.8 KB
Line 
1<?xml version="1.0" encoding="ISO-8859-1"?>
2<!DOCTYPE sect1 PUBLIC "-//OASIS//DTD DocBook XML V4.5//EN"
3 "http://www.oasis-open.org/docbook/xml/4.5/docbookx.dtd" [
4 <!ENTITY % general-entities SYSTEM "../../general.ent">
5 %general-entities;
6
7 <!ENTITY wpa_supplicant-download-http
8 "https://w1.fi/releases/wpa_supplicant-&wpa_supplicant-version;.tar.gz">
9 <!ENTITY wpa_supplicant-download-ftp " ">
10 <!ENTITY wpa_supplicant-md5sum "d26797fcb002898d4ee989179346e1cc">
11 <!ENTITY wpa_supplicant-size "3.4 MB">
12 <!ENTITY wpa_supplicant-buildsize "37 MB">
13 <!ENTITY wpa_supplicant-time "0.5 SBU (with optional gui)">
14]>
15
16<sect1 id="wpa_supplicant" xreflabel="wpa_supplicant-&wpa_supplicant-version;">
17 <?dbhtml filename="wpa_supplicant.html"?>
18
19
20 <title>wpa_supplicant-&wpa_supplicant-version;</title>
21
22 <indexterm zone="wpa_supplicant">
23 <primary sortas="a-wpa_supplicant">wpa_supplicant</primary>
24 </indexterm>
25
26 <sect2 role="package">
27 <title>Introduction to WPA Supplicant</title>
28
29 <para>
30 <application>WPA Supplicant</application> is a Wi-Fi Protected Access
31 (WPA) client and IEEE 802.1X supplicant. It implements WPA key negotiation
32 with a WPA Authenticator and Extensible Authentication Protocol (EAP)
33 authentication with an Authentication Server. In addition, it controls the
34 roaming and IEEE 802.11 authentication/association of the wireless LAN
35 driver. This is useful for connecting to a password protected wireless
36 access point.
37 </para>
38
39 &lfs113_checked;
40
41 <bridgehead renderas="sect3">Package Information</bridgehead>
42 <itemizedlist spacing="compact">
43 <listitem>
44 <para>
45 Download (HTTP): <ulink url="&wpa_supplicant-download-http;"/>
46 </para>
47 </listitem>
48 <listitem>
49 <para>
50 Download (FTP): <ulink url="&wpa_supplicant-download-ftp;"/>
51 </para>
52 </listitem>
53 <listitem>
54 <para>
55 Download MD5 sum: &wpa_supplicant-md5sum;
56 </para>
57 </listitem>
58 <listitem>
59 <para>
60 Download size: &wpa_supplicant-size;
61 </para>
62 </listitem>
63 <listitem>
64 <para>
65 Estimated disk space required: &wpa_supplicant-buildsize;
66 </para>
67 </listitem>
68 <listitem>
69 <para>
70 Estimated build time: &wpa_supplicant-time;
71 </para>
72 </listitem>
73 </itemizedlist>
74
75 <bridgehead renderas="sect3">WPA Supplicant Dependencies</bridgehead>
76
77 <bridgehead renderas="sect4">Required (Runtime)</bridgehead>
78 <para role="nodump">
79 <xref linkend="wireless-kernel"/>
80 </para>
81
82 <bridgehead renderas="sect4">Recommended</bridgehead>
83 <para role="recommended">
84 <xref linkend="desktop-file-utils"/> (for running
85 <command>update-desktop-database</command>) and
86 <xref linkend="libnl"/>
87 </para>
88
89 <bridgehead renderas="sect4">Optional</bridgehead>
90 <para role="optional">
91 <phrase revision="sysv"><xref linkend="dbus"/>,</phrase>
92 <xref linkend="libxml2"/>, and
93 &qt5-deps;
94 </para>
95
96
97 </sect2>
98
99 <sect2 role="kernel" id="wpa_supplicant-kernel">
100 <title>Kernel Configuration</title>
101
102 <para>
103 To use <application>wpa_supplicant</application>, the kernel must have
104 the appropriate drivers and other support available. Read
105 <xref linkend='wireless-kernel'/> for details.
106 </para>
107
108 <indexterm zone="wpa_supplicant wpa_supplicant-kernel">
109 <primary sortas="d-wpa_supplicant">wpa_supplicant</primary>
110 </indexterm>
111 </sect2>
112
113 <sect2 role="installation">
114 <title>Installation of WPA Supplicant</title>
115
116 <para>
117 First you will need to create an initial configuration file for the
118 build process. You can read <filename>wpa_supplicant/README</filename>
119 and <filename>wpa_supplicant/defconfig</filename> for the explanation
120 of the following options as well as other options that can be used.
121 Create a build configuration file that should work for standard WiFi
122 setups by running the following command:
123 </para>
124
125<screen><userinput>cat &gt; wpa_supplicant/.config &lt;&lt; "EOF"
126<literal>CONFIG_BACKEND=file
127CONFIG_CTRL_IFACE=y
128CONFIG_DEBUG_FILE=y
129CONFIG_DEBUG_SYSLOG=y
130CONFIG_DEBUG_SYSLOG_FACILITY=LOG_DAEMON
131CONFIG_DRIVER_NL80211=y
132CONFIG_DRIVER_WEXT=y
133CONFIG_DRIVER_WIRED=y
134CONFIG_EAP_GTC=y
135CONFIG_EAP_LEAP=y
136CONFIG_EAP_MD5=y
137CONFIG_EAP_MSCHAPV2=y
138CONFIG_EAP_OTP=y
139CONFIG_EAP_PEAP=y
140CONFIG_EAP_TLS=y
141CONFIG_EAP_TTLS=y
142CONFIG_IEEE8021X_EAPOL=y
143CONFIG_IPV6=y
144CONFIG_LIBNL32=y
145CONFIG_PEERKEY=y
146CONFIG_PKCS12=y
147CONFIG_READLINE=y
148CONFIG_SMARTCARD=y
149CONFIG_WPS=y
150CFLAGS += -I/usr/include/libnl3</literal>
151EOF</userinput></screen>
152
153 <para>
154 If you wish to use <application>WPA Supplicant</application> with
155 <xref linkend="NetworkManager"/>, make sure that you have installed
156 <xref linkend="dbus"/> and <xref linkend="libxml2"/>, then add the
157 following options to the <application>WPA Supplicant</application>
158 build configuration file by running the following command:
159 </para>
160
161<screen><userinput>cat &gt;&gt; wpa_supplicant/.config &lt;&lt; "EOF"
162<literal>CONFIG_CTRL_IFACE_DBUS=y
163CONFIG_CTRL_IFACE_DBUS_NEW=y
164CONFIG_CTRL_IFACE_DBUS_INTRO=y</literal>
165EOF</userinput></screen>
166
167<screen><userinput>cd wpa_supplicant &amp;&amp;
168make BINDIR=/usr/sbin LIBDIR=/usr/lib</userinput></screen>
169
170 <para>
171 If you have installed &qt5-deps; and wish to build
172 the <application>WPA Supplicant</application> GUI program, run
173 the following commands:
174 </para>
175
176 <note>
177 <para>
178 The following directory name is labelled qt4, but
179 is compatible with &qt5-deps;.
180 </para>
181 </note>
182
183<screen><userinput>pushd wpa_gui-qt4 &amp;&amp;
184qmake wpa_gui.pro &amp;&amp;
185make &amp;&amp;
186popd</userinput></screen>
187
188 <para>
189 This package does not come with a test suite.
190 </para>
191
192 <para>
193 Now, as the <systemitem class="username">root</systemitem> user:
194 </para>
195
196<screen role="root"><userinput>install -v -m755 wpa_{cli,passphrase,supplicant} /usr/sbin/ &amp;&amp;
197install -v -m644 doc/docbook/wpa_supplicant.conf.5 /usr/share/man/man5/ &amp;&amp;
198install -v -m644 doc/docbook/wpa_{cli,passphrase,supplicant}.8 /usr/share/man/man8/</userinput></screen>
199
200 <para revision="systemd">
201 Install the <application>systemd</application> support files by
202 running the following command as the <systemitem
203 class="username">root</systemitem> user:
204 </para>
205
206<screen role="root" revision="systemd"><userinput>install -v -m644 systemd/*.service /usr/lib/systemd/system/</userinput></screen>
207
208 <para>
209 If you have built <application>WPA Supplicant</application> with
210 <application>D-Bus</application> support, you will need to install
211 <application>D-Bus</application> configuration files. Install them
212 by running the following commands as the
213 <systemitem class="username">root</systemitem> user:
214 </para>
215
216<screen role="root"><userinput>install -v -m644 dbus/fi.w1.wpa_supplicant1.service \
217 /usr/share/dbus-1/system-services/ &amp;&amp;
218install -v -d -m755 /etc/dbus-1/system.d &amp;&amp;
219install -v -m644 dbus/dbus-wpa_supplicant.conf \
220 /etc/dbus-1/system.d/wpa_supplicant.conf</userinput></screen>
221
222 <para revision="systemd">
223 Additionally, enable the <filename>wpa_supplicant.service</filename>
224 so that <application>systemd</application> can properly activate the
225 <application>D-Bus</application> service. Note that the
226 per-connection service and the D-Bus service cannot be enabled
227 at the same time. Run the following command as the
228 <systemitem class="username">root</systemitem> user:
229 </para>
230
231<screen role="root" revision="systemd"><userinput>systemctl enable wpa_supplicant</userinput></screen>
232
233 <para>
234 If you have built the <application>WPA Supplicant</application> GUI
235 program, install it by running the following commands as the
236 <systemitem class="username">root</systemitem> user:
237 </para>
238
239<screen role="root"><userinput>install -v -m755 wpa_gui-qt4/wpa_gui /usr/bin/ &amp;&amp;
240install -v -m644 doc/docbook/wpa_gui.8 /usr/share/man/man8/ &amp;&amp;
241install -v -m644 wpa_gui-qt4/wpa_gui.desktop /usr/share/applications/ &amp;&amp;
242install -v -m644 wpa_gui-qt4/icons/wpa_gui.svg /usr/share/pixmaps/</userinput></screen>
243
244 <note>
245 <para>
246 You will need to restart the system <application>D-Bus</application> daemon
247 before you can use the <application>WPA Supplicant</application>
248 <application>D-Bus</application> interface.
249 </para>
250 </note>
251
252 <xi:include xmlns:xi="http://www.w3.org/2001/XInclude"
253 href="../../xincludes/update-desktop-database.xml"/>
254
255 </sect2>
256
257 <sect2 role="configuration">
258 <title>Configuring wpa_supplicant</title>
259
260 <sect3 id="wpa_supplicant-config">
261 <title>Config File</title>
262
263 <para revision="sysv">
264 <filename>/etc/sysconfig/wpa_supplicant-*.conf</filename>
265 </para>
266
267 <para revision="systemd">
268 <filename>/etc/wpa_supplicant/wpa_supplicant-*.conf</filename>
269 </para>
270
271 <indexterm zone="wpa_supplicant wpa_supplicant-config" revision="sysv">
272 <primary
273 sortas="e-etc-sysconfig-wpa_supplicant-star.conf">/etc/sysconfig/wpa_supplicant-*.conf</primary>
274 </indexterm>
275
276 <indexterm zone="wpa_supplicant wpa_supplicant-config" revision="systemd">
277 <primary
278 sortas="e-etc-wpa_supplicant-wpa_supplicant-star.conf">/etc/wpa_supplicant/wpa_supplicant-*.conf</primary>
279 </indexterm>
280
281 </sect3>
282
283 <sect3>
284 <title>Configuration Information</title>
285
286 <para>
287 To connect to an access point that uses a password, you need to put
288 the pre-shared key in
289 <phrase revision="sysv">
290 <filename>
291 /etc/sysconfig/wpa_supplicant-<replaceable>wifi0</replaceable>.conf</filename>.
292 </phrase>
293 <phrase revision="systemd">
294 <filename>
295 /etc/wpa_supplicant/wpa_supplicant-<replaceable>wifi0</replaceable>.conf</filename>.
296 </phrase>
297 SSID is the string that the access point/router transmits to
298 identify itself. Run the following command as the
299 <systemitem class="username">root</systemitem> user:
300 </para>
301
302<screen role="nodump" revision="sysv"><userinput>wpa_passphrase <replaceable>SSID</replaceable> <replaceable>SECRET_PASSWORD</replaceable> &gt; /etc/sysconfig/wpa_supplicant-<replaceable>wifi0</replaceable>.conf</userinput></screen>
303
304<screen role="nodump" revision="systemd"><userinput>install -v -dm755 /etc/wpa_supplicant &amp;&amp;
305wpa_passphrase <replaceable>SSID</replaceable> <replaceable>SECRET_PASSWORD</replaceable> &gt; /etc/wpa_supplicant/wpa_supplicant-<replaceable>wifi0</replaceable>.conf</userinput></screen>
306
307 <para>
308 <phrase revision="sysv">
309 <filename>
310 /etc/sysconfig/wpa_supplicant-<replaceable>wifi0</replaceable>.conf
311 </filename>
312 </phrase>
313 <phrase revision="systemd">
314 <filename>
315 /etc/wpa_supplicant/wpa_supplicant-<replaceable>wifi0</replaceable>.conf
316 </filename>
317 </phrase>
318 can hold the details of several access points. When
319 <command>wpa_supplicant</command> is started, it will scan for the
320 SSIDs it can see and choose the appropriate password to connect.
321 </para>
322
323 <para>
324 If you want to connect to an access point that isn't password
325 protected, put an entry like this in
326 <phrase revision="sysv">
327 <filename>
328/etc/sysconfig/wpa_supplicant-<replaceable>wifi0</replaceable>.conf</filename>.
329 </phrase>
330 <phrase revision="systemd">
331 <filename>
332/etc/wpa_supplicant/wpa_supplicant-<replaceable>wifi0</replaceable>.conf</filename>.
333 </phrase>
334 Replace "Some-SSID" with the SSID of the access point/router.
335 </para>
336
337<screen>network={
338 ssid="<replaceable>Some-SSID</replaceable>"
339 key_mgmt=NONE
340}</screen>
341
342 <para>
343 Connecting to a new access point that is not in the configuration
344 file can be accomplished manually via the command line or GUI, but it
345 must be done via a privileged user. To do that, add the following to
346 the configuration file:
347 </para>
348
349<screen>ctrl_interface=DIR=/run/wpa_supplicant GROUP=&lt;privileged group&gt;
350update_config=1</screen>
351
352 <para>
353 Replace the &lt;privileged group&gt; above with a system group where
354 members have the ability to connect to a wireless access point.
355 </para>
356
357 <para>
358 There are many options that you could use to tweak how you connect
359 to each access point. They are described in some detail in the
360 <filename>wpa_supplicant/wpa_supplicant.conf</filename> file in the
361 source tree.
362 </para>
363
364 </sect3>
365
366 <sect3>
367 <title>Connecting to an Access Point</title>
368
369 <para id="wpa-service" revision="sysv">
370 If you want to configure network interfaces at boot using
371 <command>wpa_supplicant</command>, you need to install the
372 <filename>/lib/services/wpa</filename> script
373 included in <xref linkend="bootscripts"/> package:
374 </para>
375
376<screen role="root" revision="sysv"><userinput>make install-service-wpa</userinput></screen>
377
378 <indexterm zone="wpa_supplicant wpa-service" revision="sysv">
379 <primary sortas="f-wpa">wpa</primary>
380 </indexterm>
381
382 <para revision="sysv">
383 If your router/access point uses DHCP to allocate IP addresses, you
384 can install <xref linkend="dhcp"/> client and use it to
385 automatically obtain network addresses. Create the
386 <filename>/etc/sysconfig/ifconfig-<replaceable>wifi0</replaceable>
387 </filename> by running the following command as the
388 <systemitem class="username">root</systemitem> user:
389 </para>
390
391<screen role="root" revision="sysv"><userinput>cat &gt; /etc/sysconfig/ifconfig.<replaceable>wifi0</replaceable> &lt;&lt; "EOF"
392<literal>ONBOOT="yes"
393IFACE="<replaceable>wlan0</replaceable>"
394SERVICE="wpa"
395
396# Additional arguments to wpa_supplicant
397WPA_ARGS=""
398
399WPA_SERVICE="dhclient"
400DHCP_START=""
401DHCP_STOP=""
402
403# Set PRINTIP="yes" to have the script print
404# the DHCP assigned IP address
405PRINTIP="no"
406
407# Set PRINTALL="yes" to print the DHCP assigned values for
408# IP, SM, DG, and 1st NS. This requires PRINTIP="yes".
409PRINTALL="no"</literal>
410EOF</userinput></screen>
411
412 <para revision="sysv">
413 If you prefer <xref linkend="dhcpcd"/> instead of
414 <xref linkend="dhcp"/> client, then create the
415 <filename>/etc/sysconfig/ifconfig-<replaceable>wifi0</replaceable>
416 </filename> by running the following command as the
417 <systemitem class="username">root</systemitem> user:
418 </para>
419
420<screen role="root" revision="sysv"><userinput>cat &gt; /etc/sysconfig/ifconfig.<replaceable>wifi0</replaceable> &lt;&lt; "EOF"
421<literal>ONBOOT="yes"
422IFACE="<replaceable>wlan0</replaceable>"
423SERVICE="wpa"
424
425# Additional arguments to wpa_supplicant
426WPA_ARGS=""
427
428WPA_SERVICE="dhcpcd"
429DHCP_START="-b -q <replaceable>&lt;insert appropriate start options here&gt;</replaceable>"
430DHCP_STOP="-k <replaceable>&lt;insert additional stop options here&gt;</replaceable>"</literal>
431EOF</userinput></screen>
432
433 <para revision="sysv">
434 Alternatively, if you use static addresses on your local network,
435 then create the
436 <filename>/etc/sysconfig/ifconfig-<replaceable>wifi0</replaceable>
437 </filename> by running the following command as the
438 <systemitem class="username">root</systemitem> user:
439 </para>
440
441<screen role="root" revision="sysv"><userinput>cat &gt; /etc/sysconfig/ifconfig.<replaceable>wifi0</replaceable> &lt;&lt; "EOF"
442<literal>ONBOOT="yes"
443IFACE="<replaceable>wlan0</replaceable>"
444SERVICE="wpa"
445
446# Additional arguments to wpa_supplicant
447WPA_ARGS=""
448
449WPA_SERVICE="ipv4-static"
450IP="192.168.1.1"
451GATEWAY="192.168.1.2"
452PREFIX="24"
453BROADCAST="192.168.1.255"</literal>
454EOF</userinput></screen>
455
456 <para revision="systemd">
457 There are 3 types of <application>systemd</application> units
458 that were installed:
459 </para>
460
461 <itemizedlist spacing="compact" revision="systemd">
462 <listitem>
463 <para>
464 wpa_supplicant@.service
465 </para>
466 </listitem>
467 <listitem>
468 <para>
469 wpa_supplicant-nl80211@.service
470 </para>
471 </listitem>
472 <listitem>
473 <para>
474 wpa_supplicant-wired@.service
475 </para>
476 </listitem>
477 </itemizedlist>
478
479 <para revision="systemd">
480 The only difference between 3 of them is what driver
481 is used for connecting (-D option). The first one uses
482 the default driver, the second one uses the nl80211
483 driver and the third one uses the wired driver.
484 </para>
485
486 <para>
487 You can connect to the wireless access point by
488 running the following command as the
489 <systemitem class="username">root</systemitem> user:
490 </para>
491
492<screen role="root" revision="sysv"><userinput>ifup <replaceable>wifi0</replaceable></userinput></screen>
493
494 <para revision="sysv">
495 Replace <replaceable>wlan0</replaceable> with the correct
496 wireless interface and <replaceable>wifi0</replaceable>
497 with desired name for the configuration file. Please note
498 that <filename>wpa_supplicant-*.conf</filename> and
499 <filename>ifconfig.*</filename> configuration files need
500 to have identical names, ie both contain
501 <replaceable>wifi0</replaceable> in their name.
502 </para>
503
504<screen role="root" revision="systemd"><userinput>systemctl start wpa_supplicant@<replaceable>wlan0</replaceable></userinput></screen>
505
506 <para revision="systemd">
507 To connect to the wireless access point at
508 boot, simply enable the appropriate
509 <command>wpa_supplicant</command> service
510 by running the following command as the
511 <systemitem class="username">root</systemitem> user:
512 </para>
513
514<screen role="root" revision="systemd"><userinput>systemctl enable wpa_supplicant@<replaceable>wlan0</replaceable></userinput></screen>
515
516 <para revision="systemd">
517 Depending on your setup, you can replace the
518 <filename>wpa_supplicant@.service</filename>
519 with any other listed above.
520 </para>
521
522 <para revision="systemd">
523 To assign a network address to your wireless interface, consult the
524 <ulink url="&lfs-root;/chapter09/network.html">General Network Configuration</ulink>
525 page in LFS.
526 </para>
527
528 </sect3>
529
530 </sect2>
531
532 <sect2 role="content">
533 <title>Contents</title>
534
535 <segmentedlist>
536 <segtitle>Installed Programs</segtitle>
537 <segtitle>Installed Libraries</segtitle>
538 <segtitle>Installed Directories</segtitle>
539
540 <seglistitem>
541 <seg>
542 wpa_gui, wpa_supplicant, wpa_passphrase and wpa_cli
543 </seg>
544 <seg>
545 None
546 </seg>
547 <seg>
548 None
549 </seg>
550 </seglistitem>
551 </segmentedlist>
552
553 <variablelist>
554 <bridgehead renderas="sect3">Short Descriptions</bridgehead>
555 <?dbfo list-presentation="list"?>
556 <?dbhtml list-presentation="table"?>
557
558 <varlistentry id="wpa_gui">
559 <term><command>wpa_gui</command></term>
560 <listitem>
561 <para>
562 is a graphical frontend program for interacting with
563 <application>wpa_supplicant</application>
564 </para>
565 <indexterm zone="wpa_supplicant wpa_gui">
566 <primary sortas="b-wpa_gui">wpa_gui</primary>
567 </indexterm>
568 </listitem>
569 </varlistentry>
570
571 <varlistentry id="wpa_supplicant-prog">
572 <term><command>wpa_supplicant</command></term>
573 <listitem>
574 <para>
575 is a daemon that can connect to a password protected wireless
576 access point
577 </para>
578 <indexterm zone="wpa_supplicant wpa_supplicant-prog">
579 <primary sortas="b-wpa_supplicant">wpa_supplicant</primary>
580 </indexterm>
581 </listitem>
582 </varlistentry>
583
584 <varlistentry id="wpa_passphrase">
585 <term><command>wpa_passphrase</command></term>
586 <listitem>
587 <para>
588 takes an SSID and a password and generates a simple
589 configuration that <command>wpa_supplicant</command> can
590 understand
591 </para>
592 <indexterm zone="wpa_supplicant wpa_passphrase">
593 <primary sortas="b-wpa_passphrase">wpa_passphrase</primary>
594 </indexterm>
595 </listitem>
596 </varlistentry>
597
598 <varlistentry id="wpa_cli">
599 <term><command>wpa_cli</command></term>
600 <listitem>
601 <para>
602 is a command line interface used to control a running
603 <command>wpa_supplicant</command> daemon
604 </para>
605 <indexterm zone="wpa_supplicant wpa_cli">
606 <primary sortas="b-wpa_cli">wpa_cli</primary>
607 </indexterm>
608 </listitem>
609 </varlistentry>
610
611 </variablelist>
612
613 </sect2>
614
615</sect1>
Note: See TracBrowser for help on using the repository browser.