Problem accessing samba shares via ssh in XP

classic Classic list List threaded Threaded
11 messages Options
Reply | Threaded
Open this post in threaded view
|

Problem accessing samba shares via ssh in XP

Felipe Franciosi
Hello All,

I'm not sure if this has already been discussed here, but I couldn't find
anything related using google.

I have a WinXP box running cygwin and SSHD. In this XP, I have mounted some
shares exported by a linux box trough smb.

When I log in locally (e.g. run xterm -l) I see the shares in /cygdrive. But
I when I log in via ssh, they are simply not there...

See:

ozzy@Araucaria[~]
$ cd /cygdrive

ozzy@Araucaria[/cygdrive]
$ ls    
c/  d/  x/  y/  z/

ozzy@Araucaria[/cygdrive]
$ ssh localhost
ozzy@localhost's password:
Last login: Mon Nov 21 19:48:08 2005 from localhost
Fanfare!!!
You are successfully logged in to this server!!!

ozzy@Araucaria[~]
$ cd /cygdrive

ozzy@Araucaria[/cygdrive]
$ ls
c/  d/

ozzy@Araucaria[/cygdrive]
$


Any ideas on what's going on ??

Thanks

p.s. Here is some weird debugging:

ozzy@Araucaria[~]
$ net use
Novas conexões serão lembradas.


Status       Local     Remoto                    Rede

----------------------------------------------------------------------------
---
OK           X:        \\jacaranda\ozzy          Rede Microsoft Windows
Desconectado Y:        \\jacaranda\public        Rede Microsoft Windows
OK           Z:        \\arrakis\franciosi       Rede Microsoft Windows

Comando concluído com êxito.


ozzy@Araucaria[~]
$ ssh localhost
ozzy@localhost's password:
                           Last login: Mon Nov 21 20:36:15 2005 from
localhost
Fanfare!!!
You are successfully logged in to this server!!!

ozzy@Araucaria[~]
$ net use
Novas conexões serão lembradas.


Status       Local     Remoto                    Rede

----------------------------------------------------------------------------
---
Não disponív X:        \\jacaranda\ozzy          Rede Microsoft Windows
NÆo dispon¡v Y:        \\jacaranda\public        Rede Microsoft Windows
NÆo dispon¡v Z:        \\arrakis\franciosi       Rede Microsoft Windows

Comando concluído com êxito.


ozzy@Araucaria[~]
$

Disregarding the codepages issue, here is some important translations:
"NÆo dispon¡v" is actually "Não disponível", which means "Unavailable".
"Desconectado" naturally stands for "Disconnected".


--
=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=
 Felipe Franciosi                      +55-51-91230557
 CPAD/HP/PUCRS – Centro de Pesquisa em Alto Desempenho
 http://www.cpad.pucrs.br/          [hidden email]
 Porto Alegre, RS - Brazil
=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=



--
Unsubscribe info:      http://cygwin.com/ml/#unsubscribe-simple
Problem reports:       http://cygwin.com/problems.html
Documentation:         http://cygwin.com/docs.html
FAQ:                   http://cygwin.com/faq/

Reply | Threaded
Open this post in threaded view
|

RES: Problem accessing samba shares via ssh in XP

Felipe Franciosi
Some people replied directly to me reporting the same problem.

Does anyone have a solution???

[]s

--
=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=
 Felipe Franciosi                      +55-51-91230557
 CPAD/HP/PUCRS – Centro de Pesquisa em Alto Desempenho
 http://www.cpad.pucrs.br/          [hidden email]
 Porto Alegre, RS - Brazil
=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=

-----Mensagem original-----
De: [hidden email] [mailto:[hidden email]] Em nome de
Felipe Franciosi
Enviada em: segunda-feira, 21 de novembro de 2005 20:41
Para: [hidden email]
Assunto: Problem accessing samba shares via ssh in XP

Hello All,

I'm not sure if this has already been discussed here, but I couldn't find
anything related using google.

I have a WinXP box running cygwin and SSHD. In this XP, I have mounted some
shares exported by a linux box trough smb.

When I log in locally (e.g. run xterm -l) I see the shares in /cygdrive. But
I when I log in via ssh, they are simply not there...

See:

ozzy@Araucaria[~]
$ cd /cygdrive

ozzy@Araucaria[/cygdrive]
$ ls    
c/  d/  x/  y/  z/

ozzy@Araucaria[/cygdrive]
$ ssh localhost
ozzy@localhost's password:
Last login: Mon Nov 21 19:48:08 2005 from localhost
Fanfare!!!
You are successfully logged in to this server!!!

