Print this page
| Split |
Close |
| Expand all |
| Collapse all |
--- old/usr/src/man/man1/zlogin.1
+++ new/usr/src/man/man1/zlogin.1
1 1 '\" te
2 2 .\" Copyright (c) 2006, Sun Microsystems, Inc. All Rights Reserved
3 3 .\" The contents of this file are subject to the terms of the Common
4 4 .\" Development and Distribution License (the "License"). You may not use this
5 5 .\" file except in compliance with the License.
6 6 .\" You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE or
7 7 .\" http://www.opensolaris.org/os/licensing. See the License for the specific
8 8 .\" language governing permissions and limitations under the License.
9 9 .\" When distributing Covered Code, include this CDDL HEADER in each file and
10 10 .\" include the License file at usr/src/OPENSOLARIS.LICENSE. If applicable,
11 11 .\" add the following below this CDDL HEADER, with the fields enclosed by
12 12 .\" brackets "[]" replaced with your own identifying information:
13 13 .\" Portions Copyright [yyyy] [name of copyright owner]
14 14 .\" Copyright 2013 DEY Storage Systems, Inc.
15 15 .\" Copyright (c) 2014 Gary Mills
16 16 .\" Copyright (c) 2015, Joyent, Inc. All Rights Reserved
17 17 .\" Copyright 2015 Nexenta Systems, Inc. All rights reserved.
18 18 .TH ZLOGIN 1 "Mar 30, 2015"
19 19 .SH NAME
20 20 zlogin \- enter a zone
21 21 .SH SYNOPSIS
22 22 .LP
23 23 .nf
24 24 \fBzlogin\fR [\fB-dCEINQ\fR] [\fB-e\fR \fIc\fR] [\fB-l\fR \fIusername\fR] \fIzonename\fR
25 25 .fi
26 26
27 27 .LP
28 28 .nf
29 29 \fBzlogin\fR [\fB-inEQS\fR] [\fB-e\fR \fIc\fR] [\fB-l\fR \fIusername\fR] \fIzonename\fR \fIutility\fR
30 30 [\fIargument\fR]...
31 31 .fi
32 32
33 33 .SH DESCRIPTION
34 34 .LP
35 35 The \fBzlogin\fR utility is used by the administrator to enter an operating
36 36 system zone. Only a superuser operating in the global system zone can use this
37 37 utility.
38 38 .sp
39 39 .LP
40 40 \fBzlogin\fR operates in one of four modes:
41 41 .sp
42 42 .ne 2
43 43 .na
44 44 \fBInteractive Mode\fR
45 45 .ad
46 46 .RS 24n
47 47 If no utility argument is given or if the \fB-i\fR option is specified, and the
48 48 stdin file descriptor for the \fBzlogin\fR process is a tty device, \fBzlogin\fR
49 49 operates in \fBinteractive mode\fR. In this mode, \fBzlogin\fR creates a new
50 50 pseudo terminal for use within the login session. Programs requiring a tty
51 51 device, for example, \fBvi\fR(1), work properly in this mode. In this mode,
52 52 \fBzlogin\fR invokes \fBlogin\fR(1) to provide a suitable login session.
53 53 .RE
54 54
55 55 .sp
56 56 .ne 2
57 57 .na
58 58 \fBNon-Interactive Mode\fR
59 59 .ad
60 60 .RS 24n
61 61 If a utility is specified and the \fB-i\fR option is not specified, \fBzlogin\fR
62 62 operates in \fBnon-interactive mode\fR. This mode can be useful for script
63 63 authors since stdin, stdout, and stderr are preserved and the exit status of
64 64 \fIutility\fR is returned upon termination. In this mode, \fBzlogin\fR invokes
65 65 \fBsu\fR(1M) in order to set up the user's environment and to provide a login
66 66 environment.
67 67 .sp
68 68 The specified command is passed as a string and interpreted by a shell running
69 69 in the non-global zone. See \fBrsh\fR(1).
70 70 .RE
71 71
72 72 .sp
73 73 .ne 2
74 74 .na
75 75 \fBConsole Mode\fR
76 76 .ad
77 77 .RS 24n
78 78 If the \fB-C\fR option is specified, the user is connected to the zone console
79 79 device and \fBzlogin\fR operates in \fBconsole mode\fR. The zone console is
80 80 available once the zone is in the installed state. Connections to the console
81 81 are persistent across reboot of the zone.
82 82 .RE
83 83
84 84 .sp
85 85 .ne 2
86 86 .na
87 87 \fBStandalone-processs Interactive Mode\fR
88 88 .ad
89 89 .RS 24n
90 90 If the \fB-I\fR option is specified the user is connected to the zone's stdin,
91 91 stdout and stderr \fBzfd(7D)\fR devices.
92 92 .RE
93 93
94 94 .SH OPTIONS
95 95 .LP
96 96 The following options are supported:
97 97 .sp
98 98 .ne 2
99 99 .na
100 100 \fB\fB-C\fR\fR
101 101 .ad
102 102 .RS 15n
103 103 Connects to the zone console.
104 104 .RE
105 105
106 106 .sp
107 107 .ne 2
108 108 .na
109 109 \fB\fB-d\fR\fR
110 110 .ad
111 111 .RS 15n
112 112 Disconnect from the console when the zone halts. This option may only be used
113 113 if the \fB-C\fR option is specified.
114 114 .RE
115 115
116 116 .sp
117 117 .ne 2
118 118 .na
119 119 \fB\fB-e\fR \fIc\fR\fR
120 120 .ad
121 121 .RS 15n
122 122 Specifies a different escape character, \fIc\fR, for the key sequence used to
123 123 access extended functions and to disconnect from the login. The default escape
124 124 character is the tilde (\fB~\fR).
125 125 .RE
126 126
127 127 .sp
128 128 .ne 2
129 129 .na
130 130 \fB\fB-E\fR\fR
131 131 .ad
132 132 .RS 15n
133 133 Disables the ability to access extended functions or to disconnect from the
134 134 login by using the escape sequence character.
135 135 .RE
136 136
137 137 .sp
138 138 .ne 2
139 139 .na
140 140 \fB\fB-i\fR\fR
141 141 .ad
142 142 .RS 15n
143 143 Forces interactive mode when a utility argument is specified.
144 144 .RE
145 145
146 146 .sp
147 147 .ne 2
148 148 .na
149 149 \fB\fB-I\fR\fR
150 150 .ad
151 151 .RS 15n
152 152 Connects to the zone's \fBzfd(7D)\fR devices.
153 153 .RE
154 154
155 155 .sp
156 156 .sp
157 157 .ne 2
158 158 .na
159 159 \fB\fB-l\fR \fIusername\fR\fR
160 160 .ad
161 161 .RS 15n
162 162 Specifies a different \fIusername\fR for the zone login. If you do not use this
163 163 option, the zone username used is "root". This option is invalid if the
164 164 \fB-C\fR option is specified.
165 165 .RE
166 166
167 167 .sp
168 168 .ne 2
169 169 .na
170 170 \fB-n\fR
171 171 .ad
172 172 .RS 15n
173 173 Redirect the input of \fBzlogin\fR to \fB/dev/null\fR.
174 174 This option is useful when the command running in the local zone
175 175 and the shell which invokes \fBzlogin\fR both read from standard input.
176 176 .RE
177 177
178 178 .sp
179 179 .ne 2
180 180 .na
181 181 \fB-N\fR
182 182 .ad
183 183 .RS 15n
184 184 Nohup. This may only be used with the -I option to avoid sending EOF to the zfd
185 185 device when zlogin's stdin receives EOF. It can also be toggled by sending
186 186 \fBSIGUSR1\fR to an attached zlogin process.
187 187 .RE
188 188
189 189 .sp
190 190 .ne 2
191 191 .na
192 192 \fB-Q\fR
193 193 .ad
194 194 .RS 15n
195 195 Specifies quiet mode operation. In quiet mode, extra messages indicating the
196 196 the function of \fBzlogin\fR will not be displayed, giving the possibility
197 197 to present the appearance that the command is running locally rather than
198 198 in another zone.
199 199 .RE
200 200
201 201 .sp
202 202 .ne 2
203 203 .na
204 204 \fB\fB-S\fR\fR
205 205 .ad
206 206 .RS 15n
207 207 "Safe" login mode. \fBzlogin\fR does minimal processing and does not invoke
208 208 \fBlogin\fR(1) or \fBsu\fR(1M). The \fB-S\fR option can not be used if a
209 209 username is specified through the \fB-l\fR option, and cannot be used with
210 210 console logins. This mode should only be used to recover a damaged zone when
211 211 other forms of login have become impossible.
212 212 .RE
213 213
214 214 .SS "Escape Sequences"
215 215 .LP
216 216 Lines that you type that start with the tilde character (\fB~\fR) are "escape
217 217 sequences". The escape character can be changed using the \fB-e\fR option.
218 218 .sp
219 219 .ne 2
220 220 .na
221 221 \fB\fB~.\fR\fR
222 222 .ad
223 223 .RS 6n
224 224 Disconnects from the zone. This is not the same as a logout, because the local
225 225 host breaks the connection with no warning to the zone's end.
226 226 .RE
227 227
228 228 .SH SECURITY
229 229 .LP
230 230 Once a process has been placed in a zone other than the global zone, the
231 231 process cannot change zone again, nor can any of its children.
232 232 .SH OPERANDS
233 233 .LP
234 234 The following operands are supported:
235 235 .sp
236 236 .ne 2
237 237 .na
238 238 \fB\fIzonename\fR\fR
239 239 .ad
240 240 .RS 15n
241 241 The name of the zone to be entered.
242 242 .RE
243 243
244 244 .sp
245 245 .ne 2
246 246 .na
247 247 \fB\fIutility\fR\fR
248 248 .ad
249 249 .RS 15n
250 250 The utility to be run in the specified zone.
251 251 .RE
252 252
253 253 .sp
254 254 .ne 2
255 255 .na
256 256 \fB\fIargument...\fR\fR
257 257 .ad
258 258 .RS 15n
259 259 Arguments passed to the utility.
260 260 .RE
261 261
262 262 .SH EXIT STATUS
263 263 .LP
264 264 In interactive and non-interactive modes, the \fBzlogin\fR utility exits when
265 265 the command or shell in the non-global zone exits. In non-interactive mode, the
266 266 exit status of the remote program is returned as the exit status of
267 267 \fBzlogin\fR. In interactive mode and console login mode, the exit status is
268 268 not returned. \fBzlogin\fR returns a \fB0\fR exit status as long as no
269 269 connection-related error occurred.
270 270 .sp
271 271 .LP
272 272 In all modes, in the event that a connection to the zone cannot be established,
273 273 the connection fails unexpectedly, or the user is lacking sufficient privilege
274 274 to perform the requested operation, \fBzlogin\fR exits with status \fB1\fR.
275 275 .sp
276 276 .LP
277 277 To summarize, the following exit values are returned:
278 278 .sp
279 279 .ne 2
280 280 .na
281 281 \fB\fB0\fR\fR
282 282 .ad
283 283 .RS 7n
284 284 Successful entry.
285 285 .RE
286 286
287 287 .sp
288 288 .ne 2
289 289 .na
290 290 \fB\fB1\fR\fR
291 291 .ad
292 292 .RS 7n
293 293 Permission denied, or failure to enter the zone.
294 294 .RE
295 295
296 296 .sp
297 297 .ne 2
298 298 .na
299 299 \fBAny\fR
300 300 .ad
301 301 .RS 7n
302 302 Return code from utility, or from \fBsu\fR(1M) if operating in non-interactive
303 303 mode.
304 304 .RE
305 305
306 306 .SH ATTRIBUTES
307 307 .LP
308 308 See \fBattributes\fR(5) for descriptions of the following attributes:
309 309 .sp
310 310
311 311 .sp
312 312 .TS
313 313 box;
314 314 c | c
315 315 l | l .
316 316 ATTRIBUTE TYPE ATTRIBUTE VALUE
317 317 _
318 318 Interface Stability Evolving
319 319 .TE
320 320
321 321 .SH SEE ALSO
322 322 .LP
323 323 \fBlogin\fR(1), \fBrsh\fR(1), \fBvi\fR(1), \fBsu\fR(1M), \fBzoneadm\fR(1M),
324 324 \fBzonecfg\fR(1M), \fBattributes\fR(5), \fBzones\fR(5)
325 325 .SH NOTES
326 326 .LP
327 327 \fBzlogin\fR fails if its open files or any portion of its address space
328 328 corresponds to an NFS file. This includes the executable itself or the shared
329 329 libraries.
|
↓ open down ↓ |
329 lines elided |
↑ open up ↑ |
XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX