Share via


Create user in sharepoint

Question

Wednesday, October 17, 2012 3:06 PM

Hi,

 I am new to Sharepoint, Can we create user that is local not tied to Active Directory user in Sharepoint? If so, how to create local user?

Thanks in advance

All replies (21)

Wednesday, October 17, 2012 5:42 PM ✅Answered

Hi,

Usually, just enter the username in SharePoint by using servername\username instead of domainname\username. If you meant how do I create a new local user on the server, just click help on the server and type create new user account and help will provide a step by step guide. Just because you can doesn't mean you should add local users to your SharePoint environment. However, there are times when it is necessary...

-Ivan

Ivan Sanders My LinkedIn Profile, My Blog, @iasanders.


Wednesday, October 17, 2012 7:51 PM ✅Answered

Specifically, you would run:

$user = Get-SPUser -Identity servername\user -Web http://sharepointsite #a SharePoint site where the user is a member of
Move-SPUser -Identity $user -NewAlias domain\user -IgnoreSid

Because you have to bind to a user object, I generally prefer the stsadm implementation:

stsadm -o migrateuser -oldlogin servername\user -newlogin domain\user -ignoresidhistory

SharePoint - Nauplius Applications
Microsoft SharePoint Server MVP - 2012


Wednesday, October 17, 2012 5:10 PM

Is there a reason the user does not exist in Active Directory?

Jason Warren

Infrastructure Architect

Habanero Consulting Group

habaneroconsulting.com/blog


Wednesday, October 17, 2012 6:36 PM

Hi,

 After I've created local user not tied to Active Dorectory, the user added or modified some documents in document libraries, that create version history tied to that user. Later at some point the user created in AD, Can we able to associate the local user to AD user and all the version history associated to local user now attached to AD user. Is this possible?


Wednesday, October 17, 2012 6:59 PM

Hi,

Though we can transfer a user from a one domain to another and SharePoint is SID History aware. There are not any free tools that I am aware of, there are several of the paid variations..

-Ivan

Ivan Sanders My LinkedIn Profile, My Blog, @iasanders.


Wednesday, October 17, 2012 7:20 PM

KJosh,

You would use the Move-SPUser command to convert the SharePoint profile from localuser to ADuser after you have created the user account in AD. This will ensure that any documents, permissions, etc, get tied to the new AD user.  See the syntax examples here:

http://technet.microsoft.com/en-us/library/ff607729.aspx

-Corey


Wednesday, October 17, 2012 7:57 PM

Yes, in the SharePoint Management Shell.  Make sure to right click the SharePoint Management Shell and select "Run As Administrator".

SharePoint - Nauplius Applications
Microsoft SharePoint Server MVP - 2012


Wednesday, October 17, 2012 8:01 PM

Yes, in the SharePoint Management Shell.  Make sure to right click on the SharePoint Management Shell and select "Run As Administrator".

SharePoint - Nauplius Applications
Microsoft SharePoint Server MVP - 2012


Wednesday, October 17, 2012 8:17 PM

See: http://social.technet.microsoft.com/Forums/en-ZA/sharepoint2010setup/thread/a9a5e00e-914e-4697-a45e-c73b95bc207d

[System.Reflection.Assembly]::LoadWithPartialName("Microsoft.SharePoint.Administration")
$peoplePicker = New-Object ("Microsoft.SharePoint.Administration.SPPeoplePickerSettings")
Write-Host $peoplePicker.AllowLocalAccount
$peoplePicker.AllowLocalAccount = $true

SharePoint - Nauplius Applications
Microsoft SharePoint Server MVP - 2012


Thursday, October 18, 2012 5:13 PM

With local user "TestUser", I've created some documents. Those documents version history displaying the TestUser. Now used stsadm command to move local 'TestUser' to active directory user "ADUser",  got the error "New user doesnot have valid SID history". Then used -ignoresidhistory and the command succeeded. But when I go back to the SharePoint site, still document history displaying 'TestUser'. I thought all the document's version history updated with the "AdUser" when I rn the stsadm tool. Am I wrong?

