Changing Managed User Profiles by Shared Service Provider

December 11th, 2008 by farvashan

 

In this post, I talked about managed user profiles, and if it is possible to allow users changing their display name or email address etc. this is the answer: 

1)      An administrator can do it for you through shared service administration.First, import user profiles from Active Directory to the SSP, then go to:

Shared Services Administration: SSP > User Profile and Properties > View User Profiles   

 Here you can edit Name, Email etc.Your changes will take effect imedialy at My Sites User Profiles, and will replicate to all other sites across the farm after a while. ( I don't know how much time it takes, or by witch conditions ? but will happen less than an hour. )2)      Allow users to change their user profiles through My Site.Shared Services Administration: SSP > User Profile and Properties > View Profile Properties

Here you can edit policy for any properties of user profiles.

 

 By selecting ” Allw users to edit values for this property ” users will be able to change value through their My Sites. Make sure to select “Replicable” chek box, so properties will replicate to all sites after a mystery time!Remember, if you do a user profile import again, all SSP user profiles will be replace by active directory, then SSP will update My Sites and My Sites will update all otther sites entire the farm.  So, do your modifications in your LDAP's Corporate Directory.

 

 

< Neo/ >

Changing Managed User Profiles by Shared Service Provider

December 11th, 2008 by farvashan

 

In this post, I talked about managed user profiles, and if it is possible to allow users changing their display name or email address etc. this is the answer: 

1)      An administrator can do it for you through shared service administration.First, import user profiles from Active Directory to the SSP, then go to:

