0

Where I work (as a developer), certain databases can only be accessed if the app doing the accessing is run with runas /netonly and an individual account on a particular domain. (The connection strings specify Trusted_Connection=yes.)

runas /netonly specialdomain\myuser "C:\thepath\SSMS.exe"

Our developer machines and corporate accounts are not members of specialdomain. There is no local account on my developer machine that corresponds to specialdomain\myuser.

But this works to give us access, even with a VPN in the mix. However, it can be significantly inconvenient, because of all the times I have to specify a password -- especially if I'm debugging an app that will have to be run with runas /netonly, and am re-starting the app a lot.

I have been experimenting with PSEXEC, trying to get around this.

Because I am running the apps locally, I have been using PSEXEC without a target computer name. I have been using the -e switch: I read that this -- which specifies that the account's profile not be loaded -- is equivalent to specifying /netonly on runas.

>psexec -e -u specialdomain\myuser -p mypassword "C:\thepath\SSMS.exe"

I get this message:

PsExec could not start ssms.exe:
We can't sign you in with this credential because your domain isn't available. Make sure your device is connected to your organization's network and try again. If you previously signed in on this device with another credential, you can sign in with that credential.

I don't believe that this domain is truly unavailable, since runas /netonly works, but I admit I don't know anything about that domain. I don't think this error is the result of a firewall rule, either: I've checked.

After considerable Googling, setting-tweaking, and experimentation, I've generated a lot of other error messages and removed lingering PSEXESVC service instances multiple times, but haven't made any real progress.

I'm guessing that it has something to do with the combination of -e, a domain account, and my local machine not being connected to that domain, but I don't know. Suggestions are welcome.

Ann L.
  • 101
  • 2

0 Answers0