Google Groups no longer supports new Usenet posts or subscriptions. Historical content remains viewable.
Dismiss

LookupAccountName & runas

160 views
Skip to first unread message

JG

unread,
May 20, 2008, 2:39:16 AM5/20/08
to
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?


JG

unread,
May 20, 2008, 5:15:33 AM5/20/08
to
"JG" <sp...@spam.com> wrote in message news:g0trr2$9d6$1...@news.datemas.de...


Just to add, after rebooting the machine. I have to do a runas again - till
I do that,
LookupAccountName fails.


Marty List

unread,
Aug 11, 2008, 5:04:09 PM8/11/08
to


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 **

0 new messages