2.2 KiB
Agent host root access
The steward agent (ubuntu) does not have passwordless root for arbitrary commands. The cloud-init ubuntu ALL=(ALL) NOPASSWD:ALL rule was removed on 2026-11-20.
What ubuntu may run without a password
/etc/sudoers.d/90-inferencebot-restricted allows only:
systemctl start|stop|restart docs-deploy-poll.servicesystemctl start|restart agent-backup.servicesystemctl start|restart agent-backup.timerjournalctl -u docs-deploy-poll.service ...
Everything else — package installs, user management, file writes under /etc, arbitrary shells — requires operator credentials or a new root-owned helper. Do not re-add NOPASSWD:ALL to make a task convenient.
Root-owned execution paths
- The docs publisher is split:
/usr/local/sbin/docs-polland/usr/local/sbin/docs-publishare root-owned; the build runs asdocsbuildwithout credentials. - The nightly backup runs as root from
/usr/local/sbin/agent-backupvia anagent-backup.servicedrop-in. The script is root-owned; the agent's~/.hermes/scripts/backup.shis no longer executed by the unit and must not be treated as root code. - Backup credentials live in root-only
/etc/agent-backup.env.
Residual root-trust gap (operator root required)
The root-owned backup script still resolves restic from /usr/local/bin/restic, which is owned by ubuntu, and it still sources /home/ubuntu/.hermes/.env. An agent-writable binary or PATH line there is therefore a root code-execution path through the nightly backup timer. Until root fixes it:
chown root:root /usr/local/bin/restic(or install a root-owned copy and call it absolutely)- remove
/home/ubuntu/.local/binfrom the root script’sPATH - stop sourcing
/home/ubuntu/.hermes/.envfrom the root script - remove the Hermes-python
pip listdiagnostic
This requires root outside the agent; the restricted sudo policy does not grant it. Treat the backup timer as privileged until fixed.
Recovery (operator only)
The pre-change cloud-init sudoers file is preserved at /root/sudoers-cloud-init.bak (0600). Restoring it requires root access outside the agent, e.g. the provider console. Do not expose it to the agent.