Shared Services Administration: SSP > User Profile and Properties > View User Profiles   

 Here you can edit Name, Email etc.Your changes will take effect imedialy at My Sites User Profiles, and will replicate to all other sites across the farm after a while. ( I don't know how much time it takes, or by witch conditions ? but will happen less than an hour. )2)      Allow users to change their user profiles through My Site.Shared Services Administration: SSP > User Profile and Properties > View Profile Properties

Here you can edit policy for any properties of user profiles.

 

 By selecting ” Allw users to edit values for this property ” users will be able to change value through their My Sites. Make sure to select “Replicable” chek box, so properties will replicate to all sites after a mystery time!Remember, if you do a user profile import again, all SSP user profiles will be replace by active directory, then SSP will update My Sites and My Sites will update all otther sites entire the farm.  So, do your modifications in your LDAP's Corporate Directory.

 

 

< Neo/ >

SharePoint 2007 et ELECOMP 2008

December 9th, 2008 by farvashan

Last week, we presented SharePoint 2007 at ELECOMP 2008, ELECOMP is the biggest event for Electronics and Computer related industries.

It was a 4 days event and we met thousands of technical guys and those peoples at the directing style all interested What the SharePoint is really about? And What we are able to do by SharePoint?
We met some SharePoint experts also, they were interested to join our community of bloggers and user group, So, we extended this community and now we have 25 Persian SharePoint Bloggers in the SharePoint Solutions Community.

SharePoint Solutions Community

 

<Neo/>

SharePoint 2007 et ELECOMP 2008

December 9th, 2008 by farvashan

Last week, we presented SharePoint 2007 at ELECOMP 2008, ELECOMP is the biggest event for Electronics and Computer related industries.

It was a 4 days event and we met thousands of technical guys and those peoples at the directing style all interested What the SharePoint is really about? And What we are able to do by SharePoint?
We met some SharePoint experts also, they were interested to join our community of bloggers and user group, So, we extended this community and now we have 25 Persian SharePoint Bloggers in the SharePoint Solutions Community.

SharePoint Solutions Community

 

<Neo/>

Managed User Profiles by MOSS 2007's Shared Service Provider

December 4th, 2008 by farvashan

Once upon in time, I decided to change my display name on a SharePoint Team Site, simply I clicked on my current display name.

Then clicked on “Edit Item“, suddenly, the below picture jumped to my monitor's screen!!!

It was a 12.1″ LCD of my IBM ThinkPad X61 Tablet PC (I desire to say IBM, but its Lenovo actually) anyway I expected to see a picture like this:

I did modifications to my profile thousands time before, but what is happening now?! Just to know what is the reason, I created a new Site Collection, gone to my profile page, clicked on “Edit Item“, ok, anything was as usual; I changed my display name also my email address, and saved it. Anything was absolutely normal but then, all the sudden, I saw my old name top of the page! Gone to my profile page again, yeah, it's my old name, clicked on “Edit Item“, it's not possible to modify anything!!!After 15 minutes being confused and looking for bugs, asking my colleagues, restarting my machine, I realized that my thousand modifications before was on a WSS's Team Site, NOT on a Team Site under MOSS 2007.
Ringing a bell . JUser Profiles are managed by Shared Service Provider in MOSS 2007. It's necessary to keep same user profiles on all sites in the farm. You are able to manage any single property of user profiles centrally and keep them stable on huge number of Team Sites, Personal Sites and Portal Sites.What is Shared Service Provider? It's a really cool thing; SSP will Provide some Services on the entire farm as Shared, for example My Sites provided by SSP, so from a team site, your portal site, your Internet facing site or anywhere on the farm, when you are clicking on the My Site top of the page, you will redirect to same personal site. Search is provided by SSP also, so you are able to search across the entire farm, from a specific site. Excel Service is a shared service also, so users can get calculation services from a shared Excel sheet.  Let's come back and talking about amazing features for managing user profiles across the corporation's server farm.User Profiles can be imported to the SharePoint Farm from Active Directory, a third party LDAP or custom business application. You can map any desired property of user profiles by the external properties from active directory or your corporate directory.

From the Shared Services Administration go to the User profiles and properties:

Here you can configure import connections and property mapping.

Default connection is to Active Directory, but you can Create New Connection:

After you created a connection, from the User profiles and properties page, you can add a new profile property or change existing profile property settings.

After all, how we can change a disply name ?? It's a litle complicated J

< Neo >

Managed User Profiles by MOSS 2007's Shared Service Provider

December 4th, 2008 by farvashan

Once upon in time, I decided to change my display name on a SharePoint Team Site, simply I clicked on my current display name.

Then clicked on “Edit Item“, suddenly, the below picture jumped to my monitor's screen!!!

It was a 12.1″ LCD of my IBM ThinkPad X61 Tablet PC (I desire to say IBM, but its Lenovo actually) anyway I expected to see a picture like this:

I did modifications to my profile thousands time before, but what is happening now?! Just to know what is the reason, I created a new Site Collection, gone to my profile page, clicked on “Edit Item“, ok, anything was as usual; I changed my display name also my email address, and saved it. Anything was absolutely normal but then, all the sudden, I saw my old name top of the page! Gone to my profile page again, yeah, it's my old name, clicked on “Edit Item“, it's not possible to modify anything!!!After 15 minutes being confused and looking for bugs, asking my colleagues, restarting my machine, I realized that my thousand modifications before was on a WSS's Team Site, NOT on a Team Site under MOSS 2007.
Ringing a bell . JUser Profiles are managed by Shared Service Provider in MOSS 2007. It's necessary to keep same user profiles on all sites in the farm. You are able to manage any single property of user profiles centrally and keep them stable on huge number of Team Sites, Personal Sites and Portal Sites.What is Shared Service Provider? It's a really cool thing; SSP will Provide some Services on the entire farm as Shared, for example My Sites provided by SSP, so from a team site, your portal site, your Internet facing site or anywhere on the farm, when you are clicking on the My Site top of the page, you will redirect to same personal site. Search is provided by SSP also, so you are able to search across the entire farm, from a specific site. Excel Service is a shared service also, so users can get calculation services from a shared Excel sheet.  Let's come back and talking about amazing features for managing user profiles across the corporation's server farm.User Profiles can be imported to the SharePoint Farm from Active Directory, a third party LDAP or custom business application. You can map any desired property of user profiles by the external properties from active directory or your corporate directory.

From the Shared Services Administration go to the User profiles and properties:

Here you can configure import connections and property mapping.

Default connection is to Active Directory, but you can Create New Connection:

After you created a connection, from the User profiles and properties page, you can add a new profile property or change existing profile property settings.

After all, how we can change a disply name ?? It's a litle complicated J

< Neo >

Application Design and Development based on SharePoint 2007 (Part 1)

November 4th, 2008 by farvashan

SharePoint 2007 is a serious application platform; you will find huge number of companies that developed products top of SharePoint especially based on WSS 3.0. Microsoft will also create next generation of web applications based on SharePoint. I got really surprised right now, during this blog post, when I received a new post from SharePoint Team Blog about Microsoft Azure Services Platform!
Anyway, I've been looking to find kind of methodology about how to develop based on SharePoint, not just developing web parts, but architecting and building whole business application or solution top of SharePoint. I couldn't find any, we have Microsoft Solution Framework (MSF) or Microsoft Operations Framework (MOF), but it's all about Planning, Delivering and Operating solutions based on Microsoft products and technologies. So I started to organize my thoughts and my experiences to recommend kind of framework or methodology for our local use at
Persian SharePoint Solutions.  If you know any official methodology or recommendations from The Microsoft, please ping me a note.

Scope of Applications

First and foremost, what kind of applications we are going to develop top of SharePoint? What kind of applications are suit to be run by SharePoint features and functionality?
Off course building a payroll or accounting system by SharePoint is possible but it's not a good idea. But gathering the list of salaries for this month from the payroll system and showing them to manager on his personal site, or announce him about top 10 incomes from accounting system, is the exact applications of SharePoint.
But I'm not talking about architecting this kind of applications; they are good ideas to make a portal solution more useful and operational. I'm talking about those applications that will store and work with data inside the SharePoint, building an application with SharePoint itself.
SharePoint is great for storing Unstructured Data, mechanism of categorizing, taxonomy, presenting and most important finding data is amazing, so it's obviously great for Unstructured or Semi-Structured Business Applications.

Those Tracking and Collaboration applications for example:

  • Project Tracking
  • Help Desk
  • Custom Issue Tracking
  • Sale Management System
  • CRM ( it's obviously possible,  I'm suggesting Microsoft to use SharePoint for the next generation of Microsoft CRM )

Any applications related to Documents, Forms and Flow of them on the organization like:

  • Office Automation Applications
  • Human Resource Management

Get idea from 40 Application Templates from Microsoft top of WSS 3.0

Benefits

What are the benefits? Building applications top of WSS 3.0 versus developing them from the scratch by .Net Framework?
For a .Net Web Application you need .Net Framework, Microsoft SQL Server and Windows Server for hosting your application, and since WSS 3.0 is a free Windows Service offered by Windows Server 2003 and 2008, so you will pay nothing more, but you will get lots benefits, some of them are:

  • You will not think about how to architect Users, Groups and Roles, WSS 3.0 will provide you a rich architecture for managing users, groups, roles, permission levels and you can define security for your sites, lists, document libraries and any items you will store on your application, it's completely integrated with Active Directory, and you can also plug your custom authentication model.
  • You will use great Document Management features of SharePoint to store and manage documents of your application.
  • You have search functionality of SharePoint, which is almost impossible to develop by yourself.
  • Backup and restore mechanism which is ready made by SharePoint.
  • Expensive Administration Architecture, Coherent User Interface, and most important, out of the box integrations with Microsoft Office and other Microsoft technologies.

Let's go back and talking about WSS 3.0 Application Development Methodology (WSSADM), keep in mind that it's NOT same as STSADM !  It's a Five Step approach I'm recommending to use for building applications top of WSS 3.0.

I will do my bests to describe it by enough details and arrange it on proper order.

Step 1) Defining your Data Model