ozzy@Araucaria[~]
$ cd /cygdrive

ozzy@Araucaria[/cygdrive]
$ ls
c/  d/

ozzy@Araucaria[/cygdrive]
$


Any ideas on what's going on ??

Thanks

p.s. Here is some weird debugging:

ozzy@Araucaria[~]
$ net use
Novas conexões serão lembradas.


Status       Local     Remoto                    Rede

----------------------------------------------------------------------------
---
OK           X:        \\jacaranda\ozzy          Rede Microsoft Windows
Desconectado Y:        \\jacaranda\public        Rede Microsoft Windows
OK           Z:        \\arrakis\franciosi       Rede Microsoft Windows

Comando concluído com êxito.


ozzy@Araucaria[~]
$ ssh localhost
ozzy@localhost's password:
                           Last login: Mon Nov 21 20:36:15 2005 from
localhost
Fanfare!!!
You are successfully logged in to this server!!!

ozzy@Araucaria[~]
$ net use
Novas conexões serão lembradas.


Status       Local     Remoto                    Rede

----------------------------------------------------------------------------
---
Não disponív X:        \\jacaranda\ozzy          Rede Microsoft Windows
NÆo dispon¡v Y:        \\jacaranda\public        Rede Microsoft Windows
NÆo dispon¡v Z:        \\arrakis\franciosi       Rede Microsoft Windows

Comando concluído com êxito.


ozzy@Araucaria[~]
$

Disregarding the codepages issue, here is some important translations:
"NÆo dispon¡v" is actually "Não disponível", which means "Unavailable".
"Desconectado" naturally stands for "Disconnected".


--
=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=
 Felipe Franciosi                      +55-51-91230557
 CPAD/HP/PUCRS – Centro de Pesquisa em Alto Desempenho
 http://www.cpad.pucrs.br/          [hidden email]
 Porto Alegre, RS - Brazil
=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=



--
Unsubscribe info:      http://cygwin.com/ml/#unsubscribe-simple
Problem reports:       http://cygwin.com/problems.html
Documentation:         http://cygwin.com/docs.html
FAQ:                   http://cygwin.com/faq/



--
Unsubscribe info:      http://cygwin.com/ml/#unsubscribe-simple
Problem reports:       http://cygwin.com/problems.html
Documentation:         http://cygwin.com/docs.html
FAQ:                   http://cygwin.com/faq/

Reply | Threaded
Open this post in threaded view
|

Re: RES: Problem accessing samba shares via ssh in XP

Danilo Turina
The "problem" is that logging with ssh with your username you are not
really logged as your user (that has the network drives mapped) but,
instead, as SYSTEM (that has no network drive map (also because it is
not a network user)).

This also applies to telnet and to all the other mechanisms that,
through Cygwin, allow you to log to your machine.

A workaround is to manually map the network drives manually (using NET
USE) after you log with ssh.

Ciao,

                Danilo

Felipe Franciosi wrote:

> Some people replied directly to me reporting the same problem.
>
> Does anyone have a solution???
>
> []s
>
> --
> =+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=
>  Felipe Franciosi                      +55-51-91230557
>  CPAD/HP/PUCRS ? Centro de Pesquisa em Alto Desempenho
>  http://www.cpad.pucrs.br/          [hidden email]
>  Porto Alegre, RS - Brazil
> =+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=
>
> -----Mensagem original-----
> De: [hidden email] [mailto:[hidden email]] Em nome de
> Felipe Franciosi
> Enviada em: segunda-feira, 21 de novembro de 2005 20:41
> Para: [hidden email]
> Assunto: Problem accessing samba shares via ssh in XP
>
> Hello All,
>
> I'm not sure if this has already been discussed here, but I couldn't find
> anything related using google.
>
> I have a WinXP box running cygwin and SSHD. In this XP, I have mounted some
> shares exported by a linux box trough smb.
>
> When I log in locally (e.g. run xterm -l) I see the shares in /cygdrive. But
> I when I log in via ssh, they are simply not there...
>
> See:
>
> ozzy@Araucaria[~]
> $ cd /cygdrive
>
> ozzy@Araucaria[/cygdrive]
> $ ls    
> c/  d/  x/  y/  z/
>
> ozzy@Araucaria[/cygdrive]
> $ ssh localhost
> ozzy@localhost's password:
> Last login: Mon Nov 21 19:48:08 2005 from localhost
> Fanfare!!!
> You are successfully logged in to this server!!!
>
> ozzy@Araucaria[~]
> $ cd /cygdrive
>
> ozzy@Araucaria[/cygdrive]
> $ ls
> c/  d/
>
> ozzy@Araucaria[/cygdrive]
> $
>
>
> Any ideas on what's going on ??
>
> Thanks
>
> p.s. Here is some weird debugging:
>
> ozzy@Araucaria[~]
> $ net use
> Novas conex?es ser?o lembradas.
>
>
> Status       Local     Remoto                    Rede
>
> ----------------------------------------------------------------------------
> ---
> OK           X:        \\jacaranda\ozzy          Rede Microsoft Windows
> Desconectado Y:        \\jacaranda\public        Rede Microsoft Windows
> OK           Z:        \\arrakis\franciosi       Rede Microsoft Windows
>
> Comando conclu?do com ?xito.
>
>
> ozzy@Araucaria[~]
> $ ssh localhost
> ozzy@localhost's password:
>                            Last login: Mon Nov 21 20:36:15 2005 from
> localhost
> Fanfare!!!
> You are successfully logged in to this server!!!
>
> ozzy@Araucaria[~]
> $ net use
> Novas conex?es ser?o lembradas.
>
>
> Status       Local     Remoto                    Rede
>
> ----------------------------------------------------------------------------
> ---
> N?o dispon?v X:        \\jacaranda\ozzy          Rede Microsoft Windows
> N?o dispon?v Y:        \\jacaranda\public        Rede Microsoft Windows
> N?o dispon?v Z:        \\arrakis\franciosi       Rede Microsoft Windows
>
> Comando conclu?do com ?xito.
>
>
> ozzy@Araucaria[~]
> $
>
> Disregarding the codepages issue, here is some important translations:
> "N?o dispon?v" is actually "N?o dispon?vel", which means "Unavailable".
> "Desconectado" naturally stands for "Disconnected".
>
>
> --
> =+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=
>  Felipe Franciosi                      +55-51-91230557
>  CPAD/HP/PUCRS ? Centro de Pesquisa em Alto Desempenho
>  http://www.cpad.pucrs.br/          [hidden email]
>  Porto Alegre, RS - Brazil
> =+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=
>
>
>
> --
> Unsubscribe info:      http://cygwin.com/ml/#unsubscribe-simple
> Problem reports:       http://cygwin.com/problems.html
> Documentation:         http://cygwin.com/docs.html
> FAQ:                   http://cygwin.com/faq/
>
>
>


--
Unsubscribe info:      http://cygwin.com/ml/#unsubscribe-simple
Problem reports:       http://cygwin.com/problems.html
Documentation:         http://cygwin.com/docs.html
FAQ:                   http://cygwin.com/faq/

Reply | Threaded
Open this post in threaded view
|

Re: RES: Problem accessing samba shares via ssh in XP

Corinna Vinschen-2
On Nov 24 10:00, Danilo Turina wrote:
> The "problem" is that logging with ssh with your username you are not
> really logged as your user (that has the network drives mapped) but,
> instead, as SYSTEM (that has no network drive map (also because it is
> not a network user)).
>
> This also applies to telnet and to all the other mechanisms that,
> through Cygwin, allow you to log to your machine.

No, telnet shouldn't be affected.  It all depends on using password
authentication or not.  See the FAQ
http://cygwin.com/faq/faq-nochunks.html#faq.using.shares


Corinna

--
Corinna Vinschen                  Please, send mails regarding Cygwin to
Cygwin Project Co-Leader          cygwin AT cygwin DOT com
Red Hat, Inc.

--
Unsubscribe info:      http://cygwin.com/ml/#unsubscribe-simple
Problem reports:       http://cygwin.com/problems.html
Documentation:         http://cygwin.com/docs.html
FAQ:                   http://cygwin.com/faq/

Reply | Threaded
Open this post in threaded view
|

Re: RES: Problem accessing samba shares via ssh in XP

Danilo Turina
Corinna Vinschen wrote:

> On Nov 24 10:00, Danilo Turina wrote:
>
>>The "problem" is that logging with ssh with your username you are not
>>really logged as your user (that has the network drives mapped) but,
>>instead, as SYSTEM (that has no network drive map (also because it is
>>not a network user)).
>>
>>This also applies to telnet and to all the other mechanisms that,
>>through Cygwin, allow you to log to your machine.
>
>
> No, telnet shouldn't be affected.  It all depends on using password
> authentication or not.  See the FAQ
> http://cygwin.com/faq/faq-nochunks.html#faq.using.shares

