Jenkins set the default user is root

https://www.jianshu.com/p/181dfb259dc7

In recent need to do shell script jenkins, due to the Jenkins online before the default installation, so jenkins jenkins set the default user permissions

If you are performing a root user command, the newspaper permission errors

 

 
image.png

So to replace the root user jenkins

Change following steps:

  1. First, find the directory jenkins online installation, and then perform

chown -R root:root xxxx

root@ubuntu:/usr/share# find / -name "jenkins" find: ‘/proc/13931’: No such file or directory /var/lib/jenkins /var/log/jenkins /var/cache/jenkins /run/jenkins /etc/default/jenkins /etc/init.d/jenkins /etc/logrotate.d/jenkins /usr/share/jenkins /usr/share/doc/jenkins 
  1. Edit the file / etc / default / jenkins

JENKINS_USER=root
JENKINS_GROUP=root

 
image.png
  1. Start jenkins Service
root@ubuntu:/usr/share# /etc/init.d/jenkins Correct java version found Usage: /etc/init.d/jenkins {start|stop|status|restart|force-reload} 
  1. Log in to see if the browser ok

Guess you like

Origin www.cnblogs.com/python-xiakaibi/p/11647692.html