Thanks in advance


Thursday, October 18, 2012 7:44 PM

When I moved "TestUser" with another user "NewUser" with move-spuser command, does it move the version history associated with the 'TestUser' to "NewUser"?  What is the command to move all the version history associated with the old user to "Newuser"?

Thanks in advance.


Thursday, October 18, 2012 7:47 PM

Any object that has a reference to the TestUser will move to the NewUser.

SharePoint - Nauplius Applications
Microsoft SharePoint Server MVP - 2012


Thursday, October 18, 2012 7:55 PM

In my case it is not updating reference from testUser to NewUser, I ran move-spuser command with -Ignoresidhistory option, does this have to do anything? but when I query with Get-spuser to get all the users on a particular website, it is displaying new user with display name 'TestUser'. When I looked docuemnts version history which were uploaded 'testUser' still displaying 'TestUser' instead of 'NewUser'.

Thanks


Thursday, October 18, 2012 8:02 PM

What is your farm build # under Central Admin -> Manage servers in this farm?

Are you using the following commands:

$user = Get-SPUser -Identity domain\testuser -Web http://sharepointsite
Move-SPUser -Identity $user -NewLogin domain\NewUser -IgnoreSid

SharePoint - Nauplius Applications
Microsoft SharePoint Server MVP - 2012


Thursday, October 18, 2012 8:20 PM

Configuration database version: 14.0.4762.1000

Microsoft Sharepoint Foundation 2010.

I've tried the same command

$user = Get-SPUser -Identity domain\testuser -Web http://sharepointsite
Move-SPUser -Identity $user -NewAlias domain\NewUser -IgnoreSid

Thanks


Thursday, October 18, 2012 8:22 PM

I would strongly recommend you upgrade to Service Pack 1 and possibly the Feb 2012 or Aug 2012 CU.

SharePoint - Nauplius Applications
Microsoft SharePoint Server MVP - 2012


Friday, October 19, 2012 1:14 PM

SP1 already installed, I've installed Aug2012 CU, still the same but get-spuser on my site displaying the 'NewUser' in its users list not "TestUser" with display name "Testuser"  user login as "NewUser". That means move-spuser is updating fine. Why display name not updated to "Newuser"'s name? Am I missing something here? Do I need to do active directory sync?


Friday, October 19, 2012 2:22 PM

Are you running the Config Wizard on each server after installing SharePoint updates?  The version number you posted was for SharePoint RTM, not SP1.

SharePoint - Nauplius Applications
Microsoft SharePoint Server MVP - 2012


Friday, October 19, 2012 2:26 PM

When I tried to install sp1, it said that was already installed, so I installed Aug2012 CU. After I installed Aug2012 CU, I ran configuration wizard, now my version number is 14.0.6126.5000.


Friday, October 19, 2012 2:30 PM

Display name is fixed with the following command Set-spuser -Identity "NewUser" -web "Weburl". Now Get-user is displaying the userloin name, display name properly. Still version history not updated and showing old user's name in modified by columns.

Thanks


Friday, November 9, 2012 3:00 AM

Hi KJshoh,

After the user was migrated, we should run the User Profile Service to SharePoint synchronization job to update the user's display name.

Per my testing, after Move-SPUser, a new user with the same but different account(new alias) will be created in the SharePoint site. We can check that from:
http://server/_catalogs/users/simple.aspx

To update the display name to be a valid one, we can run the job as I mentioned early. Or, please use the following PowerShell to update it:

$user = Get-SPUser -Identity servername\user -Web http://sharepointsite #a SharePoint site where the user is a member of
$user.Name = "new name here"
$user.Update()

Thanks,
Jinchun Chen

Jinchun Chen
Forum Support
Please remember to mark the replies as answers if they help and unmark them if they provide no help. If you have feedback for TechNet Subscriber Support, contact tnmff AT microsoft.com(Please replace AT with @)