One of the first steps for traditional application development is Database Design, we have same approach here, but remember reading from and writing to SharePoint's databases is not supported. For developing an application top of SharePoint we have nothing to do with Database designing, it's one of the most advantages of SharePoint that will allow designers and developers to design and develop applications without thinking about database. SharePoint will create proper tables and columns based on your design, and you can use your full potential to stay as a designer and architecting the best solution for your business needs.  So, what you are going to design as your Data Model?

  • What information you need to store on the SharePoint?
  • What are the basic lists of your solution?
  • Witch columns you have on those lists?
  • What kind of relations you will design between those lists?
  • Do you have any documents in your solution?
  • What kind of Document Libraries you need to store your documents?
  • Is there any Metadata that you will describe those documents?
  • What is the relation between your Document Libraries and Lists?
  • How you will categorize your documents and lists?
  • Are there any critical columns that you will use on different lists and document libraries? We will call those columns as Site Columns, define your Site Columns.
  • Do you have especial type of contents that will use on different Lists and Document Libraries? We will call them as Content Types, Define those type of contents that you will share on your solution.
  • How you will arrange Lists and Libraries on different Sites, Sub sites and Site Collections? What is the relation between those sites?
  • Will you send data between sites? Or do you need to have cross site views and reports?
  • Do you need access to external data? If yes, where are those? What kind of access you need? Will you update those data or just need to read them?

