A tricks on how to run a script as root without sudo, in case someone needs this. I use this for toggle on and off camera without pkexec. It’s useful imho

  • nyan
    link
    fedilink
    English
    arrow-up
    8
    arrow-down
    1
    ·
    9 months ago

    How to run a shell script with root permisions without sudo? su to root. Or set up the correct permissions for the script and whatever it needs to touch, and add your user to any required groups, so that you don’t need to be root to run the script. Rolling your own solution is never a good idea for anything security-related.

    • vector_zero@lemmy.world
      link
      fedilink
      arrow-up
      3
      ·
      9 months ago

      Or create a service running with limited access to specific resources, and create an API for users to make requests to that service.