249 lines
8.1 KiB
HTML
249 lines
8.1 KiB
HTML
|
|
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
|
|
<HTML><HEAD><TITLE>Man page of WPA_CLI</TITLE>
|
|
</HEAD><BODY>
|
|
<H1>WPA_CLI</H1>
|
|
Section: (8)<BR>Updated: 01 March 2021<BR><A HREF="#index">Index</A>
|
|
<A HREF="/cgi-bin/man/man2html">Return to Main Contents</A><HR>
|
|
|
|
<P>
|
|
<A NAME="lbAB"> </A>
|
|
<H2>NAME</H2>
|
|
|
|
wpa_cli - WPA command line client
|
|
<A NAME="lbAC"> </A>
|
|
<H2>SYNOPSIS</H2>
|
|
|
|
<P>
|
|
<B>wpa_cli</B> [ <B>-p </B><I>path to ctrl sockets</I><B></B> ] [ <B>-g </B><I>path to global ctrl_interface socket</I><B></B> ] [ <B>-i </B><I>ifname</I><B></B> ] [ <B>-hvB</B> ] [ <B>-a </B><I>action file</I><B></B> ] [ <B>-P </B><I>pid file</I><B></B> ] [ <B>-G </B><I>ping interval</I><B></B> ] [ <B></B><I>command ...</I><B></B> ]
|
|
<P>
|
|
<A NAME="lbAD"> </A>
|
|
<H2>OVERVIEW</H2>
|
|
|
|
<P>
|
|
|
|
wpa_cli is a text-based frontend program for interacting
|
|
with wpa_supplicant. It is used to query current status, change
|
|
configuration, trigger events, and request interactive user
|
|
input.
|
|
<P>
|
|
|
|
wpa_cli can show the current authentication status, selected
|
|
security mode, dot11 and dot1x MIBs, etc. In addition, it can
|
|
configure some variables like EAPOL state machine parameters and
|
|
trigger events like reassociation and IEEE 802.1X
|
|
logoff/logon. wpa_cli provides a user interface to request
|
|
authentication information, like username and password, if these
|
|
are not included in the configuration. This can be used to
|
|
implement, e.g., one-time-passwords or generic token card
|
|
authentication where the authentication is based on a
|
|
challenge-response that uses an external device for generating the
|
|
response.
|
|
<P>
|
|
|
|
The control interface of wpa_supplicant can be configured to
|
|
allow non-root user access (ctrl_interface GROUP= parameter in the
|
|
configuration file). This makes it possible to run wpa_cli with a
|
|
normal user account.
|
|
<P>
|
|
|
|
wpa_cli supports two modes: interactive and command
|
|
line. Both modes share the same command set and the main
|
|
difference is in interactive mode providing access to unsolicited
|
|
messages (event messages, username/password requests).
|
|
<P>
|
|
|
|
Interactive mode is started when wpa_cli is executed without
|
|
including the command as a command line parameter. Commands are
|
|
then entered on the wpa_cli prompt. In command line mode, the same
|
|
commands are entered as command line arguments for wpa_cli.
|
|
<A NAME="lbAE"> </A>
|
|
<H2>INTERACTIVE AUTHENTICATION PARAMETERS REQUEST</H2>
|
|
|
|
<P>
|
|
|
|
When wpa_supplicant need authentication parameters, like
|
|
username and password, which are not present in the configuration
|
|
file, it sends a request message to all attached frontend programs,
|
|
e.g., wpa_cli in interactive mode. wpa_cli shows these requests
|
|
with "CTRL-REQ-<type>-<id>:<text>"
|
|
prefix. <type> is IDENTITY, PASSWORD, or OTP
|
|
(one-time-password). <id> is a unique identifier for the
|
|
current network. <text> is description of the request. In
|
|
case of OTP request, it includes the challenge from the
|
|
authentication server.
|
|
<P>
|
|
|
|
The reply to these requests can be given with
|
|
<B>identity</B>, <B>password</B>, and
|
|
<B>otp</B> commands. <id> needs to be copied from
|
|
the matching request. <B>password</B> and
|
|
<B>otp</B> commands can be used regardless of whether
|
|
the request was for PASSWORD or OTP. The main difference between these
|
|
two commands is that values given with <B>password</B> are
|
|
remembered as long as wpa_supplicant is running whereas values given
|
|
with <B>otp</B> are used only once and then forgotten,
|
|
i.e., wpa_supplicant will ask frontend for a new value for every use.
|
|
This can be used to implement one-time-password lists and generic token
|
|
card -based authentication.
|
|
<P>
|
|
|
|
Example request for password and a matching reply:
|
|
<P>
|
|
<DL COMPACT><DT id="1"><DD>
|
|
<P>
|
|
<PRE>
|
|
CTRL-REQ-PASSWORD-1:Password needed for SSID foobar
|
|
> password 1 mysecretpassword
|
|
</PRE>
|
|
|
|
</DL>
|
|
|
|
<P>
|
|
|
|
Example request for generic token card challenge-response:
|
|
<P>
|
|
<DL COMPACT><DT id="2"><DD>
|
|
<P>
|
|
<PRE>
|
|
CTRL-REQ-OTP-2:Challenge 1235663 needed for SSID foobar
|
|
> otp 2 9876
|
|
</PRE>
|
|
|
|
</DL>
|
|
|
|
<A NAME="lbAF"> </A>
|
|
<H2>COMMAND ARGUMENTS</H2>
|
|
|
|
<DL COMPACT>
|
|
<DT id="3"><B>-p path</B><DD>
|
|
Change the path where control sockets should
|
|
be found.
|
|
<DT id="4"><B>-g control socket path</B><DD>
|
|
Connect to the global control socket at the
|
|
indicated path rather than an interface-specific control
|
|
socket.
|
|
<DT id="5"><B>-i ifname</B><DD>
|
|
Specify the interface that is being
|
|
configured. By default, choose the first interface found with
|
|
a control socket in the socket path.
|
|
<DT id="6"><B>-h</B><DD>
|
|
Help. Show a usage message.
|
|
<DT id="7"><B>-v</B><DD>
|
|
Show version information.
|
|
<DT id="8"><B>-B</B><DD>
|
|
Run as a daemon in the background.
|
|
<DT id="9"><B>-a file</B><DD>
|
|
Run in daemon mode executing the action file
|
|
based on events from wpa_supplicant. The specified file will
|
|
be executed with the first argument set to interface name and
|
|
second to "CONNECTED" or "DISCONNECTED" depending on the event.
|
|
This can be used to execute networking tools required to configure
|
|
the interface.
|
|
<P>
|
|
Additionally, three environmental variables are available to
|
|
the file: WPA_CTRL_DIR, WPA_ID, and WPA_ID_STR. WPA_CTRL_DIR
|
|
contains the absolute path to the ctrl_interface socket. WPA_ID
|
|
contains the unique network_id identifier assigned to the active
|
|
network, and WPA_ID_STR contains the content of the id_str option.
|
|
<DT id="10"><B>-P file</B><DD>
|
|
Set the location of the PID
|
|
file.
|
|
<DT id="11"><B>-G ping interval</B><DD>
|
|
Set the interval (in seconds) at which
|
|
wpa_cli pings the supplicant.
|
|
<DT id="12"><B>command</B><DD>
|
|
Run a command. The available commands are
|
|
listed in the next section.
|
|
</DL>
|
|
<A NAME="lbAG"> </A>
|
|
<H2>COMMANDS</H2>
|
|
|
|
<P>
|
|
|
|
The following commands are available:
|
|
<DL COMPACT>
|
|
<DT id="13"><B>status</B><DD>
|
|
get current WPA/EAPOL/EAP status
|
|
<DT id="14"><B>mib</B><DD>
|
|
get MIB variables (dot1x, dot11)
|
|
<DT id="15"><B>help</B><DD>
|
|
show this usage help
|
|
<DT id="16"><B>interface [ifname]</B><DD>
|
|
show interfaces/select interface
|
|
<DT id="17"><B>level <debug level></B><DD>
|
|
change debug level
|
|
<DT id="18"><B>license</B><DD>
|
|
show full wpa_cli license
|
|
<DT id="19"><B>logoff</B><DD>
|
|
IEEE 802.1X EAPOL state machine logoff
|
|
<DT id="20"><B>logon</B><DD>
|
|
IEEE 802.1X EAPOL state machine logon
|
|
<DT id="21"><B>set</B><DD>
|
|
set variables (shows list of variables when run without arguments)
|
|
<DT id="22"><B>pmksa</B><DD>
|
|
show PMKSA cache
|
|
<DT id="23"><B>reassociate</B><DD>
|
|
force reassociation
|
|
<DT id="24"><B>reconfigure</B><DD>
|
|
force wpa_supplicant to re-read its configuration file
|
|
<DT id="25"><B>preauthenticate <BSSID></B><DD>
|
|
force preauthentication
|
|
<DT id="26"><B>identity <network id> <identity></B><DD>
|
|
configure identity for an SSID
|
|
<DT id="27"><B>password <network id> <password></B><DD>
|
|
configure password for an SSID
|
|
<DT id="28"><B>pin <network id> <pin></B><DD>
|
|
configure pin for an SSID
|
|
<DT id="29"><B>otp <network id> <password></B><DD>
|
|
configure one-time-password for an SSID
|
|
<DT id="30"><B>bssid <network id> <BSSID></B><DD>
|
|
set preferred BSSID for an SSID
|
|
<DT id="31"><B>list_networks</B><DD>
|
|
list configured networks
|
|
<DT id="32"><B>terminate</B><DD>
|
|
terminate <B>wpa_supplicant</B>
|
|
<DT id="33"><B>quit</B><DD>
|
|
exit wpa_cli
|
|
</DL>
|
|
<A NAME="lbAH"> </A>
|
|
<H2>SEE ALSO</H2>
|
|
|
|
<P>
|
|
|
|
<B><A HREF="/cgi-bin/man/man2html?8+wpa_supplicant">wpa_supplicant</A></B>(8)
|
|
<A NAME="lbAI"> </A>
|
|
<H2>LEGAL</H2>
|
|
|
|
<P>
|
|
|
|
wpa_supplicant is copyright (c) 2003-2019,
|
|
Jouni Malinen <j@w1.fi> and
|
|
contributors.
|
|
All Rights Reserved.
|
|
<P>
|
|
|
|
This program is licensed under the BSD license (the one with
|
|
advertisement clause removed).
|
|
<P>
|
|
|
|
<HR>
|
|
<A NAME="index"> </A><H2>Index</H2>
|
|
<DL>
|
|
<DT id="34"><A HREF="#lbAB">NAME</A><DD>
|
|
<DT id="35"><A HREF="#lbAC">SYNOPSIS</A><DD>
|
|
<DT id="36"><A HREF="#lbAD">OVERVIEW</A><DD>
|
|
<DT id="37"><A HREF="#lbAE">INTERACTIVE AUTHENTICATION PARAMETERS REQUEST</A><DD>
|
|
<DT id="38"><A HREF="#lbAF">COMMAND ARGUMENTS</A><DD>
|
|
<DT id="39"><A HREF="#lbAG">COMMANDS</A><DD>
|
|
<DT id="40"><A HREF="#lbAH">SEE ALSO</A><DD>
|
|
<DT id="41"><A HREF="#lbAI">LEGAL</A><DD>
|
|
</DL>
|
|
<HR>
|
|
This document was created by
|
|
<A HREF="/cgi-bin/man/man2html">man2html</A>,
|
|
using the manual pages.<BR>
|
|
Time: 00:06:18 GMT, March 31, 2021
|
|
</BODY>
|
|
</HTML>
|