Change auhentication method for all users

Added by Jp Mill about 1 month ago

Hi , do you have any tips on how I can change the authentication method for all my users ? We changed to AD recently and want to use that for every user.

Replies (1)

RE: Change auhentication method for all users - Added by Mayama Takeshi about 1 month ago

I think you can use the Redmine API:
http://www.redmine.org/projects/redmine/wiki/Rest_Users

You can use this python module to simplify Redmine API access:
https://python-redmine.com/

I believe you just have to change the auth_source_id.
Get it from one user that has Authentication Mode set to AD and set it to another one.
You can test setting the auth_source_id with something like this:

  curl -u TOKEN 'http://REDMINE_SERVER/users/USER_ID.json -X PUT -H 'Content-Type: application/json' -d '{"user": {"auth_source_id": AUTH_SOURCE_ID}}'

If it works then you can write a script to iterate for every user and set all to that same auth_source_id.

(1-1/1)