timja / jenkins-gh-issues-poc-06-18

0 stars 0 forks source link

[JENKINS-25422] OS X installer creates local "jenkins" user even when network "jenkins" user exists #5602

Open timja opened 9 years ago

timja commented 9 years ago

We have an Active Directory network user "jenkins" intended to be the jenkins user for all masters and slaves on our network.

Even though I was logged in as that user when I ran the OS X installer, it created a local "jenkins" user which it made the owner of the jenkins installation and the user under which launchd runs jenkins. It completely failed to notice that the current user was "jenkins" or that there was a "jenkins" network user.

After this I removed the jenkins installation and local jenkins user and tried again, paying more attention to the installer options. The installer provides no way to pick a different existing user. It really should. It just blindly creates the local "jenkins". It is possible that the user and group ids are hardcoded as 240 as well. That is the ID that was used both times I ran the installer.

I do not want to manually fix up the installation because I expect the next time I install an update the installer will create local "jenkins" again.


Originally reported by msc, imported from: OS X installer creates local "jenkins" user even when network "jenkins" user exists
  • status: Open
  • priority: Major
  • resolution: Unresolved
  • imported: 2022/01/10
timja commented 9 years ago

danielbeck:

Actually, it tries to find existing users named jenkins:
https://github.com/jenkinsci/jenkins/blob/master/osx/scripts/postinstall-launchd-jenkins#L13

And uses a deterministic approach to finding a UID below 500:
https://github.com/jenkinsci/jenkins/blob/master/osx/scripts/postinstall-launchd-jenkins#L22

timja commented 9 years ago

msc:

Thanks for the feedback. The dscl command used at L13 will find only local users. I have never used dscl before so I can't say how to find networked users but I expect there is a way.