Print this page
5700 add zlogin -d option to allow graceful disconnect when zone is halted
Reviewed by: Andrew Gabriel <illumos@cucumber.demon.co.uk>
Reviewed by: Jerry Jelinek <jerry.jelinek@joyent.com>
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.
↓ open down ↓ |
5 lines elided |
↑ open up ↑ |
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 -.TH ZLOGIN 1 "Jan 22, 2014"
16 +.\" Copyright 2015 Nexenta Systems, Inc. All rights reserved.
17 +.TH ZLOGIN 1 "Mar 17, 2015"
17 18 .SH NAME
18 19 zlogin \- enter a zone
19 20 .SH SYNOPSIS
20 21 .LP
21 22 .nf
22 -\fBzlogin\fR [\fB-CEQ\fR] [\fB-e\fR \fIc\fR] [\fB-l\fR \fIusername\fR] \fIzonename\fR
23 +\fBzlogin\fR [\fB-dCEQ\fR] [\fB-e\fR \fIc\fR] [\fB-l\fR \fIusername\fR] \fIzonename\fR
23 24 .fi
24 25
25 26 .LP
26 27 .nf
27 28 \fBzlogin\fR [\fB-nEQS\fR] [\fB-e\fR \fIc\fR] [\fB-l\fR \fIusername\fR] \fIzonename\fR \fIutility\fR
28 29 [\fIargument\fR]...
29 30 .fi
30 31
31 32 .SH DESCRIPTION
32 33 .sp
33 34 .LP
34 35 The \fBzlogin\fR utility is used by the administrator to enter an operating
35 36 system zone. Only a superuser operating in the global system zone can use this
36 37 utility.
37 38 .sp
38 39 .LP
39 40 \fBzlogin\fR operates in one of three modes:
40 41 .sp
41 42 .ne 2
42 43 .na
43 44 \fBInteractive Mode\fR
44 45 .ad
45 46 .RS 24n
46 47 If no utility argument is given and the stdin file descriptor for the
47 48 \fBzlogin\fR process is a tty device, \fBzlogin\fR operates in \fBinteractive
48 49 mode\fR. In this mode, \fBzlogin\fR creates a new pseudo terminal for use
49 50 within the login session. Programs requiring a tty device, for example,
50 51 \fBvi\fR(1), work properly in this mode. In this mode, \fBzlogin\fR invokes
51 52 \fBlogin\fR(1) to provide a suitable login session.
52 53 .RE
53 54
54 55 .sp
55 56 .ne 2
56 57 .na
57 58 \fBNon-Interactive Mode\fR
58 59 .ad
59 60 .RS 24n
60 61 If a utility is specified, \fBzlogin\fR operates in \fBnon-interactive mode\fR.
61 62 This mode can be useful for script authors since stdin, stdout, and stderr are
62 63 preserved and the exit status of \fIutility\fR is returned upon termination. In
63 64 this mode, \fBzlogin\fR invokes \fBsu\fR(1M) in order to set up the user's
64 65 environment and to provide a login environment.
65 66 .sp
66 67 The specified command is passed as a string and interpreted by a shell running
67 68 in the non-global zone. See \fBrsh\fR(1).
68 69 .RE
69 70
70 71 .sp
71 72 .ne 2
72 73 .na
73 74 \fBConsole Mode\fR
74 75 .ad
75 76 .RS 24n
76 77 If the \fB-C\fR option is specified, the user is connected to the zone console
77 78 device and \fBzlogin\fR operates in \fBconsole mode\fR. The zone console is
78 79 available once the zone is in the installed state. Connections to the console
79 80 are persistent across reboot of the zone.
80 81 .RE
81 82
82 83 .SH OPTIONS
83 84 .sp
84 85 .LP
↓ open down ↓ |
52 lines elided |
↑ open up ↑ |
85 86 The following options are supported:
86 87 .sp
87 88 .ne 2
88 89 .na
89 90 \fB\fB-C\fR\fR
90 91 .ad
91 92 .RS 15n
92 93 Connects to the zone console.
93 94 .RE
94 95
96 +.sp
97 +.ne 2
98 +.na
99 +\fB\fB-d\fR\fR
100 +.ad
101 +.RS 15n
102 +Disconnect from the console when the zone halts. This option may only be used
103 +if the \fB-C\fR option is specified.
104 +.RE
105 +
95 106 .sp
96 107 .ne 2
97 108 .na
98 109 \fB\fB-e\fR \fIc\fR\fR
99 110 .ad
100 111 .RS 15n
101 112 Specifies a different escape character, \fIc\fR, for the key sequence used to
102 113 access extended functions and to disconnect from the login. The default escape
103 114 character is the tilde (\fB~\fR).
104 115 .RE
105 116
106 117 .sp
107 118 .ne 2
108 119 .na
109 120 \fB\fB-E\fR\fR
110 121 .ad
111 122 .RS 15n
112 123 Disables the ability to access extended functions or to disconnect from the
113 124 login by using the escape sequence character.
114 125 .RE
115 126
116 127 .sp
117 128 .ne 2
118 129 .na
119 130 \fB\fB-l\fR \fIusername\fR\fR
120 131 .ad
121 132 .RS 15n
122 133 Specifies a different \fIusername\fR for the zone login. If you do not use this
123 134 option, the zone username used is "root". This option is invalid if the
124 135 \fB-C\fR option is specified.
125 136 .RE
126 137
127 138 .sp
128 139 .ne 2
129 140 .na
130 141 \fB-n\fR
131 142 .ad
132 143 .RS 15n
133 144 Redirect the input of \fBzlogin\fR to \fB/dev/null\fR.
134 145 This option is useful when the command running in the local zone
135 146 and the shell which invokes \fBzlogin\fR both read from standard input.
136 147 .RE
137 148
138 149 .sp
139 150 .ne 2
140 151 .na
141 152 \fB-Q\fR
142 153 .ad
143 154 .RS 15n
144 155 Specifies quiet mode operation. In quiet mode, extra messages indicating the
145 156 the function of \fBzlogin\fR will not be displayed, giving the possibility
146 157 to present the appearance that the command is running locally rather than
147 158 in another zone.
148 159 .RE
149 160
150 161 .sp
151 162 .ne 2
152 163 .na
153 164 \fB\fB-S\fR\fR
154 165 .ad
155 166 .RS 15n
156 167 "Safe" login mode. \fBzlogin\fR does minimal processing and does not invoke
157 168 \fBlogin\fR(1) or \fBsu\fR(1M). The \fB-S\fR option can not be used if a
158 169 username is specified through the \fB-l\fR option, and cannot be used with
159 170 console logins. This mode should only be used to recover a damaged zone when
160 171 other forms of login have become impossible.
161 172 .RE
162 173
163 174 .SS "Escape Sequences"
164 175 .sp
165 176 .LP
166 177 Lines that you type that start with the tilde character (\fB~\fR) are "escape
167 178 sequences". The escape character can be changed using the \fB-e\fR option.
168 179 .sp
169 180 .ne 2
170 181 .na
171 182 \fB\fB~.\fR\fR
172 183 .ad
173 184 .RS 6n
174 185 Disconnects from the zone. This is not the same as a logout, because the local
175 186 host breaks the connection with no warning to the zone's end.
176 187 .RE
177 188
178 189 .SH SECURITY
179 190 .sp
180 191 .LP
181 192 Once a process has been placed in a zone other than the global zone, the
182 193 process cannot change zone again, nor can any of its children.
183 194 .SH OPERANDS
184 195 .sp
185 196 .LP
186 197 The following operands are supported:
187 198 .sp
188 199 .ne 2
189 200 .na
190 201 \fB\fIzonename\fR\fR
191 202 .ad
192 203 .RS 15n
193 204 The name of the zone to be entered.
194 205 .RE
195 206
196 207 .sp
197 208 .ne 2
198 209 .na
199 210 \fB\fIutility\fR\fR
200 211 .ad
201 212 .RS 15n
202 213 The utility to be run in the specified zone.
203 214 .RE
204 215
205 216 .sp
206 217 .ne 2
207 218 .na
208 219 \fB\fIargument...\fR\fR
209 220 .ad
210 221 .RS 15n
211 222 Arguments passed to the utility.
212 223 .RE
213 224
214 225 .SH EXIT STATUS
215 226 .sp
216 227 .LP
217 228 In interactive and non-interactive modes, the \fBzlogin\fR utility exits when
218 229 the command or shell in the non-global zone exits. In non-interactive mode, the
219 230 exit status of the remote program is returned as the exit status of
220 231 \fBzlogin\fR. In interactive mode and console login mode, the exit status is
221 232 not returned. \fBzlogin\fR returns a \fB0\fR exit status as long as no
222 233 connection-related error occurred.
223 234 .sp
224 235 .LP
225 236 In all modes, in the event that a connection to the zone cannot be established,
226 237 the connection fails unexpectedly, or the user is lacking sufficient privilege
227 238 to perform the requested operation, \fBzlogin\fR exits with status \fB1\fR.
228 239 .sp
229 240 .LP
230 241 To summarize, the following exit values are returned:
231 242 .sp
232 243 .ne 2
233 244 .na
234 245 \fB\fB0\fR\fR
235 246 .ad
236 247 .RS 7n
237 248 Successful entry.
238 249 .RE
239 250
240 251 .sp
241 252 .ne 2
242 253 .na
243 254 \fB\fB1\fR\fR
244 255 .ad
245 256 .RS 7n
246 257 Permission denied, or failure to enter the zone.
247 258 .RE
248 259
249 260 .sp
250 261 .ne 2
251 262 .na
252 263 \fBAny\fR
253 264 .ad
254 265 .RS 7n
255 266 Return code from utility, or from \fBsu\fR(1M) if operating in non-interactive
256 267 mode.
257 268 .RE
258 269
259 270 .SH ATTRIBUTES
260 271 .sp
261 272 .LP
262 273 See \fBattributes\fR(5) for descriptions of the following attributes:
263 274 .sp
264 275
265 276 .sp
266 277 .TS
267 278 box;
268 279 c | c
269 280 l | l .
270 281 ATTRIBUTE TYPE ATTRIBUTE VALUE
271 282 _
272 283 Interface Stability Evolving
273 284 .TE
274 285
275 286 .SH SEE ALSO
276 287 .sp
277 288 .LP
278 289 \fBlogin\fR(1), \fBrsh\fR(1), \fBvi\fR(1), \fBsu\fR(1M), \fBzoneadm\fR(1M),
279 290 \fBzonecfg\fR(1M), \fBattributes\fR(5), \fBzones\fR(5)
280 291 .SH NOTES
281 292 .sp
282 293 .LP
283 294 \fBzlogin\fR fails if its open files or any portion of its address space
284 295 corresponds to an NFS file. This includes the executable itself or the shared
285 296 libraries.
↓ open down ↓ |
181 lines elided |
↑ open up ↑ |
XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX