2

My development pc at the office is NOT on the Active Directory. It's a normal install, no domain. Everything works fine.

When i wish to connect to a share drive, I need to map the drive with my company credentials

eg. CompanyDomain\UserName and password eg. Foo\User1 and secretpassword

Works great.

So now I'm trying to run Visual Studio and SSMS under my NETWORK user credentials. So i left-click-hold the shift button, right-click the application icon under the 'start' button, and then left click the Run As A Different User.

I enter my credentials (as above) .. and fail. Say's my credentials are bad.

WTF? Is there any way I can fix this? figure out what is goin gon?

cheers :)

P.S. OS is Win 7 RC

Pure.Krome
  • 6,508
  • 18
  • 73
  • 87

4 Answers4

5

You can only run an application under an account that exists locally. But as Windows will fallback to using the {username,password} you entered to authenticate on when other methods fail (or are unavailable) there is a work around.

Create a local account with the same name (domain\pure.\pure) and the same password, then run the program that needs network resources under the new local account. You will need to ensure the new local account has access to the local resources it needs also.

Richard
  • 5,324
  • 1
  • 23
  • 20
2

Assuming I understand the question correctly:

When you map a domain resource like a network share you need to authenticate to the domain controller, hence you put in your domain username and password as you describe.

But the Visual Studio installed on your PC is a local resource and if your PC does not belong to the domain no domain accounts will have access to it. To run VS you would need to authenticate locally to the SAM on your PC, and obviously this requires a local account. You won't be able to run VS as a domain account unless you have in some way granted domain accounts access to your PC i.e. joined your PC to the domain.

Why do you need to run VS as a domain account? Is it so that VS has access to domain resources? If so just run VS as normal, but map a network drive (any network drive) first, and VS should be able to use domain resources.

JR

John Rennie
  • 7,776
  • 1
  • 23
  • 35
  • Your assumption is correct :) I was trying to see if I could run VS as a domain account so, when i try to remote debug, it's connecting (both directions) as my domain account and not the local (foreign) account. Also, i was going to see if I could run SSMS as a domain user, and then log in with INTERGRATED instead of using a Sql User to authenticate :) – Pure.Krome Jul 14 '09 at 11:46
2

Your computer is foreign to the domain, and as such foreign to the fileservers etc. When you map a drive, you supply the foreign resource fileserver with your foreign credentials, the fileserver authenticates with the domain, which works fine because the fileserver is a member of the domain. When you RunAs a local application with foreign credentials, it doesnt work because your workstation cant authenticate with the foreign domain.

Posipiet
  • 186
  • 1
1

Just use runas command with /netonly switch and it should work. Like this:

runas /netonly /user:DOMAIN\username "path to the application.exe"
Vladimir
  • 153
  • 1
  • 8