Ureader.com  
Microsoft software help and Community
   home   |   control panel login   |   archive   |  
 
platform
active.directory
adsi
adsi.iis-admin
base
com_ole
complus_mts
component_svcs
database
directx
gdi
graphics_mm
internet.client
internet.server
internet.server.isapi-dev
localization
mapi
messaging
msi
mslayerforunicode
multimedia
networking
networking.ipv6
sdk_install
security
shell
telephony.tapi_2
telephony.tapi_3
telephony.tsp
telephony.wte
tools
ui
ui_shell
win_base_svcs
win16
  
 
date: Tue, 20 May 2008 14:45:33 +0530,    group: microsoft.public.platformsdk.active.directory        back       


Re: LookupAccountName & runas   
"JG"  wrote in message news:g0trr2$9d6$1@news.datemas.de...
> Hi,
>    I have a program which calls LookupAccountName for a AD user in
> the following format - DomainName\UserName.
>
> LookupAccountName fails with the following error
>
> 1789 is ERROR_TRUSTED_RELATIONSHIP_FAILURE in the Windows SDK -
> "The trust relationship between this workstation and the primary domain
> failed."
>
> Now, I run the following from the command line
> runas /user:domainname\username cmd.exe
>
> It successfully opens a cmd window as the user.
>
> After this I run my program again, the same LookupAccountName call 
> succeeds.
>
> Any ideas, how something like this could happen?


Just to add, after rebooting the machine. I have to do a runas again - till 
I do that,
LookupAccountName fails.
date: Tue, 20 May 2008 14:45:33 +0530   author:   JG

Re: LookupAccountName & runas   
JG wrote:
> "JG"  wrote in message news:g0trr2$9d6$1@news.datemas.de...
>> Hi,
>>    I have a program which calls LookupAccountName for a AD user in
>> the following format - DomainName\UserName.
>>
>> LookupAccountName fails with the following error
>>
>> 1789 is ERROR_TRUSTED_RELATIONSHIP_FAILURE in the Windows SDK -
>> "The trust relationship between this workstation and the primary domain
>> failed."
>>
>> Now, I run the following from the command line
>> runas /user:domainname\username cmd.exe
>>
>> It successfully opens a cmd window as the user.
>>
>> After this I run my program again, the same LookupAccountName call 
>> succeeds.
>>
>> Any ideas, how something like this could happen?
> 
> 
> Just to add, after rebooting the machine. I have to do a runas again - till 
> I do that,
> LookupAccountName fails. 
> 
> 


Something is wrong with the computer's account in AD, the easiest 
solution is to remove it from the domain, check to make sure the 
computer account was deleted, and then join the domain again.

This sort of problem can happen when someone deletes the computer 
account from the domain (maybe during cleanup or maybe they deleted the 
wrong/similar name).  The solution is to join a workgroup (leave the 
domain), then rejoin the domain.

Or it can happen when a computer is restored from backup and the 
computer account's password is not current.  Domain members change their 
password with a domain controller every 30 days by default.  For 
example, if the backup was made on Monday, and the computer changed it's 
AD password on Tuesday, and then on Wednesday the computer was restored 
from the backup, it would be using the old password.  The solution is to 
leave the domain and rejoin again.

This problem could also happen if a computer was cloned and there are 
more than one identical computers connecting to the domain.  The 
solution would be to run Sysprep on the cloned computers, and then 
rejoin the domain.
** Posted from http://www.teranews.com **
date: Mon, 11 Aug 2008 15:04:09 -0600   author:   Marty List

Google
 
Web ureader.com


    COPYRIGHT 2007, YARDI TECHNOLOGY LIMITED, ALL RIGHT RESERVE  |   contact us