2013-11-04 2 views
1

사용자를 Active Directory 내의 다른 조직 구성 단위로 이동하려고하면 System.UnauthorizedAccessException {"Access is denied."} 오류가 발생합니다.Active Directory에서 사용자를 OU로 이동하십시오. (액세스 거부 오류)

아래 코드는 제가 사용하고있는 코드입니다. MoveTo로 전화하면 오류가 발생합니다. MoveTo에 대한 호출을 주석 처리하면 CommitChanges이 호출되면 사용자 전화 번호가 성공적으로 업데이트되어 권한 오류가 아닐 수 있습니다.

사용자가 새로운 OU로 사용자를 이동할 수없는 이유는 무엇입니까?

 Try 

     Using Entry As DirectoryEntry = GetDirectoryEntry(DomainLogin) 'Retrieves the directory entry for the user. 

      Entry.Properties("telephoneNumber").Value = "9999999" 'This successfully changes the user's phone number 

      Dim strUserPass As String() = nBase.oAppControl.GetADUsernameAndPassword() 

      'Create DirectoryEntry for the target OU 
      Dim newLocation As DirectoryEntry = New DirectoryEntry("LDAP://testgrp.local/OU=Accounts,DC=local", strUserPass(0), strUserPass(1)) 

      Entry.MoveTo(newLocation) 'Throws exception 
      Entry.CommitChanges() 


      Return True 

     End Using 

    Catch ex As Exception 
     Return False 

    End Try 
+1

'strUserPass'와 함께 전달 된 자격증 명에 사용자 이동 권한이 있습니까? –

+1

GUI를 통해 사용자를 이동할 수 있습니까? Active Directory 사용자 및 컴퓨터 콘솔처럼? –

+0

내일 권한을 다시 확인하고 Windows를 통해 시도해 보겠습니다. 'strUserPass'에 대한 자격 증명은 전화 번호가 변경되도록합니다 - 사용자를 OU로 옮길 수있는 별도의 허가가 있습니까? 응답 주셔서 감사합니다 –

답변

0

가 귀하의 질문에 너무 늦었어요,하지만 난 검사와 같은 문제를 가지고 사람들을 위해, OU의 사용자를 이동하는 최소 권한이 Account Operator이지만. 확실히 Enterprise AdminDomain Admin에는 훨씬 더 많은 권한이 있습니다.

관련 문제