1 ZLOGIN(1) User Commands ZLOGIN(1) 2 3 4 5 NAME 6 zlogin - enter a zone 7 8 SYNOPSIS 9 zlogin [-dCEQ] [-e c] [-l username] zonename 10 11 12 zlogin [-nEQS] [-e c] [-l username] zonename utility 13 [argument]... 14 15 16 DESCRIPTION 17 The zlogin utility is used by the administrator to enter an operating 18 system zone. Only a superuser operating in the global system zone can 19 use this utility. 20 21 22 zlogin operates in one of three modes: 23 24 Interactive Mode 25 If no utility argument is given and the stdin 26 file descriptor for the zlogin process is a tty 27 device, zlogin operates in interactive mode. In 28 this mode, zlogin creates a new pseudo terminal 29 for use within the login session. Programs 30 requiring a tty device, for example, vi(1), 31 work properly in this mode. In this mode, 32 zlogin invokes login(1) to provide a suitable 33 login session. 34 35 36 Non-Interactive Mode 37 If a utility is specified, zlogin operates in 38 non-interactive mode. This mode can be useful 39 for script authors since stdin, stdout, and 40 stderr are preserved and the exit status of 41 utility is returned upon termination. In this 42 mode, zlogin invokes su(1M) in order to set up 43 the user's environment and to provide a login 44 environment. 45 46 The specified command is passed as a string and 47 interpreted by a shell running in the non-global 48 zone. See rsh(1). 49 50 51 Console Mode 52 If the -C option is specified, the user is 53 connected to the zone console device and zlogin 54 operates in console mode. The zone console is 55 available once the zone is in the installed 56 state. Connections to the console are 57 persistent across reboot of the zone. 58 59 60 OPTIONS 61 The following options are supported: 62 63 -C 64 Connects to the zone console. 65 66 67 -d 68 Disconnect from the console when the zone halts. This 69 option may only be used if the -C option is specified. 70 71 72 -e c 73 Specifies a different escape character, c, for the key 74 sequence used to access extended functions and to 75 disconnect from the login. The default escape character 76 is the tilde (~). 77 78 79 -E 80 Disables the ability to access extended functions or to 81 disconnect from the login by using the escape sequence 82 character. 83 84 85 -l username 86 Specifies a different username for the zone login. If 87 you do not use this option, the zone username used is 88 "root". This option is invalid if the -C option is 89 specified. 90 91 92 -n 93 Redirect the input of zlogin to /dev/null. This option 94 is useful when the command running in the local zone and 95 the shell which invokes zlogin both read from standard 96 input. 97 98 99 -Q 100 Specifies quiet mode operation. In quiet mode, extra 101 messages indicating the the function of zlogin will not 102 be displayed, giving the possibility to present the 103 appearance that the command is running locally rather 104 than in another zone. 105 106 107 -S 108 "Safe" login mode. zlogin does minimal processing and 109 does not invoke login(1) or su(1M). The -S option can not 110 be used if a username is specified through the -l option, 111 and cannot be used with console logins. This mode should 112 only be used to recover a damaged zone when other forms 113 of login have become impossible. 114 115 116 Escape Sequences 117 Lines that you type that start with the tilde character (~) are "escape 118 sequences". The escape character can be changed using the -e option. 119 120 ~. 121 Disconnects from the zone. This is not the same as a logout, 122 because the local host breaks the connection with no warning to 123 the zone's end. 124 125 126 SECURITY 127 Once a process has been placed in a zone other than the global zone, 128 the process cannot change zone again, nor can any of its children. 129 130 OPERANDS 131 The following operands are supported: 132 133 zonename 134 The name of the zone to be entered. 135 136 137 utility 138 The utility to be run in the specified zone. 139 140 141 argument... 142 Arguments passed to the utility. 143 144 145 EXIT STATUS 146 In interactive and non-interactive modes, the zlogin utility exits when 147 the command or shell in the non-global zone exits. In non-interactive 148 mode, the exit status of the remote program is returned as the exit 149 status of zlogin. In interactive mode and console login mode, the exit 150 status is not returned. zlogin returns a 0 exit status as long as no 151 connection-related error occurred. 152 153 154 In all modes, in the event that a connection to the zone cannot be 155 established, the connection fails unexpectedly, or the user is lacking 156 sufficient privilege to perform the requested operation, zlogin exits 157 with status 1. 158 159 160 To summarize, the following exit values are returned: 161 162 0 163 Successful entry. 164 165 166 1 167 Permission denied, or failure to enter the zone. 168 169 170 Any 171 Return code from utility, or from su(1M) if operating in non- 172 interactive mode. 173 174 175 ATTRIBUTES 176 See attributes(5) for descriptions of the following attributes: 177 178 179 180 181 +--------------------+-----------------+ 182 | ATTRIBUTE TYPE | ATTRIBUTE VALUE | 183 +--------------------+-----------------+ 184 |Interface Stability | Evolving | 185 +--------------------+-----------------+ 186 187 SEE ALSO 188 login(1), rsh(1), vi(1), su(1M), zoneadm(1M), zonecfg(1M), 189 attributes(5), zones(5) 190 191 NOTES 192 zlogin fails if its open files or any portion of its address space 193 corresponds to an NFS file. This includes the executable itself or the 194 shared libraries. 195 196 197 198 March 17, 2015 ZLOGIN(1)