I run 'net use /user:"Someone" \somewhere', and it works well with cmd.exe.
With the same cmd.exe, run 'bash --login -i' to use the cygwin/bash, and run the same command but I get the error message as follows.
System error 67 has occurred.The network name cannot be found.
Why can't I run 'net use /user' command with cygwin/bash?
In cygwin's bash, you need to escape any of those forwardback slashes, as those are interpreted as escape characters.
try this
net use /user:"Someone" \\\\server\\share
or use single quotes, which will pass the argument unchanged
net use /user:"Someone" '\\server\share'
I have ran into problems attempting to use the /delete switch with net use from bash in windows. It seems to be something with the way certain windows commands process command line arguments.
I thought I could get around it by launching "net use" from a cmd.exe sub shell, but that too appears to be impacted by the argument processing problem. I found a work around for cmd.exe in quoting but could not seem to find the right quoting to use net use directly for the task.
$ cmd "/c net use T: /delete"
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With