What it is for
System → Shell opens a real terminal on the appliance in the browser. It is for the checks the console does not offer (df -h, journalctl, ping) and for the technician’s support. The page is the terminal: it has nothing else.
How it works
- The terminal runs as your user, if the appliance has a local account with your same name and a login shell. In that case a line above the terminal says so: «This shell runs as the local user “name”, with that user’s permissions.»
- Otherwise it runs as
root, and in that case the line does not appear. It is the typical case of a domain administrator without a local account (and of whoever comes in from Citadel): it has all powers over the appliance. - If
runuseris missing the terminal is not there: the page says «The terminal is not available on this server: runuser is not installed.» - When the session ends «— session ended —» appears.
- Reloading the page does not lose the session: the screen is shown again (up to about 256 KB of text) if you come back within a minute of the last tab being closed. A session with no signals from the browser for about 75 seconds is closed; each user can keep at most 4 open together.
Warning A shell as
rootcan delete data and stop the appliance. What you type here does not go through the console’s checks. Use it to read and for operations you know; to change the configuration prefer the console’s pages, which do the checks and also update the rest.
Examples
Example: how much space is left on the disks.
- System → Shell, wait for the prompt.
- Type
df -h /srv/data/share /srv/data/mailand press Enter. - Compare with the «Disk» tile of Status: the percentages match.
Example: reading a service’s log.
- In the terminal:
journalctl -u atlas -n 50 --no-pagershows the last 50 lines of the console. - For an isolated service, its name is
edon-<service>(for exampleedon-postfix):journalctl -u edon-postfix -n 50 --no-pager.
Example: returning to a session after a reload.
- During a long
pingyou reload the tab by mistake. - Go back into System → Shell at once: the screen with the last lines returns and the command goes on.
- If instead you leave the page closed for more than a minute the session has ended.
Limits and pitfalls
- A local user with a non-login shell (
nologin,false) is treated as if it did not exist: the shell runs asroot. - The terminal does not replace SSH for long sessions: if it loses the connection for more than a minute, it ends.
- Do not paste passwords or secret keys into the terminal: they end up in the shell’s history.
- Each shell opened leaves a row in System → Operation log with who, when and from where; the commands typed do not.