how to run jenkins as super user?

与世无争的帅哥 提交于 2019-12-14 03:34:37

问题


I am Mahesh. I installed jenkins in my linux machine,IT works well as a normal user, When i try to run one script in super user [root] mode,It is not working properly,Even i disable the password in sudoers file it is not working and also It not giving any error It just running the script in normal user instead of root ?? what i do? how i can resolve this problem ??

I just add like this in shell script coloumn in jenkins...

sudo su //comment-->I disable the password so no password required ,I tested in the terminal and am able to enter into root without password with this

sh something.sh


回答1:


I would advise against running Jenkins (or any application server) as the root user.

Instead of battling the sudo command, why not install the Jenkins ssh plugin and configure the jenkins user to perform an ssh login to the root account?



来源:https://stackoverflow.com/questions/11841140/how-to-run-jenkins-as-super-user

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!