Why is Grok Bot running local commands with no_new_privs set when I explicitly want it to administer my own Linux computer? If that restriction is intentional, where is the clear explanation and supported way to authorize root access?
On my previous account, the bot gave me a script to enable passwordless sudo. I ran it, and everything worked. No --no-sandbox launch option was needed.
After switching to a new account on the same Debian computer and same app, sudo id repeatedly failed:
sudo: The "no new privileges" flag is set, which prevents sudo from running as root.
The command process reported NoNewPrivs: 1. Eventually, I closed Grok Bot completely and relaunched it from the command line with --no-sandbox. Then sudo worked.
The bot was extremely unhelpful in getting past this restriction. It repeatedly described the blocker without finding an actionable resolution. I had to keep pushing it to test commands, check the existing sudo configuration, and research the issue. Its research still produced no supported solution. I ended up finding the working launch change myself.
I’m not asking to gain access to someone else’s computer. This is my machine, passwordless sudo was deliberately configured, and I explicitly authorized root commands. Repeating that a restriction exists is not useful assistance.
What I want the team to answer is:
What sets no_new_privs in Grok Bot’s local execution path, and why? If it is an intentional product restriction, explain the rationale.
Why did the previous account work without --no-sandbox, while this session required it? The account change is the observed sequence, not a confirmed cause.
Where is the supported, explicit opt-in for local root access? Users should not have to disable a broader process sandbox through trial and error.
Why can’t the bot diagnose this and explain the supported resolution? It should distinguish a process-level restriction from a missing sudo rule or an execution-permission prompt.
Security defaults are one thing. An opaque restriction, inconsistent behavior, and an assistant that cannot help resolve the problem are another. If local root access is supported, make it work predictably. If it isn’t, say so clearly instead of letting users waste time going in circles.
For AI issues: which model did you use?
Model name (e.g., Sonnet 4, Tab…)
For AI issues: add Request ID with privacy disabled
Request ID: f9a7046a-279b-47e5-ab48-6e8dc12daba1
For Background Agent issues, also post the ID: bc-…
Additional Information
Add any other context about the problem here.
Does this stop you from using Cursor?
Yes - Cursor is unusable
Sometimes - I can sometimes use Cursor
No - Cursor works, but with this issue
The more details you provide, the easier it is for us to reproduce and fix the issue. Thanks!
Hi @naz_kaya, Grok Bot doesn’t set no_new_privs on purpose, and there’s no restriction on root for your own computer. The flag comes from how that app session was started. When Grok Bot restarts itself on Linux (after an update, after a setting that needs a restart, or when it’s reopened while the previous window is still closing), the new session comes up with no_new_privs set and every command it runs inherits it. A normal fresh start doesn’t have it.
So it wasn’t the account, it was the session you were in after switching. --no-sandbox isn’t what fixed it either. Fully quitting and starting again did, so you can drop the flag.
There’s no separate opt-in for root. The passwordless sudo you set up is the supported way, and it works in any session that was started fresh. If the message comes back, quit Grok Bot completely, wait a few seconds, and open it again.
Could you confirm sudo -n id works after a full quit and a normal launch without --no-sandbox?
Well, I restarted without --no-sandbox and it works but when I used the new different account there was no update involved. Previous issues were probably after an update so this one is different. I honestly believe this is an issue that should be fixed. Grok gets scared that you are trying to override something and offers 0 help. Maybe get rid of it or show a warning. Thanks for solving the mystery.