Merge a local user account to a LDAP user account

LATEST Official version.
Questions and discussions - NO ISSUES
FOR ISSUES => http://mantis.testlink.org

Moderators: Amaradana, TurboPT, TL Developers

Merge a local user account to a LDAP user account

Postby rhford62 » Wed May 20, 2015 7:33 pm

I had a previous version of testlink, version 1.9.11, running on a standalone PC running Ubuntu 10.04. I now have a load balancing VM Ubuntu 14.04 server up and running with testlink 1.9.13 installed. I have successfully ported the DB from an existing testlink server to the new VM server.

My company wants to use LDAP for user authentication but the old server used local accounts. I have configured the new testlink successfully to use LDAP but before I bring this server up to production level I would like to merge the users local accounts to the newly created LDAP ones.

I did the same with thing with bugzilla. Buzilla though has under the contrib directory a merge script which allowed me to merge the local account to the new LDAP user account.

Does testlink have a way to accomplish the same thing? Any help would be greatly appreciated.

Thank you

Bob Ford
rhford62
TestLink user
 
Posts: 3
Joined: Sun Feb 08, 2015 11:20 am

Re: Merge a local user account to a LDAP user account

Postby fman » Wed May 20, 2015 8:38 pm

Would you mind to explain with more details what do you mean for merge local accounts with LDAP account?
It's not clear for me
fman
Member of TestLink Community
 
Posts: 3071
Joined: Tue Nov 15, 2005 7:19 am

Re: Merge a local user account to a LDAP user account

Postby rhford62 » Thu May 28, 2015 7:18 pm

A local user account would be one which has been created and is managed locally in TestLink. Our original TestLink was configured this way but now we want all user authentication to be done via LDAP. I have LDAP working on the new server and it is configured to automatically create a non-existent user account once authentication via LDAP is successful.

So for an example if user1 has a local user account named JohnSmith@company.com but the LDAP credentials for this same user is jsmit. I want to be able to merge the locally managed user account JohnSmith@company.com to jsmit LDAP one.

I had to do the same thing with bugzilla. Fortunately bugzilla had a script under contrib named "merge-users.pl" which did all the work.

If this does not explain it well enough please let me know and I will try to explain it differently.

Thank you
rhford62
TestLink user
 
Posts: 3
Joined: Sun Feb 08, 2015 11:20 am

Re: Merge a local user account to a LDAP user account

Postby fman » Fri May 29, 2015 1:08 pm

you can change the login name using an sql script if you do not have now duplicated users.
No other option exists
fman
Member of TestLink Community
 
Posts: 3071
Joined: Tue Nov 15, 2005 7:19 am

Re: Merge a local user account to a LDAP user account

Postby rhford62 » Fri May 29, 2015 7:12 pm

Not being a database person, would anyone be willing to give an example of what this sql script should look like?

Thank you
rhford62
TestLink user
 
Posts: 3
Joined: Sun Feb 08, 2015 11:20 am

Re: Merge a local user account to a LDAP user account

Postby TurboPT » Sat May 30, 2015 2:18 am

It would be a series of update queries.

(CAUTION, as fman mentioned, there should NOT be any duplicate login names to use this method!)

Code: Select all
UPDATE users SET login='LDAPname1' WHERE login='existingName1';
UPDATE users SET login='LDAPname2' WHERE login='existingName2';
UPDATE users SET login='LDAPname3' WHERE login='existingName3';

... and so on to cover all users.

Know that if you DO happen to have duplicate login names, there is a way to achieve the same result, but another query would be needed to get other information (a unique identifier), and the above script's example will need changes to the WHERE clause criteria.
TurboPT
Member of TestLink Community
 
Posts: 339
Joined: Sun Dec 10, 2006 4:51 am


Return to TestLink 1.9



Who is online

Users browsing this forum: No registered users and 6 guests