How to add new users via command line with Hudson ?

103 views
Skip to first unread message

mpc8250

unread,
Mar 5, 2016, 3:19:33 AM3/5/16
to Jenkins Users
Hi All

We use Hudson v2.2.1.
How can we add multiple users via command line ?

Would this work ? We ask because we have a rather old Hudson.

echo 'hpsr=new hudson.security.HudsonPrivateSecurityRealm(false); hpsr.createAccount("dummyuser", "dummypassword")' | java -jar hudson-cli.jar -s http://localhost:8080 groovy =


Is there any other command line approach ?


Thank you

Slide

unread,
Mar 5, 2016, 10:18:40 AM3/5/16
to Jenkins Users
You would want to ask on the Hudson mailing list, this list is for Jenkins.

--
You received this message because you are subscribed to the Google Groups "Jenkins Users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to jenkinsci-use...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/jenkinsci-users/dc4f733d-022d-43d8-a9c1-c0f74936f3d0%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

mpc8250

unread,
Mar 7, 2016, 1:31:43 PM3/7/16
to Jenkins Users
Hi Slide
Unfortunately, no help from that forum there. Hence the question here.

Thank you.

Slide

unread,
Mar 7, 2016, 1:39:18 PM3/7/16
to Jenkins Users
The two projects have diverged significantly, so getting support for Hudson on the Jenkins list probably won't help. If you need a community that is alive and running, I recommend you switch to Jenkins. This is not without its own issues, since you can't just drop Jenkins in on top of the Hudson directory structure. You would have to recreate your jobs. In the end though, if you need a community, Jenkins is the way to go.

Baptiste Mathus

unread,
Mar 8, 2016, 9:34:15 AM3/8/16
to jenkins...@googlegroups.com

+1 with Slide.
Beware that Hudson!=Jenkins.

With Jenkins, you could use groovy ran from CLI. See example (untested) here: http://rcarrillocruz.com/create-jenkins-user-command-line-jenkins-cli-groovy/

-- Baptiste

Reply all
Reply to author
Forward
0 new messages