工作中,一些程序,需要随机启动,但是不是以root用户运行,于是需要在rc.local中通过shell,从root用户切换到其他用户运行程序,命令如下: su -c 'command' - user sudo -u peter /home/blue/hi.sh 实例 在/etc/rc.d/rc.local中加入如下内容: #vi /etc/rc.d/rc.local su - oracle -c "/u01/app/oracle/product/9.2.0.4/bin/lsnrctl start
Orginal artical :http://android.stackexchange.com/questions/5884/is-there-a-way-for-me-to-run-adb-shell-as-root-without-typing-in-su If I'm understanding your question correctly, you're asking how to get root access automatically when you run adb she
通过jenkins的以下三个方式去执行sonar-scanner,抛如下错误. Send files or execute commands over SSH before the build starts Send files or execute commands over SSH after the build runs command [cd /home/xxx/code/CODE/xxx/xxxsonar-scanner...bash: sonar-scanner: com
You need to modify the permission for jenkins user so that you can run the shell commands. You can install the jenkins as as service (download the rpm package), You might need to change the ports because by default it runs http on 8080 and AJP on 800