title: On windows, is it possible to run a single goroutine as a different user?
body: <p>How do you delegate the running of a goroutine to another non administrator account on windows? I see you can do this on <a href="https://groups.google.com/forum/#!topic/golang-nuts/IpfEDBVSE34" rel="nofollow noreferrer">Linux</a> using <code>syscall.Setuid()</code>. I can't see how to do this on Windows using the windows syscall package. I'd like to be able to set the account the goroutine runs under while the program is running. Is this possible?</p>
  
  <p><strong>Bit of background :-</strong> I want to switch the user that runs the goroutine so I can change the OS User passed to Oracle during the database connection when I use go-oci8 (See my other <a href="https://stackoverflow.com/questions/26115614/setting-os-user-with-oracle-call-interface-oci">question</a>). I need to connect to the database and it uses the logged in user (OS User) as part of the security. In java I can change the environment variable during connection set up (or flick the username environmental variable if only connecting for a single user). </p>
  
  <p>I have the users database username (this matches the OS user name) and I get the database user password. I don't have the users windows login password. I was hoping to be able to delegate running a goroutine to the required windows user from the main go program running as admin in a similar way to Linux port binding example I highlighted. Changing the Oracle login to not use OS User is not an option so it will be back to Java if I can't work it out :-( .   </p>