I don't know if I correctly understand what you say, but if I telnet to
my machine (either from the same machine or from another), I don't see
any network share mapping that I see from Windows and I'm unable to
create new ones by using "NET USE" if I do not provide my username and
password.

Of course I have a NT+ machine (XP) and both my user and machine belongs
to a W2K domain.

Ciao,

        Danilo


--
Unsubscribe info:      http://cygwin.com/ml/#unsubscribe-simple
Problem reports:       http://cygwin.com/problems.html
Documentation:         http://cygwin.com/docs.html
FAQ:                   http://cygwin.com/faq/

Reply | Threaded
Open this post in threaded view
|

Re: RES: Problem accessing samba shares via ssh in XP

Corinna Vinschen-2
On Nov 24 12:26, Danilo Turina wrote:

> Corinna Vinschen wrote:
> >On Nov 24 10:00, Danilo Turina wrote:
> >
> >>The "problem" is that logging with ssh with your username you are not
> >>really logged as your user (that has the network drives mapped) but,
> >>instead, as SYSTEM (that has no network drive map (also because it is
> >>not a network user)).
> >>
> >>This also applies to telnet and to all the other mechanisms that,
> >>through Cygwin, allow you to log to your machine.
> >
> >
> >No, telnet shouldn't be affected.  It all depends on using password
> >authentication or not.  See the FAQ
> >http://cygwin.com/faq/faq-nochunks.html#faq.using.shares
>
> I don't know if I correctly understand what you say, but if I telnet to
> my machine (either from the same machine or from another), I don't see
> any network share mapping that I see from Windows and I'm unable to
> create new ones by using "NET USE" if I do not provide my username and
> password.

Earlier versions of NT (4.0, W2K(?)) have kept the established connections
across logins.  At least since XP the connections are local to the logon
session.  This means, you don't have the shares available automatically,
but you can reestablish them in your new login session without having to
give your user name and password.  A simple

  $ net use X: \\\\server\\share

should suffice, and it does on my XP box.  If you can't do that, I'm
wondering if you're accidentally login to a local account on the box,
instead of to a domain account.  I can't tell, but there must be some
external reason for this behaviour.


Corinna

--
Corinna Vinschen                  Please, send mails regarding Cygwin to
Cygwin Project Co-Leader          cygwin AT cygwin DOT com
Red Hat, Inc.

--
Unsubscribe info:      http://cygwin.com/ml/#unsubscribe-simple
Problem reports:       http://cygwin.com/problems.html
Documentation:         http://cygwin.com/docs.html
FAQ:                   http://cygwin.com/faq/

Reply | Threaded
Open this post in threaded view
|

Re: RES: Problem accessing samba shares via ssh in XP

Danilo Turina
Corinna Vinschen wrote:
[...]
> Earlier versions of NT (4.0, W2K(?)) have kept the established connections
> across logins.  At least since XP the connections are local to the logon
> session.  This means, you don't have the shares available automatically,
> but you can reestablish them in your new login session without having to
> give your user name and password.  A simple
>
>   $ net use X: \\\\server\\share
>
> should suffice, and it does on my XP box.

It works! Great!
Thank you,

                Danilo


--
Unsubscribe info:      http://cygwin.com/ml/#unsubscribe-simple
Problem reports:       http://cygwin.com/problems.html
Documentation:         http://cygwin.com/docs.html
FAQ:                   http://cygwin.com/faq/

Reply | Threaded
Open this post in threaded view
|

Re: RES: Problem accessing samba shares via ssh in XP

Corinna Vinschen-2
In reply to this post by Corinna Vinschen-2
On Nov 24 16:40, Corinna Vinschen wrote:

> On Nov 24 12:26, Danilo Turina wrote:
> > Corinna Vinschen wrote:
> > >On Nov 24 10:00, Danilo Turina wrote:
> > >
> > >>The "problem" is that logging with ssh with your username you are not
> > >>really logged as your user (that has the network drives mapped) but,
> > >>instead, as SYSTEM (that has no network drive map (also because it is
> > >>not a network user)).
> > >>
> > >>This also applies to telnet and to all the other mechanisms that,
> > >>through Cygwin, allow you to log to your machine.
> > >
> > >
> > >No, telnet shouldn't be affected.  It all depends on using password
> > >authentication or not.  See the FAQ
> > >http://cygwin.com/faq/faq-nochunks.html#faq.using.shares
> >
> > I don't know if I correctly understand what you say, but if I telnet to
> > my machine (either from the same machine or from another), I don't see
> > any network share mapping that I see from Windows and I'm unable to
> > create new ones by using "NET USE" if I do not provide my username and
> > password.
>
> Earlier versions of NT (4.0, W2K(?)) have kept the established connections
> across logins.  At least since XP the connections are local to the logon
> session.  This means, you don't have the shares available automatically,
> but you can reestablish them in your new login session without having to
> give your user name and password.  A simple
>
>   $ net use X: \\\\server\\share
>
> should suffice, and it does on my XP box.  If you can't do that, I'm
> wondering if you're accidentally login to a local account on the box,
> instead of to a domain account.  I can't tell, but there must be some
> external reason for this behaviour.

