Shell

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…

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 runuser is 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 root can 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.

  1. System → Shell, wait for the prompt.
  2. Type df -h /srv/data/share /srv/data/mail and press Enter.
  3. Compare with the «Disk» tile of Status: the percentages match.

Example: reading a service’s log.

  1. In the terminal: journalctl -u atlas -n 50 --no-pager shows the last 50 lines of the console.
  2. For an isolated service, its name is edon-<service> (for example edon-postfix): journalctl -u edon-postfix -n 50 --no-pager.

Example: returning to a session after a reload.

  1. During a long ping you reload the tab by mistake.
  2. Go back into System → Shell at once: the screen with the last lines returns and the command goes on.
  3. 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 as root.
  • 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.
LET’S TALK INFRASTRUCTURE

Control starts with a conversation.

Tell us about your infrastructure. Let’s start with what you actually need.

Talk to an engineer