Hi klettervirus,
Linux has got very particular about what can and what can not be run as root. You also have a script designed for one of the standard Linux versions like Rasbian. RuneAudio uses Arch-Linux which uses a formal publication and version control process. So there is no guarantee that your script will deliver what is should.
As you point out it seems a waste of time forbidding things to be run as root then insisting that they are run as root via sudo. But I am afraid that’s the way it is.
I suggest you make a user called ‘shim’ and try using it to run the script. Create the user:
- Code: Select all
userdel shim
groupdel shim
groupadd -r shim
useradd -r -d /home/shim -g shim shim
mkdir /home/shim
then add a file to the directory /etc/sudoers.d, for example: sudo-shim:
- Code: Select all
nano /etc/sudoers.d/sudo-shim
With this content:
- Code: Select all
shim ALL=NOPASSWD: ALL
Copy the script to directory /home and run:
- Code: Select all
chmod 777 /home/<scriptname>
Then we should be ready to go, switch to the user shim with this:
- Code: Select all
su shim
To check who you are:
- Code: Select all
whoami
Then run your script:
- Code: Select all
cd /home
sudo <scriptname>
That should do it. You can exit the shim user environment with:
- Code: Select all
exit
Check who you are with whoami.
Janui
PS do not forget to clean up afterwards:
- Code: Select all
rm /etc/sudoers.d/sudo-shim
userdel shim
groupdel shim
rmdir /home/shim