X-Recipient: archive-cygwin AT delorie DOT com X-SWARE-Spam-Status: No, hits=-0.0 required=5.0 tests=BAYES_20,FREEMAIL_FROM,SPF_HELO_PASS,T_RP_MATCHES_RCVD,T_TO_NO_BRKTS_FREEMAIL X-Spam-Check-By: sourceware.org To: cygwin AT cygwin DOT com connect(): No such file or directory From: JJ Ottusch Subject: can get 'net use' to give remote share a drive letter when logged in directly but not from ssh session Date: Sun, 25 Apr 2010 03:12:52 +0000 (UTC) Lines: 46 Message-ID: Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit User-Agent: Loom/3.14 (http://gmane.org/) X-IsSubscribed: yes Mailing-List: contact cygwin-help AT cygwin DOT com; run by ezmlm List-Id: List-Subscribe: List-Archive: List-Post: List-Help: , Sender: cygwin-owner AT cygwin DOT com Mail-Followup-To: cygwin AT cygwin DOT com Delivered-To: mailing list cygwin AT cygwin DOT com 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. jjo -- Problem reports: http://cygwin.com/problems.html FAQ: http://cygwin.com/faq/ Documentation: http://cygwin.com/docs.html Unsubscribe info: http://cygwin.com/ml/#unsubscribe-simple