如何以超级用户身份运行jenkins? [英] how to run jenkins as super user?

查看:125
本文介绍了如何以超级用户身份运行jenkins?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我是Mahesh. 我在Linux机器上安装了jenkins,它可以像普通用户一样正常工作,当我尝试以超级用户[root]模式运行一个脚本时,它无法正常工作,即使我禁用了sudoers文件中的密码也无法正常工作,还没有给出任何错误它只是以普通用户而不是root的身份运行脚本?我所做的?我该如何解决这个问题?

我只是在詹金斯的shell脚本coloumn中添加了这样的内容...

sudo su //注释->我禁用了密码,因此不需要密码,我在终端中进行了测试,并能够使用此密码输入root密码

sh something.sh

解决方案

我建议不要以root用户身份运行Jenkins(或任何应用程序服务器).

为什么不安装sudo命令,为什么不安装 Jenkins ssh插件并配置jenkins用户以执行ssh登录到根帐户?

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

解决方案

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?

这篇关于如何以超级用户身份运行jenkins?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