Friday, May 15, 2009

Renaming Domain group Display names in WSS 2.0

Recently I saw a post on the Net about the impossibility to rename the Display name of a domain group in WSS 2.0

This is a "Well, Actually" post as I replied in that thread.

The Solution is Ugly and should only be executed if you're deperate.
As allways: Test in a non-production environment first!!!

If you execute the following Sql Statement on your Content Database

you can find the GUID of the user/group

SELECT tp_SiteID, tp_Login, tp_Title, tp_GUID
FROM UserInfowhere Tp_Title = ''

You'll then find an entry to a site 'user' for every site it is a member of.
Normally all users would have the Same tp_GUID.

If not, then there have been two different domain groups with that same name.
For example a group was created and added to SharePoint,
then later the group was deleted in the domain,
and even later recreated and readded to SharePoint,

To get the GUID of the proper 'user',
add the group to the security of one of the site's lists
and now the tp_Login in the database will have changed to the new groupname.

You can now write an SQL update script to change the tp_login and tp_title to the new value

UPDATE [UserInfo]
SET tp_Login = '', tp_Title = ''
WHERE tp_GUID = 'GUID of the DomainGroup'

DISCLAIMER....
As I said, this is a rather ugly solution, only to be tried by the desperate, and only after extensive testing in a test environment.I myself have never been desperate enough to do this.
Of course such database hacking will never be supported by Microsoft, or by me ;o)
this solution is for WSS 2.0 but with some logical thinking could probably be used for WSS 3.0 (and SPS 2003 and MOSS 2007) also

No comments: