This is the mail archive of the cygwin@cygwin.com 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: Problems with net use statement via sshd on cygwin


On Tue, 8 Apr 2003, Thorsten Kampe wrote:

> * Richard Sharpe (03-04-08 03:14 +0100)
> > I installed cygwin on a Win2K machine and then configured sshd (after
> > including it in the install) ...
> >
> > However, if I do:
> >
> >  ssh administrator at calpc12 net use f: \\\\\\\\10.0.1.5\\\\test \
> >       /user:tigerteam\\\\rsharpe <somepasswd>
> >
> > (Yes, I know there are ways around all those backslashes), it appears to
> > succeed, but the share is listed as unavailable in Windows, and I cannot
> > access it via 'dir f:' for example.
> >
> > The drive letter f: did not have any thing mapped to it before the ssh
> > command above.
> >
> > Has anyone seen this? Is there any explanation?
>
> Is "SMBNTSEC" set? Try logging in and then executing manually "net
> use". Have a look at the "Event Viewer" and "/var/log/sshd.log".

Surely you mean "smbntsec" (lowercase)...

> I have been able to even access a NetWare volume through "net use".
> The only "annoyance" I encountered was, that drive mappings made under
> a different account (under the windows GUI) were shown, too. I think
> other people mentioned this.
> Thorsten

Hmm, I'm intrigued now.  Perhaps we can get to the bottom of this.

I have a Samba share that I connect to (from Win2k SP3, Cygwin-1.3.22).
If I run "net use" from a local bash shell, I get

-----CUT-----
$ net use
New connections will be remembered.
Status       Local     Remote                    Network
-------------------------------------------------------------------------------
Disconnected E:        \\samba.watson.ibm.com\igor
                                                 Microsoft Windows Network
Disconnected           \\samba.watson.ibm.com\igor
                                                 Microsoft Windows Network
The command completed successfully.
$
-----CUT-----

When I do it from an ssh session, however, I get the following:

-----CUT-----
$ ssh igor at localhost
igor at localhost's password:
Last login: Mon Apr  7 21:44:46 2003 from localhost
Fanfare!!!
You are successfully logged in to this server!!!
$ net use
New connections will be remembered.
Status       Local     Remote                    Network
-------------------------------------------------------------------------------
Unavailable  E:        \\samba.watson.ibm.com\igor
                                                 Microsoft Windows Network
The command completed successfully.
$
-----CUT-----

Note that the UNC share itself is *not* shown at all, and the drive is
shown as unavailable.  Attempting to access "//samba.watson.ibm.com/igor"
results in a "permission denied", as does a "net use..." command with the
correct credentials.  The state of the drive (i.e., connected vs.
disconnected) on the main desktop is irrelevant, as is the setting of
"smbntsec" (normally off for me).  Seems my situation is very similar to
Richard's.  Any ideas?
	Igor
-- 
				http://cs.nyu.edu/~pechtcha/
      |\      _,,,---,,_		pechtcha at cs dot nyu dot edu
ZZZzz /,`.-'`'    -.  ;-;;,_		igor at watson dot ibm dot com
     |,4-  ) )-,_. ,\ (  `'-'		Igor Pechtchanski
    '---''(_/--'  `-'\_) fL	a.k.a JaguaR-R-R-r-r-r-.-.-.  Meow!

Knowledge is an unending adventure at the edge of uncertainty.
  -- Leto II


--
Unsubscribe info:      http://cygwin.com/ml/#unsubscribe-simple
Bug reporting:         http://cygwin.com/bugs.html
Documentation:         http://cygwin.com/docs.html
FAQ:                   http://cygwin.com/faq/


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