Skip to content

v0.11.0 — DEFAULT_GROUPS

Choose a tag to compare

@ralyodio ralyodio released this 29 Aug 07:06
· 17 commits to master since this release

Fixed

DEFAULT_GROUPS is documented in server.conf.example, but root-ubuntu.sh declared it as an unconditional assignment (DEFAULT_GROUPS="sudo,admin") instead of the "${KEY:-default}" form every other setting uses. read_server_config runs ~200 lines earlier, so the configured value — and any value passed in the environment, which the file header promises always wins — was read correctly and then silently discarded.

This was not cosmetic. The group prompt is skipped when there is no tty, so an unattended run (--refresh, or the documented curl … | bash) takes $DEFAULT_GROUPS verbatim for every account it creates. A box that had configured www-data,users,docker still put new accounts in sudo,admin — root-equivalent, and the opposite of what was asked for — with nothing in the run output looking wrong.

DEFAULT_GROUPS was the only affected key; the other fifteen server.conf.example documents were already overridable.

Added

Tests covering the class rather than the single key: every documented key must survive its own declaration, plus a behavioural check that reads a config file and then runs the real declaration line out of the script. Both fail against the old line.

DEFAULT_GROUPS is now documented in the script header and the README, since an unattended run never prompts and this is what silently decides how privileged new accounts are.

Upgrading: re-fetch the script — curl -fsSLO https://raw.githubusercontent.com/profullstack/cli-tools/master/root-ubuntu.sh. If you set DEFAULT_GROUPS before this release, check where existing accounts actually landed: ./root-ubuntu.sh groups.