Set sudo in accelerate commands correctly

Fixes #4111