bitfocus / companion-pi

Bitfocus Companion enables the reasonably priced Elgato Streamdeck to be a professional shotbox surface for an increasing amount of different presentation switchers, video playback software and broadcast equipment.
http://bitfocus.io/companion
MIT License
29 stars 8 forks source link

[BUG] 090-companion_sudo - Syntax error causes sudo issues post-install (Ubuntu Server 20.04 LTS) #11

Closed aw-adl closed 1 year ago

aw-adl commented 1 year ago

I've been setting up a headless instance of Companion on Ubuntu Server 20.04 LTS. Once the install completed, I noticed I could no longer sudo because of a syntax error in 090-companion_sudo. This is obviously very problematic because you then can't edit the sudoers files without sudo priveleges.

I re-imaged and started again, this time not exiting sudo -i once the installation had completed then running: pkexec visudo Which checks/validates all the sudo files when you exit visudo. This then flags an error with 090-companion_sudo.

The file as installed is: companion ALL=NOPASSWD: /sbin/reboot,/sbin/shutdown,/sbin/poweroff

Editing it to the below (note the two additional spaces) fixes the sudo syntax error and means that sudo works moving forward: companion ALL=NOPASSWD: /sbin/reboot, /sbin/shutdown, /sbin/poweroff

Not sure if this is specific to Ubuntu rather than Rasbpian Lite - but at the very least hope this helps someone in the future and savest them the time I lost!

OS: Ubuntu Server 20.04.6 LTS Branch: Beta (V3)

Julusian commented 1 year ago

I haven't been able to reproduce the validation issues you are seeing on Ubuntu 22.04, but I see no harm in adding the spaces so that is done and will be pulled in when you next run sudo companion-update. Be aware that your local changes would be reverted when you ran an update