This is the mail archive of the cygwin mailing list for the Cygwin project.

Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

can get 'net use' to give remote share a drive letter when logged in directly but not from ssh session

I have a Cygwin ssh server (OpenSSH_4.7p1, OpenSSL 0.9.8g 19 Oct 2007) running
on a Windows 2003 server (lets call it 'xxx'). I am able to use ssh on a remote
machine to reliably make a connection to my account on the server.

I have recently discovered that once I have remotely connected to the server I
can also gain access to a shared resource (let's call it '//yyy/zzz') by using
'net use'. This is great. I had previously assumed this to be impossible.

For example, if I open an RXVTerm running Cygwin on my remote machine, ssh to
'xxx', and run the following command

  net use \\\\yyy\\zzz /user:ddd\\uuu pw

where 'ddd' and 'uuu' represent the domain name and user name for my account on
'xxx' and 'pw' is my password, then I can 'cd' to '//yyy/zzz', access files
there, etc.

However, now that I can access '//yyy/zzz' from the ssh session, I would also
like to give it a drive letter so I can access it using '/cygdrive/z'. Normally
one would map '//yyy/zzz' to 'Z:' like this

  net use Z: \\\\yyy\\zzz /user:ddd\\uuu pw

This works if I make a Remote Desktop Connection to 'xxx', open an RXVTerm
running Cygwin there, and run this command. But from a remote ssh connection it
doesn't. I get this instead

  System error 85 has occurred.
  The local device name is already in use.

In fact, the local device name is not in use. Same result no matter which letter
I try. Replacing a specific letter by '*' doesn't work either.

Bottom line: I can use 'net use' to connect to a remote resource and associate
it with a drive letter when I log directly onto my domain account on 'xxx', but
not when I connect to 'xxx' via ssh.

Is there a way around this problem?

I'm not sure if this is relevant, but as a domain account user logged directly
onto 'xxx' I have Administrative privileges, whereas when I use ssh to connect
to 'xxx' I can access the same resources, but I'm not sure what my privilege
level is. I know that I am somehow going through the 'sshd_server' local user
account on the server, which only has User-level privileges.


Problem reports:
Unsubscribe info:

Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]