MindTouch Developer Center > MindTouch Deki > FAQ > User Management > How do I...Convert existing wiki users to external accounts such as LDAP?

How do I...Convert existing wiki users to external accounts such as LDAP?

Table of contents
No headers

If you initially set up some users locally on the wiki and then add the LDAP authentication service, you may notice that when the same users (with the same usernames) login via LDAP, new accounts are created with a 1 appended after the name. For example, you create a local account Bob and then login using LDAP authentication also as username Bob, a new account will be created with the username Bob1.

To convert your existing users to be able to login with the external authentication provider instead you'll need to perform some updates to your users table. Specifically you'll need to set the user_service_id to the id of the authentication service, and set your user_external_name to the current username.

update users
set user_service_id = 8,
user_external_name = user_name
where user_name in ("Bob", "Susan");

In this case we're changing the local accounts Bob and Susan to login via the external authentication service at id 8. You can find the id of your authentication service from the services table.

Tag page
Viewing 4 of 4 comments: view all
I have to do this edit to my users table. I recently switched to LDAP authentication. And after a few days added 'displayname_pattern','{givenname} {sn}' so now I have some accounts with names like 'bphillips' and 'jsmith', and others with "Ralph_Johnson" and "John_Edwards" and I want to change the displayname for the 'bphillips' style accounts to the new displayname_pattern style names. But I'm not sure if the above code applies in this instance. and I don't know where to issue these commands. Can someone add more info to this How-to please edited 14:40, 17 Dec 2007
Posted 14:34, 17 Dec 2007
How To run that SQL query ? Which tool do you use ? From the web or from the console ?
Posted 15:09, 26 Feb 2008
@marcoya: The short answer is 'yes': the query looks to be run on your mysqld, so run it on the command line on your server, or use one of many GUI or WebUI tools to run that command.
Posted 19:09, 6 Mar 2008
What are the acceptable Magic values "user_service_id"? Looks like 1 and 8 are allowed.
Posted 19:19, 11 Apr 2008
Viewing 4 of 4 comments: view all
You must login to post a comment.
Powered by MindTouch Deki Enterprise Edition v.8.08 RC1