Skip to content

Fix nx attach using sudo - simplest solution - #149

Merged
elyxlz merged 1 commit into
masterfrom
fix/sudo-based-attach
Nov 24, 2025
Merged

Fix nx attach using sudo - simplest solution#149
elyxlz merged 1 commit into
masterfrom
fix/sudo-based-attach

Conversation

@elyxlz

@elyxlz elyxlz commented Nov 24, 2025

Copy link
Copy Markdown
Owner

Summary

Fixes nx attach by using sudo for cross-user screen access - the simplest and most standard approach.

Changes

  • Client now uses sudo -u nexus screen -r {session} for attach (both local and remote)
  • Removed multiuser mode and ACL config from SCREENRC_CONTENT (not needed with sudo)
  • Re-enabled passwordless sudo configuration during nexus-server install

Why sudo?

After testing multiuser mode with ACLs, found that:

  • Screen's acladd requires explicitly adding each user (no wildcard support)
  • Sudo is the standard, simplest approach for cross-user screen access
  • Passwordless sudo is configured via /etc/sudoers.d/nexus_attach during install

Test Plan

  • ✅ Install new version: sudo nexus-server install
  • ✅ Run job: nx run "sleep 100"
  • ✅ Attach: nx attach (should work without password prompt)

After research, sudo is the standard and simplest approach for cross-user screen access.

Changes:
- Re-enabled sudoers configuration during install
- Client uses sudo -u nexus screen -r {session}
- Removed multiuser/ACL config from screenrc (not needed)
- Auto-configured passwordless sudo in /etc/sudoers.d/nexus_attach

Result: Simple, standard, works everywhere. Requires reinstall for sudoers setup.

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude <noreply@anthropic.com>
@elyxlz
elyxlz merged commit 70207e4 into master Nov 24, 2025
4 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant