zoukankan      html  css  js  c++  java
  • 学习:Using STSADM o migrateuser on a recreated account(转)


    Reference: http://blog.krichie.com/2008/06/27/using-stsadm-o-migrateuser-on-a-re-created-account/

    I see this come up quite a bit and thought I would show you how to work around the problem.  I thought I had show this on my old blog a couple of years ago, but can’t seem to find it.

    Scenario

    A user in your organization is deleted, and re-created using the same domain and sAMAccountName.  This may have been because of an accident, or a previous employee who left your organization and was then rehired. 

    For example, my account in the NA domain with a sAMAccountName of krichie (NA\krichie).   The account was deleted and re-created with the same sAMAccountName (NA\krichie)

    Because SharePoint stores SID information with the user in it’s tables, the account will no longer work until you either

    1) Remove the user completely and re-add, or

    2) Use the STSADM -o migrateuser command

    The problem, is that if you try to use -o migrateuser such as:

    STSADM -o migrateuser -oldlogin na\krichie -newlogin na\krichie -ignoresidhistory

    The command will fail reporting “Cannot complete this action…Please try again”

    Cause

    This is because the -oldlogin and -newlogin arguments are the same.  As far as stsadm -o migrateuser is concerned, there is nothing to migrate.

    Solution

    The solution is to migrate the user to a temporary account and then back from the temporary account to the new account with the same name such as:

    STSADM -o migrateuser -oldlogin na\krichie -newlogin na\temporaryaccount -ignoresidhistory

    STSADM -o migrateuser -oldlogin na\temporaryaccount -newlogin na\krichie -ignoresidhistory

    MigrateUser will then see that the accounts are different and allow the operation to be performed.  You then just run again from the temporary account to the new re-created account and your good to go.

    Comments

    SharePoint 迁移用户

    SharePoint迁移到不同的AD中时,可能会出现相同的用户名,
    但是在SharePoint中把他当成2个用户,需要通过STSADM进行进行替换:
    STSADM -o migrateuser -oldlogin na\krichie -newlogin na\temporaryaccount -ignoresidhistory

    STSADM -o migrateuser -oldlogin na\temporaryaccount -newlogin na\krichie -ignoresidhistory
     

    Migrateuser:Stsadm 操作 (Office SharePoint Server)

    将 Microsoft Office SharePoint Server 2007 中的用户帐户迁移到新的登录名和二进制 ID。如果已经存在一个新的登录名项,则会将该项标记为要进行删除以便进行迁移:将用户访问权限从一个域用户迁移到另一个域用户。
     

    Migrating SharePoint Forms Based Authentication Accounts

    For example:

    stsadm -o migrateuser -oldlogin “aspnetsqlmembershipprovider:user″ -newlogin”nanmumembershipprovider:user″ -ignoresidhistory
    Echo Liu at 4/22/2009 4:52 PM

    MigrateUserAccount by Code

    Use the api: SPFarm.MigrateUserAccount ,
    can migrateUserAccount By Code.
     
  • 相关阅读:
    套接字中的setsockopt接口功能
    memmove()函数介绍
    static 关键字和类的加载顺序
    Navicat 链接mysql 显示 Clinet dose not support authentication protocol request by server ;consider upgrading MySQL client
    maven项目引入依赖之后,jar包没有自动导入报错
    @RequestParam 和@RequestBody 的区别?
    java中 & ^ ~ 的运算
    form表单post请求乱码问题
    struts2+hibernate3.2分页
    AJAX建立和服务器连接,接收服务器技术处理服务器返回的数据
  • 原文地址:https://www.cnblogs.com/LeimOO/p/1530368.html
Copyright © 2011-2022 走看看