我需要在 Jenkins 中以 root 而不是默认用户身份运行 shell 脚本。我需要改变什么?
我的 sudoers 文件是这样的:
# User privilege specification
root ALL=(ALL) ALL
igx ALL=(ALL) ALL
%wheel ALL=(ALL) ALL
# Allow members of group sudo to execute any command
# (Note that later entries override this, so you might need to move
%sudo ALL=(ALL) ALL
#
#includedir /etc/sudoers.d
# Members of the admin group may gain root privileges
%admin ALL=(ALL) NOPASSWD:ALL
root ALL=(ALL) ALL
jenkins ALL=NOPASSWD: /var/lib/jenkins/workspace/ing00112/trunk/source/
jenkins ALL=(ALL) NOPASSWD:ALL
#Defaults:jenkins !requiretty