So, Defining Data Model is to answer above questions and defining below structure:

  • Site Columns
  • Content Types
  • Lists & Columns
  • Document Libraries and Columns
  • Site Collections, Sites and Sub Sites
  • External Data Sources and how to use them

If you do your Data Model design more close to real requirements, production of your ideas will be done faster and with best quality.

I'm looking to find a proper tool for documenting above definitions, if you know some, please ping me a note.

< Neo > 

Application Design and Development based on SharePoint 2007 (Part 1)

November 4th, 2008 by farvashan

SharePoint 2007 is a serious application platform; you will find huge number of companies that developed products top of SharePoint especially based on WSS 3.0. Microsoft will also create next generation of web applications based on SharePoint. I got really surprised right now, during this blog post, when I received a new post from SharePoint Team Blog about Microsoft Azure Services Platform!
Anyway, I've been looking to find kind of methodology about how to develop based on SharePoint, not just developing web parts, but architecting and building whole business application or solution top of SharePoint. I couldn't find any, we have Microsoft Solution Framework (MSF) or Microsoft Operations Framework (MOF), but it's all about Planning, Delivering and Operating solutions based on Microsoft products and technologies. So I started to organize my thoughts and my experiences to recommend kind of framework or methodology for our local use at
Persian SharePoint Solutions.  If you know any official methodology or recommendations from The Microsoft, please ping me a note.

Scope of Applications

First and foremost, what kind of applications we are going to develop top of SharePoint? What kind of applications are suit to be run by SharePoint features and functionality?
Off course building a payroll or accounting system by SharePoint is possible but it's not a good idea. But gathering the list of salaries for this month from the payroll system and showing them to manager on his personal site, or announce him about top 10 incomes from accounting system, is the exact applications of SharePoint.
But I'm not talking about architecting this kind of applications; they are good ideas to make a portal solution more useful and operational. I'm talking about those applications that will store and work with data inside the SharePoint, building an application with SharePoint itself.
SharePoint is great for storing Unstructured Data, mechanism of categorizing, taxonomy, presenting and most important finding data is amazing, so it's obviously great for Unstructured or Semi-Structured Business Applications.

Those Tracking and Collaboration applications for example:

  • Project Tracking
  • Help Desk
  • Custom Issue Tracking
  • Sale Management System
  • CRM ( it's obviously possible,  I'm suggesting Microsoft to use SharePoint for the next generation of Microsoft CRM )

Any applications related to Documents, Forms and Flow of them on the organization like:

  • Office Automation Applications
  • Human Resource Management

Get idea from 40 Application Templates from Microsoft top of WSS 3.0

Benefits

What are the benefits? Building applications top of WSS 3.0 versus developing them from the scratch by .Net Framework?
For a .Net Web Application you need .Net Framework, Microsoft SQL Server and Windows Server for hosting your application, and since WSS 3.0 is a free Windows Service offered by Windows Server 2003 and 2008, so you will pay nothing more, but you will get lots benefits, some of them are:

  • You will not think about how to architect Users, Groups and Roles, WSS 3.0 will provide you a rich architecture for managing users, groups, roles, permission levels and you can define security for your sites, lists, document libraries and any items you will store on your application, it's completely integrated with Active Directory, and you can also plug your custom authentication model.
  • You will use great Document Management features of SharePoint to store and manage documents of your application.
  • You have search functionality of SharePoint, which is almost impossible to develop by yourself.
  • Backup and restore mechanism which is ready made by SharePoint.
  • Expensive Administration Architecture, Coherent User Interface, and most important, out of the box integrations with Microsoft Office and other Microsoft technologies.