Again, just to be clear about this, this only works for password
authentication, not for pubkey ssh or .rhosts based authentication.


Corinna

--
Corinna Vinschen                  Please, send mails regarding Cygwin to
Cygwin Project Co-Leader          cygwin AT cygwin DOT com
Red Hat, Inc.

--
Unsubscribe info:      http://cygwin.com/ml/#unsubscribe-simple
Problem reports:       http://cygwin.com/problems.html
Documentation:         http://cygwin.com/docs.html
FAQ:                   http://cygwin.com/faq/

Reply | Threaded
Open this post in threaded view
|

Re: RES: Problem accessing samba shares via ssh in XP

Bugzilla from ramon.net@gmx.net
> Again, just to be clear about this, this only works for password
> authentication, not for pubkey ssh or .rhosts based authentication.

Will there be some modification about this fact? Or maybe it's impossible?

Thanks.

Ramón.


--
Unsubscribe info:      http://cygwin.com/ml/#unsubscribe-simple
Problem reports:       http://cygwin.com/problems.html
Documentation:         http://cygwin.com/docs.html
FAQ:                   http://cygwin.com/faq/

Reply | Threaded
Open this post in threaded view
|

Re: RES: Problem accessing samba shares via ssh in XP

Corinna Vinschen-2
On Nov 24 17:21, Ram?n Barr?s wrote:
> > Again, just to be clear about this, this only works for password
> > authentication, not for pubkey ssh or .rhosts based authentication.
>
> Will there be some modification about this fact? Or maybe it's impossible?

It's probably not impossible, but it looks incredibly complicated.
Which is to say, I have no idea how to do it.


Corinna

--
Corinna Vinschen                  Please, send mails regarding Cygwin to
Cygwin Project Co-Leader          cygwin AT cygwin DOT com
Red Hat, Inc.

--
Unsubscribe info:      http://cygwin.com/ml/#unsubscribe-simple
Problem reports:       http://cygwin.com/problems.html
Documentation:         http://cygwin.com/docs.html
FAQ:                   http://cygwin.com/faq/

Reply | Threaded
Open this post in threaded view
|

RES: RES: Problem accessing samba shares via ssh in XP

Felipe Franciosi
In reply to this post by Danilo Turina
It worked for me too.

But as my XP box is not under any domain, I had to provide user/password in
the command line:

NET USE X: \\\\server\\share PASSWORD /USER:USERNAME

Where PASSWORD and USERNAME are my data.

Thanks a lot!

--
=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=
 Felipe Franciosi                      +55-51-91230557
 CPAD/HP/PUCRS - Centro de Pesquisa em Alto Desempenho
 http://www.cpad.pucrs.br/          [hidden email]
 Porto Alegre, RS - Brazil
=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=



-----Mensagem original-----
De: [hidden email] [mailto:[hidden email]] Em nome de
Danilo Turina
Enviada em: quinta-feira, 24 de novembro de 2005 14:13
Para: [hidden email]
Assunto: Re: RES: Problem accessing samba shares via ssh in XP

Corinna Vinschen wrote:
[...]
> Earlier versions of NT (4.0, W2K(?)) have kept the established connections
> across logins.  At least since XP the connections are local to the logon
> session.  This means, you don't have the shares available automatically,
> but you can reestablish them in your new login session without having to
> give your user name and password.  A simple
>
>   $ net use X: \\\\server\\share
>
> should suffice, and it does on my XP box.

It works! Great!
Thank you,

                Danilo


--
Unsubscribe info:      http://cygwin.com/ml/#unsubscribe-simple
Problem reports:       http://cygwin.com/problems.html
Documentation:         http://cygwin.com/docs.html
FAQ:                   http://cygwin.com/faq/



--
Unsubscribe info:      http://cygwin.com/ml/#unsubscribe-simple
Problem reports:       http://cygwin.com/problems.html
Documentation:         http://cygwin.com/docs.html
FAQ:                   http://cygwin.com/faq/