zlogin [-dCEINQ] [-e c] [-l username] zonename
zlogin [-inEQS] [-e c] [-l username] zonename utility
The zlogin utility is used by the administrator to enter an operating
system zone. Only a superuser operating in the global system zone can use this
zlogin operates in one of four modes:
If no utility argument is given or if the -i
option is specified, and the stdin file descriptor for the zlogin
process is a tty device, zlogin
operates in interactive mode
this mode, zlogin
creates a new pseudo terminal for use within the
login session. Programs requiring a tty device, for example, vi(1)
work properly in this mode. In this mode, zlogin
to provide a suitable login session.
If a utility is specified and the -i
option is not
operates in non-interactive mode
. This mode
can be useful for script authors since stdin, stdout, and stderr are preserved
and the exit status of utility
is returned upon termination. In this
in order to set up the user's
environment and to provide a login environment.
The specified command is passed as a string and interpreted by a
shell running in the non-global zone. See rsh(1).
If the -C option is specified, the user is
connected to the zone console device and zlogin operates in console
mode. The zone console is available once the zone is in the installed
state. Connections to the console are persistent across reboot of the
Standalone-process Interactive Mode
If the -I option is specified the user is
connected to the zone's stdin, stdout and stderr zfd(7D) devices.
The following options are supported:
Connects to the zone console.
Disconnect from the console when the zone halts. This
option may only be used if the -C option is specified.
Specifies a different escape character, c, for the
key sequence used to access extended functions and to disconnect from the
login. The default escape character is the tilde (~).
Disables the ability to access extended functions or to
disconnect from the login by using the escape sequence character.
Forces interactive mode when a utility argument is
Connects to the zone's zfd(7D) devices.
Specifies a different username for the zone login.
If you do not use this option, the zone username used is "root".
This option is invalid if the -C option is specified.
Redirect the input of zlogin to /dev/null.
This option is useful when the command running in the local zone and the shell
which invokes zlogin both read from standard input.
Nohup. This may only be used with the -I option to avoid
sending EOF to the zfd device when zlogin's stdin receives EOF. It can also be
toggled by sending SIGUSR1 to an attached zlogin process.
Specifies quiet mode operation. In quiet mode, extra
messages indicating the the function of zlogin will not be displayed,
giving the possibility to present the appearance that the command is running
locally rather than in another zone.
Lines that you type that start with the tilde character (~) are
"escape sequences". The escape character can be changed using the
"Safe" login mode. zlogin
processing and does not invoke login(1)
. The -S
option can not be used if a username is specified through the -l
option, and cannot be used with console logins. This mode should only be used
to recover a damaged zone when other forms of login have become
Disconnects from the zone. This is not the same as a
logout, because the local host breaks the connection with no warning to the
Once a process has been placed in a zone other than the global zone, the process
cannot change zone again, nor can any of its children.
The following operands are supported:
The name of the zone to be entered.
The utility to be run in the specified zone.
Arguments passed to the utility.
In interactive and non-interactive modes, the zlogin utility exits when
the command or shell in the non-global zone exits. In non-interactive mode,
the exit status of the remote program is returned as the exit status of
zlogin. In interactive mode and console login mode, the exit status is
not returned. zlogin returns a 0 exit status as long as no
connection-related error occurred.
In all modes, in the event that a connection to the zone cannot be
established, the connection fails unexpectedly, or the user is lacking
sufficient privilege to perform the requested operation, zlogin exits
with status 1.
To summarize, the following exit values are returned:
Permission denied, or failure to enter the zone.
See attributes(7) for descriptions of the following attributes:
Return code from utility, or from su(8)
operating in non-interactive mode.
zlogin fails if its open files or any portion of its address space
corresponds to an NFS file. This includes the executable itself or the shared