Let's go back and talking about WSS 3.0 Application Development Methodology (WSSADM), keep in mind that it's NOT same as STSADM !  It's a Five Step approach I'm recommending to use for building applications top of WSS 3.0.

I will do my bests to describe it by enough details and arrange it on proper order.

Step 1) Defining your Data Model

One of the first steps for traditional application development is Database Design, we have same approach here, but remember reading from and writing to SharePoint's databases is not supported. For developing an application top of SharePoint we have nothing to do with Database designing, it's one of the most advantages of SharePoint that will allow designers and developers to design and develop applications without thinking about database. SharePoint will create proper tables and columns based on your design, and you can use your full potential to stay as a designer and architecting the best solution for your business needs.  So, what you are going to design as your Data Model?

  • What information you need to store on the SharePoint?
  • What are the basic lists of your solution?
  • Witch columns you have on those lists?
  • What kind of relations you will design between those lists?
  • Do you have any documents in your solution?
  • What kind of Document Libraries you need to store your documents?
  • Is there any Metadata that you will describe those documents?
  • What is the relation between your Document Libraries and Lists?
  • How you will categorize your documents and lists?
  • Are there any critical columns that you will use on different lists and document libraries? We will call those columns as Site Columns, define your Site Columns.
  • Do you have especial type of contents that will use on different Lists and Document Libraries? We will call them as Content Types, Define those type of contents that you will share on your solution.
  • How you will arrange Lists and Libraries on different Sites, Sub sites and Site Collections? What is the relation between those sites?
  • Will you send data between sites? Or do you need to have cross site views and reports?
  • Do you need access to external data? If yes, where are those? What kind of access you need? Will you update those data or just need to read them?

So, Defining Data Model is to answer above questions and defining below structure:

  • Site Columns
  • Content Types
  • Lists & Columns
  • Document Libraries and Columns
  • Site Collections, Sites and Sub Sites
  • External Data Sources and how to use them

If you do your Data Model design more close to real requirements, production of your ideas will be done faster and with best quality.

I'm looking to find a proper tool for documenting above definitions, if you know some, please ping me a note.

< Neo > 

How to Fix “The file exists. (Exception from HRESULT: 0×80070050)” error

October 20th, 2008 by farvashan

Last month I tried to login into my SharePoint site but I got this error:
The file exists. (Exception from HRESULT: 0×80070050)

After 1day researches I solved this problem and in this article I want to show you how I did it.

This error occurred when I tried to install Microsoft Exchange Server in windows 2003 server. I need Exchange Server for my other purpose, but exchange server needed Active Directory (AD) to be installed. I'm using Windows 2003 server in my virtual PC and I'm installed SharePoint server 2007 on it. MOSS use Windows User and Groups for authorizing users and groups, and I didn't install AD before it.

However, after installing Active directory in my windows 2003, when I want to login into SharePoint sites, I'm confronting with above error.
It's a bad idea that you setup active directory after installing SharePoint server, but I do it! And I repair my wrong work with solving the problem.
Now I describe why and when this error occurs.

This error occurs when user's SID (System ID) has changed and SharePoint couldn't find new SID from database. When you try to setup Active Directory after installing MOSS, AD changes SID for all users. After Windows installed on your PC, Windows generate SID for host and users and assign unique SID for all of them automatically. When you install SharePoint in your machine, SharePoint stores user's information like SID, user's Site ID, permissions. in database. When you want to login to your site, SharePoint check user's SID from database, it will find out that active user's SID do not match with database store SID for that user, so SharePoint doesn't authorize user. And that error occurs.
Usually this error does not appear with AD changes, it may occurs when your network domain address changed or any other reason that may changes SID on SharePoint servers.
I found 3 ways to solve this problem:

  1. Opening Central Administrator/ Web Application in Site Collection Administrator. delete old users that you want login to site and then create that user again from this page. It causes to create new user with new SID in sharepoint database.
  2. From Central Administrator go to Application Management in Application Security open Policy for Web Application. Choose Add User and click next. Select a Username from Active Directory and enter in this section, then check Full Control option and select Account Operate as System for this user. Click Finish. (This step works if you can access to Central Administrator and AD is installed on your PC.)
    If you can access to Central Administrator page, both above steps are good to solve problem, but if you can't open this page like me, You should use next step to solving error.
  3. This step need more attention and is a technical way to solve this error.  I notice you to use this step with your responsibility!
    You need to run some Query in Database to changing SID for sites that have error.
    Open SQL Server from Management Studio, select New Query. Choose database for site that have error from database list. For example choose SharePoint_AdminContent_* ( (*) contain some number) database for Central Administrator Site, then Type below Query:

