diff --git a/10-systems/bots/mardisopsbot.md b/10-systems/bots/mardisopsbot.md index 61872a4..3d1e7cd 100644 --- a/10-systems/bots/mardisopsbot.md +++ b/10-systems/bots/mardisopsbot.md @@ -34,6 +34,10 @@ - **Service Name**: `mardisops.service` — active (running), enabled - **Unit File**: `/etc/systemd/system/mardisops.service` - **Deployed**: 2026-09-10 07:08 UTC (Main PID verified running) +- **Hardening note**: `NoNewPrivileges=true` was removed from the unit on + 2026-09-10 07:12 UTC — it blocked sudo inside the service + ("no new privileges" error, rc=1 on /status). Do not re-add it while the + bot relies on sudo for systemctl/journalctl. ## sudoers grant - `/etc/sudoers.d/99-mardisops-sudoers` (root:root, 0440, `visudo -c` OK) @@ -41,6 +45,12 @@ mardisbot.service`, `systemctl restart mardisbot.service`, and `journalctl -u mardisbot.service *`. +## Access model +- First 3 Telegram users who send `/start` become admins; user_ids are + persisted in `/home/ubuntu/bots/MardisOpsBot/admins.json` (survives + restarts). Everyone else is silently ignored. +- As of 2026-09-10 07:12 UTC one admin is enrolled: user_id 78389352. + ## Service management ```bash sudo systemctl status mardisops.service @@ -49,6 +59,5 @@ ``` ## Startup log (verified 2026-09-10) -- `ops bot starting; admins=[] (max 3)` — admins are enrolled via Telegram - (maximum 3) +- `ops bot starting; admins=[78389352] (max 3)` - `polling started`