This thread has been locked.

If you have a related question, please click the "Ask a related question" button in the top right corner. The newly created question will be automatically linked to this question.

Linux/AM3358: Alternative to Sudo

Part Number: AM3358

Tool/software: Linux

Hi,

I created sdcard for booting on BBB. I want to host some webpages on it. I use the lighttpd web server for it.

My application requires that when the user submits a page, some shell script should be executed. The shell script stops the shairport-sync application installed on the sd card.

I use the command: systemctl stop shairport-sync


However the script does not execute through a browser, since it requires root priviliges. I changed the owner of the script to www-data, but it still does not have permissions to execute the systemctl command.

Since sudo does not work on arago, I can't even do a sudo systemctl ...

Could you please suggest how do I resolve the issue?

Thanks & Regards,

Priyam

  • The software team have been notified. They will respond here.
  • Hello Priyam,

    You can build and install the sudo command on your target as pet the described steps at this post.

    Best regards,
    Kemal

  • Hi Kemal,

    I followed the steps suggested in the link using the configuration processor-sdk-04.01.00.06-config.txt

    But  I got some error messages. Could you please help me understand where I am going wrong?

    Thanks & Regards,

    Priyam

    The following is the console output:

    praveen@praveen-VirtualBox:export PATH=$HOME/gcc-linaro-6.2.1-2016.11-x86_64_arm-linux-gnueabihf/bin:$PATH
    praveen@praveen-VirtualBox:~/tisdk/build$ MACHINE=am335x-evm bitbake sudo
    NOTE: Your conf/bblayers.conf has been automatically updated.
    NOTE: Your conf/bblayers.conf has been automatically updated.
    Loading cache: 100% |############################################| Time: 0:00:06
    Loaded 3257 entries from dependency cache.
    Parsing recipes: 100% |##########################################| Time: 0:02:29
    Parsing of 2509 .bb files complete (2216 cached, 293 parsed). 3257 targets, 529 skipped, 0 masked, 0 errors.
    WARNING: No recipes available for:
      /home/praveen/tisdk/sources/meta-openamp/recipes-bsp/device-tree/device-tree-generation_%.bbappend
    NOTE: Resolving any missing task queue dependencies

    Build Configuration:
    BB_VERSION        = "1.32.0"
    BUILD_SYS         = "x86_64-linux"
    NATIVELSBSTRING   = "Ubuntu-16.04"
    TARGET_SYS        = "arm-linux-gnueabi"
    MACHINE           = "am335x-evm"
    DISTRO            = "arago"
    DISTRO_VERSION    = "2017.06"
    TUNE_FEATURES     = "arm armv7a vfp thumb neon       callconvention-hard"
    TARGET_FPU        = "hard"
    meta-processor-sdk = "HEAD:2b7f7b00654eb3faaea7c66271ebe508b9ffc019"
    meta-arago-distro
    meta-arago-extras = "HEAD:8f49ed67d0627a04ac72fd388fda7756273ba2d7"
    meta-browser      = "HEAD:08576b03af624b65ad949c410d84c11c7d1f2e39"
    meta-openamp      = "HEAD:8a214032bfb7e8124bc1485c70c69f7d60abb819"
    meta-qt5          = "HEAD:2c9f0e4eb0e9097f6f872ec1e1d81768a8ab5f1b"
    meta-networking   
    meta-ruby         
    meta-python       
    meta-oe           
    meta-gnome        = "HEAD:fe5c83312de11e80b85680ef237f8acb04b4b26e"
    meta-ti           = "HEAD:a18d57af8384ced25996739bb66d197c69efb77b"
    meta-linaro-toolchain
    meta-optee        = "HEAD:49b0f32d7e955f250b0022d1b2f403f45a2c2d9c"
    meta              = "HEAD:e3911133ee9aad7cc3ae89faea80a097f6614fab"

    Initialising tasks: 100% |#######################################| Time: 0:00:40
    NOTE: Executing SetScene Tasks
    NOTE: Executing RunQueue Tasks
    ERROR: Worker process (3049) exited unexpectedly (-9), shutting down...
    ERROR: Worker process (3049) exited unexpectedly (-9), shutting down...
    WARNING: /home/praveen/tisdk/sources/bitbake/lib/bb/runqueue.py:1071: ResourceWarning: unclosed file <_io.BufferedWriter name=28>
      self.worker = {}

    NOTE: Tasks Summary: Attempted 95 tasks of which 95 didn't need to be rerun and all succeeded.

    Summary: There were 2 WARNING messages shown.
    Summary: There were 2 ERROR messages shown, returning a non-zero exit code.

  • Your virtual machine is weak. Please, configure a stronger one.

  • Hi Kemal,

    Thanks for your support.

    I will try with a better configuration VM. 

    Thanks & Regards,

    Priyam