Be part of JetBrains PHPverse 2026 on June 9 – a free online event bringing PHP devs worldwide together.

gregrobson's avatar

Cannot run sudo commands?

I've just tried to install Linode's Longview on a new Custom VPS set up through Forge. (I've done about 10 times before without issue.) I attempted to run the command…

curl -s https://lv.linode.com/<PROVIDED KEY> | sudo bash

…and I get…

Sorry, user forge is not allowed to execute '/bin/bash' as root on <my host name>

I've tried sudo bash on it's own and that doesn't work either. I seem to have lost my sudo/root powers.

Does anyone have an idea A) why this has happened B) whether I can recover my root access, without having root access?*

  • I realise the answer is probably no on that front!
0 likes
5 replies
gregrobson's avatar

Further info: if I run id at the terminal I get this back:

uid=1002(forge) gid=1002(forge) groups=1002(forge),27(sudo),33(www-data)

ejdelmonico's avatar

Have you tried through whatever console Linode provides?

gregrobson's avatar

That’s not possible - it’s a custom VPS on another host.

Incidentally another Custom VPS on the same host machine has Longview working fine.

ejdelmonico's avatar

Are you still listed in the sudoer group as indicated above? Log out and log back in to check for changes. You can also try to boot into recovery mode and root then usermod -a -G sudo forge Or

- boot system into recovery mode
- `mount -rw -o remount /` or if you get to choose root user first and then enter this command
- Goto `root` user
- `usermod -a -G sudo forge`
- `reboot`

You can only use the above process if you have access to the boot process so no SSH.

gregrobson's avatar

Thanks for the advice @ejdelmonico - I think I might just get the provider to reinstall the VM: I don't have enough access to the host to boot into recovery mode. If that's not working then other parts of the install might be broken that I discover later!

Useful commands though, should I need them in the future!

Please or to participate in this conversation.