]> CyberLeo.Net >> Repos - FreeBSD/releng/9.2.git/blob - contrib/wpa/wpa_supplicant/doc/docbook/wpa_cli.8
- Copy stable/9 to releng/9.2 as part of the 9.2-RELEASE cycle.
[FreeBSD/releng/9.2.git] / contrib / wpa / wpa_supplicant / doc / docbook / wpa_cli.8
1 .\" This manpage has been automatically generated by docbook2man 
2 .\" from a DocBook document.  This tool can be found at:
3 .\" <http://shell.ipoline.com/~elmert/comp/docbook2X/> 
4 .\" Please send any bug reports, improvements, comments, patches, 
5 .\" etc. to Steve Cheng <steve@ggi-project.org>.
6 .TH "WPA_CLI" "8" "07 September 2010" "" ""
7
8 .SH NAME
9 wpa_cli \- WPA command line client
10 .SH SYNOPSIS
11
12 \fBwpa_cli\fR [ \fB-p \fIpath to ctrl sockets\fB\fR ] [ \fB-i \fIifname\fB\fR ] [ \fB-hvB\fR ] [ \fB-a \fIaction file\fB\fR ] [ \fB-P \fIpid file\fB\fR ] [ \fB\fIcommand ...\fB\fR ]
13
14 .SH "OVERVIEW"
15 .PP
16 wpa_cli is a text-based frontend program for interacting
17 with wpa_supplicant. It is used to query current status, change
18 configuration, trigger events, and request interactive user
19 input.
20 .PP
21 wpa_cli can show the current authentication status, selected
22 security mode, dot11 and dot1x MIBs, etc. In addition, it can
23 configure some variables like EAPOL state machine parameters and
24 trigger events like reassociation and IEEE 802.1X
25 logoff/logon. wpa_cli provides a user interface to request
26 authentication information, like username and password, if these
27 are not included in the configuration. This can be used to
28 implement, e.g., one-time-passwords or generic token card
29 authentication where the authentication is based on a
30 challenge-response that uses an external device for generating the
31 response.
32 .PP
33 The control interface of wpa_supplicant can be configured to
34 allow non-root user access (ctrl_interface GROUP= parameter in the
35 configuration file). This makes it possible to run wpa_cli with a
36 normal user account.
37 .PP
38 wpa_cli supports two modes: interactive and command
39 line. Both modes share the same command set and the main
40 difference is in interactive mode providing access to unsolicited
41 messages (event messages, username/password requests).
42 .PP
43 Interactive mode is started when wpa_cli is executed without
44 including the command as a command line parameter. Commands are
45 then entered on the wpa_cli prompt. In command line mode, the same
46 commands are entered as command line arguments for wpa_cli.
47 .SH "INTERACTIVE AUTHENTICATION PARAMETERS REQUEST"
48 .PP
49 When wpa_supplicant need authentication parameters, like
50 username and password, which are not present in the configuration
51 file, it sends a request message to all attached frontend programs,
52 e.g., wpa_cli in interactive mode. wpa_cli shows these requests
53 with "CTRL-REQ-<type>-<id>:<text>"
54 prefix. <type> is IDENTITY, PASSWORD, or OTP
55 (one-time-password). <id> is a unique identifier for the
56 current network. <text> is description of the request. In
57 case of OTP request, it includes the challenge from the
58 authentication server.
59 .PP
60 The reply to these requests can be given with
61 \fBidentity\fR, \fBpassword\fR, and
62 \fBotp\fR commands. <id> needs to be copied from
63 the matching request. \fBpassword\fR and
64 \fBotp\fR commands can be used regardless of whether
65 the request was for PASSWORD or OTP. The main difference between these
66 two commands is that values given with \fBpassword\fR are
67 remembered as long as wpa_supplicant is running whereas values given
68 with \fBotp\fR are used only once and then forgotten,
69 i.e., wpa_supplicant will ask frontend for a new value for every use.
70 This can be used to implement one-time-password lists and generic token
71 card -based authentication.
72 .PP
73 Example request for password and a matching reply:
74 .sp
75 .RS
76
77 .nf
78 CTRL-REQ-PASSWORD-1:Password needed for SSID foobar
79 > password 1 mysecretpassword
80 .fi
81 .RE
82 .PP
83 Example request for generic token card challenge-response:
84 .sp
85 .RS
86
87 .nf
88 CTRL-REQ-OTP-2:Challenge 1235663 needed for SSID foobar
89 > otp 2 9876
90 .fi
91 .RE
92 .SH "COMMAND ARGUMENTS"
93 .TP
94 \fB-p path\fR
95 Change the path where control sockets should
96 be found.
97 .TP
98 \fB-i ifname\fR
99 Specify the interface that is being
100 configured.  By default, choose the first interface found with
101 a control socket in the socket path.
102 .TP
103 \fB-h\fR
104 Help.  Show a usage message.
105 .TP
106 \fB-v\fR
107 Show version information.
108 .TP
109 \fB-B\fR
110 Run as a daemon in the background.
111 .TP
112 \fB-a file\fR
113 Run in daemon mode executing the action file
114 based on events from wpa_supplicant.  The specified file will
115 be executed with the first argument set to interface name and
116 second to "CONNECTED" or "DISCONNECTED" depending on the event.
117 This can be used to execute networking tools required to configure
118 the interface.
119
120 Additionally, three environmental variables are available to
121 the file: WPA_CTRL_DIR, WPA_ID, and WPA_ID_STR. WPA_CTRL_DIR
122 contains the absolute path to the ctrl_interface socket. WPA_ID
123 contains the unique network_id identifier assigned to the active
124 network, and WPA_ID_STR contains the content of the id_str option.
125 .TP
126 \fB-P file\fR
127 Set the location of the PID
128 file.
129 .TP
130 \fBcommand\fR
131 Run a command.  The available commands are
132 listed in the next section.
133 .SH "COMMANDS"
134 .PP
135 The following commands are available:
136 .TP
137 \fBstatus\fR
138 get current WPA/EAPOL/EAP status
139 .TP
140 \fBmib\fR
141 get MIB variables (dot1x, dot11)
142 .TP
143 \fBhelp\fR
144 show this usage help
145 .TP
146 \fBinterface [ifname]\fR
147 show interfaces/select interface
148 .TP
149 \fBlevel <debug level>\fR
150 change debug level
151 .TP
152 \fBlicense\fR
153 show full wpa_cli license
154 .TP
155 \fBlogoff\fR
156 IEEE 802.1X EAPOL state machine logoff
157 .TP
158 \fBlogon\fR
159 IEEE 802.1X EAPOL state machine logon
160 .TP
161 \fBset\fR
162 set variables (shows list of variables when run without arguments)
163 .TP
164 \fBpmksa\fR
165 show PMKSA cache
166 .TP
167 \fBreassociate\fR
168 force reassociation
169 .TP
170 \fBreconfigure\fR
171 force wpa_supplicant to re-read its configuration file
172 .TP
173 \fBpreauthenticate <BSSID>\fR
174 force preauthentication
175 .TP
176 \fBidentity <network id> <identity>\fR
177 configure identity for an SSID
178 .TP
179 \fBpassword <network id> <password>\fR
180 configure password for an SSID
181 .TP
182 \fBpin <network id> <pin>\fR
183 configure pin for an SSID
184 .TP
185 \fBotp <network id> <password>\fR
186 configure one-time-password for an SSID
187 .TP
188 \fBbssid <network id> <BSSID>\fR
189 set preferred BSSID for an SSID
190 .TP
191 \fBlist_networks\fR
192 list configured networks
193 .TP
194 \fBterminate\fR
195 terminate \fBwpa_supplicant\fR
196 .TP
197 \fBquit\fR
198 exit wpa_cli
199 .SH "SEE ALSO"
200 .PP
201 \fBwpa_supplicant\fR(8)
202 .SH "LEGAL"
203 .PP
204 wpa_supplicant is copyright (c) 2003-2007,
205 Jouni Malinen <j@w1.fi> and
206 contributors.
207 All Rights Reserved.
208 .PP
209 This program is dual-licensed under both the GPL version 2
210 and BSD license. Either license may be used at your option.