SELECT s.Id, w.FullUrl
FROM Sites s inner join Webs w on s.RootWebId = w.Id

After running query, Results show you all Site ID for your selected database.
Type next query in new query page and run it. Tp_login parameter contain username that you try to login into site and tp_Site ID contain number of Site ID from previous query result.
SELECT *
FROM UserInfo
WHERE tp_Login='Host/UserName'  and  tp_SiteID='8395827D-3815-470A-8537-409EDC54DA54'

Result shows SID for selected username. (In my site “Administrator” is username and “FAFA” is my hostname).now you should find SID for this user from Windows and replace it with database stored SID! For gain user's SID you need PStools utility. You can download it from here. After unzipping, from command prompt go to Pstools directory and type this command:
Psgetsid \hostname username
This command's result for my machine shown in image:

psTools command's result is in s-n-n-n format and you need to convert it to Hex format. There are some vbscript for converting both formats together, but after some research I found an experiential way to do it.
For example my administrator's SID is:
S-1-5-21-4064436893-45162017-310737895-500
And Hex format of it:
0×0105000000000005150000009D6242F2211EB102E77B8512F4010000
But how I converted it:

0x  Hex sign
01 )S-1(
05 (number of dashes – 2=7-2=5)
000000000005 (5 = 0×000000000005, big-endian)
15000000 (21 = 0×15000000, little-endian)
9D6242F2 (4064436893 = 0xF242629D, little-endian)
211EB102 (45162017 = 0×02B11E21, little-endian)
E77B8512 (310737895 = 0×12857BE7, little-endian)
F4010000 (500 = 0×01F4, little-endian)a

You can use calculator or other tools like Microsoft PowerCalc to converting Decimal number to hex.
Now you should to update database table with new SID that produce in step 4 .open query page and type this query :
UPDATE UserInfo
SET tp_SystemID = 0×010500000000000515000000B83B756A5D4EEB75EA44AFC7F4010000
FROM UserInfo
WHERE tp_ID = '1' and tp_guid='7AC7285B-ACEB-4942-AF7E-CD9191FDE5A4' and
      tp_Login='host/username'  and tp_SiteID = '8395827D-3815-470A-8537-409EDC54DA54'

I'm using other parameters like (tp_ID,tp_guid,..) in “WHERE” command to update correct row of User Info table. You can use these parameters with correct data from step 2 results.

Steps Completed and now you can browse your site with your Username without any errors.

 

See Original article in my Persian blog

See More Information about our community

< Arash >

How to Fix “The file exists. (Exception from HRESULT: 0×80070050)” error

October 20th, 2008 by farvashan

Last month I tried to login into my SharePoint site but I got this error:
The file exists. (Exception from HRESULT: 0×80070050)

After 1day researches I solved this problem and in this article I want to show you how I did it.

This error occurred when I tried to install Microsoft Exchange Server in windows 2003 server. I need Exchange Server for my other purpose, but exchange server needed Active Directory (AD) to be installed. I'm using Windows 2003 server in my virtual PC and I'm installed SharePoint server 2007 on it. MOSS use Windows User and Groups for authorizing users and groups, and I didn't install AD before it.

However, after installing Active directory in my windows 2003, when I want to login into SharePoint sites, I'm confronting with above error.
It's a bad idea that you setup active directory after installing SharePoint server, but I do it! And I repair my wrong work with solving the problem.
Now I describe why and when this error occurs.

This error occurs when user's SID (System ID) has changed and SharePoint couldn't find new SID from database. When you try to setup Active Directory after installing MOSS, AD changes SID for all users. After Windows installed on your PC, Windows generate SID for host and users and assign unique SID for all of them automatically. When you install SharePoint in your machine, SharePoint stores user's information like SID, user's Site ID, permissions. in database. When you want to login to your site, SharePoint check user's SID from database, it will find out that active user's SID do not match with database store SID for that user, so SharePoint doesn't authorize user. And that error occurs.
Usually this error does not appear with AD changes, it may occurs when your network domain address changed or any other reason that may changes SID on SharePoint servers.
I found 3 ways to solve this problem:

  1. Opening Central Administrator/ Web Application in Site Collection Administrator. delete old users that you want login to site and then create that user again from this page. It causes to create new user with new SID in sharepoint database.
  2. From Central Administrator go to Application Management in Application Security open Policy for Web Application. Choose Add User and click next. Select a Username from Active Directory and enter in this section, then check Full Control option and select Account Operate as System for this user. Click Finish. (This step works if you can access to Central Administrator and AD is installed on your PC.)
    If you can access to Central Administrator page, both above steps are good to solve problem, but if you can't open this page like me, You should use next step to solving error.
  3. This step need more attention and is a technical way to solve this error.  I notice you to use this step with your responsibility!
    You need to run some Query in Database to changing SID for sites that have error.
    Open SQL Server from Management Studio, select New Query. Choose database for site that have error from database list. For example choose SharePoint_AdminContent_* ( (*) contain some number) database for Central Administrator Site, then Type below Query:

SELECT s.Id, w.FullUrl
FROM Sites s inner join Webs w on s.RootWebId = w.Id

After running query, Results show you all Site ID for your selected database.
Type next query in new query page and run it. Tp_login parameter contain username that you try to login into site and tp_Site ID contain number of Site ID from previous query result.
SELECT *
FROM UserInfo
WHERE tp_Login='Host/UserName'  and  tp_SiteID='8395827D-3815-470A-8537-409EDC54DA54'

Result shows SID for selected username. (In my site “Administrator” is username and “FAFA” is my hostname).now you should find SID for this user from Windows and replace it with database stored SID! For gain user's SID you need PStools utility. You can download it from here. After unzipping, from command prompt go to Pstools directory and type this command:
Psgetsid \hostname username
This command's result for my machine shown in image:

psTools command's result is in s-n-n-n format and you need to convert it to Hex format. There are some vbscript for converting both formats together, but after some research I found an experiential way to do it.
For example my administrator's SID is:
S-1-5-21-4064436893-45162017-310737895-500
And Hex format of it:
0×0105000000000005150000009D6242F2211EB102E77B8512F4010000
But how I converted it:

0x  Hex sign
01 )S-1(
05 (number of dashes – 2=7-2=5)
000000000005 (5 = 0×000000000005, big-endian)
15000000 (21 = 0×15000000, little-endian)
9D6242F2 (4064436893 = 0xF242629D, little-endian)
211EB102 (45162017 = 0×02B11E21, little-endian)
E77B8512 (310737895 = 0×12857BE7, little-endian)
F4010000 (500 = 0×01F4, little-endian)a

You can use calculator or other tools like Microsoft PowerCalc to converting Decimal number to hex.
Now you should to update database table with new SID that produce in step 4 .open query page and type this query :
UPDATE UserInfo
SET tp_SystemID = 0×010500000000000515000000B83B756A5D4EEB75EA44AFC7F4010000
FROM UserInfo
WHERE tp_ID = '1' and tp_guid='7AC7285B-ACEB-4942-AF7E-CD9191FDE5A4' and
      tp_Login='host/username'  and tp_SiteID = '8395827D-3815-470A-8537-409EDC54DA54'

I'm using other parameters like (tp_ID,tp_guid,..) in “WHERE” command to update correct row of User Info table. You can use these parameters with correct data from step 2 results.

Steps Completed and now you can browse your site with your Username without any errors.

 

See Original article in my Persian blog

See More Information about our community

< Arash >