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]

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



If you're running 1.7.X where X <= 1, this might be fixed by upgrading.
Those versions had a bug where the user's registry was not properly
initialized via ssh.  To see if this is your issue, you should be able
to run the "reg query hku" and see if you see your SID listed.  Another
symptom of this problem is that ssh will work if you are simultaneously
logged in via remote desktop.  You might want to check those if you want
to check those to see if the upgrade might help.  Frankly I'm not precisely
sure your symptoms are related that problem but they are in the general
area of those issue, so it's worth a look.

Eric



----- Original Message ----
> From: JJ Ottusch <ncokwqc02@sneakemail.com>
> To: cygwin@cygwin.com
> Sent: Sat, April 24, 2010 10:12:52 PM
> Subject: 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.

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


      

--
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


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