1

I prefer to work from Linux, but my workplace forces me to use Windows. I'm moving my workflow to BASH in Windows, to achieve a golden middle ground.

My problem is launching SQL management studio from my BASH on Windows as another user (Windows login isn't tied to our AD, but SQL login is). So far I've been using a batch script that does:

runas /netonly /user:domain\user "C:\Program Files\...\Ssms.exe"

Which then prompts for my password. However, from BASH on Windows I try:

cmd.exe runas /netonly /user:domain\user "C:\Program Files\...\Ssms.exe" 

It will open SQL Management Studio without prompting for my password like the Windows cmd normally does. Does anyone have any ideas on how to force it to ask for my password when doing this?

1 Answer 1

-1

Use the following command (with the /c included):

cmd.exe /c runas /netonly /user:domain\user yourprogram
2
  • 3
    Welcome to Superuser! This seems to be a Try This! answer. Would you mind explain why you want the asker to try that and what you changed?. Also see How do I write a good answer?
    – CaldeiraG
    Apr 23, 2018 at 13:01
  • @Eric - The author wants to launch SSMS from within the WSL instance they are running. This answer does not accomplish that goal, the author also specifically indicates their knowledge of this method, this answer does not answer the author's question..
    – Ramhound
    Apr 23, 2018 at 13:30

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .