public inbox for cygwin@cygwin.com
 help / color / mirror / Atom feed
* Mounting shares that require passwords
@ 2010-08-13 16:25 Steven Collins
  2010-08-13 16:29 ` Jeremy Bopp
  0 siblings, 1 reply; 6+ messages in thread
From: Steven Collins @ 2010-08-13 16:25 UTC (permalink / raw)
  To: cygwin

Is there some way within cygwin to successfully mount a share that
requires a password. Until I run the "net use" command or other
Windows application to open the share with the password Cygwin is
unable to access it. The best I've come up with so far is to run the
"net use" from my .bashrc. Is there a better way to handle this?

Regards,
Steven

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

^ permalink raw reply	[flat|nested] 6+ messages in thread

* Re: Mounting shares that require passwords
  2010-08-13 16:25 Mounting shares that require passwords Steven Collins
@ 2010-08-13 16:29 ` Jeremy Bopp
  2010-08-13 16:57   ` Steven Collins
  0 siblings, 1 reply; 6+ messages in thread
From: Jeremy Bopp @ 2010-08-13 16:29 UTC (permalink / raw)
  To: cygwin

[-- Attachment #1: Type: text/plain, Size: 707 bytes --]

On 8/13/2010 11:24 AM, Steven Collins wrote:
> Is there some way within cygwin to successfully mount a share that
> requires a password. Until I run the "net use" command or other
> Windows application to open the share with the password Cygwin is
> unable to access it. The best I've come up with so far is to run the
> "net use" from my .bashrc. Is there a better way to handle this?

Cygwin doesn't really mount anything.  It just creates a path
translation table which is used to convert POSIX paths into their
equivalent Windows paths.  So if you need to enter a password to access
the share using a Windows program or net use the path first, the same
will be true for Cygwin.

-Jeremy


[-- Attachment #2: OpenPGP digital signature --]
[-- Type: application/pgp-signature, Size: 259 bytes --]

^ permalink raw reply	[flat|nested] 6+ messages in thread

* Re: Mounting shares that require passwords
  2010-08-13 16:29 ` Jeremy Bopp
@ 2010-08-13 16:57   ` Steven Collins
  2010-08-13 17:07     ` Christopher Faylor
  0 siblings, 1 reply; 6+ messages in thread
From: Steven Collins @ 2010-08-13 16:57 UTC (permalink / raw)
  To: cygwin

On Fri, Aug 13, 2010 at 10:28, Jeremy Bopp <> wrote:
> On 8/13/2010 11:24 AM, Steven Collins wrote:
>> Is there some way within cygwin to successfully mount a share that
>> requires a password. Until I run the "net use" command or other
>> Windows application to open the share with the password Cygwin is
>> unable to access it. The best I've come up with so far is to run the
>> "net use" from my .bashrc. Is there a better way to handle this?
>
> Cygwin doesn't really mount anything.  It just creates a path
> translation table which is used to convert POSIX paths into their
> equivalent Windows paths.  So if you need to enter a password to access
> the share using a Windows program or net use the path first, the same
> will be true for Cygwin.
>
> -Jeremy
>
>

It would be nice though if Cygwin would recognize that it was trying
to access a share and that a password is required.

I've actually run into an issue with my "net use" solution. Under
cygwin the command will prompt me for my password, but then it
immediately fails for a bad password. I'm never actually given a
chance to enter the password. If I enter the password on the command
line the command succeeds, but that is not an acceptable solution as
it means my password is in the clear. Any ideas on why this is
happening?

Regards,
Steven

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

^ permalink raw reply	[flat|nested] 6+ messages in thread

* Re: Mounting shares that require passwords
  2010-08-13 16:57   ` Steven Collins
@ 2010-08-13 17:07     ` Christopher Faylor
  2010-08-13 17:13       ` Steven Collins
  0 siblings, 1 reply; 6+ messages in thread
From: Christopher Faylor @ 2010-08-13 17:07 UTC (permalink / raw)
  To: cygwin

On Fri, Aug 13, 2010 at 10:56:55AM -0600, Steven Collins wrote:
>On Fri, Aug 13, 2010 at 10:28, Jeremy Bopp <> wrote:
>> On 8/13/2010 11:24 AM, Steven Collins wrote:
>>> Is there some way within cygwin to successfully mount a share that
>>> requires a password. Until I run the "net use" command or other
>>> Windows application to open the share with the password Cygwin is
>>> unable to access it. The best I've come up with so far is to run the
>>> "net use" from my .bashrc. Is there a better way to handle this?
>>
>> Cygwin doesn't really mount anything. ?It just creates a path
>> translation table which is used to convert POSIX paths into their
>> equivalent Windows paths. ?So if you need to enter a password to access
>> the share using a Windows program or net use the path first, the same
>> will be true for Cygwin.
>
>It would be nice though if Cygwin would recognize that it was trying
>to access a share and that a password is required.

Cygwin is a general-purpose DLL.  It can't stop what it is doing and ask
the user for input.

>I've actually run into an issue with my "net use" solution. Under
>cygwin the command will prompt me for my password, but then it
>immediately fails for a bad password. I'm never actually given a
>chance to enter the password. If I enter the password on the command
>line the command succeeds, but that is not an acceptable solution as
>it means my password is in the clear. Any ideas on why this is
>happening?

Probably you're trying to run the "net use" command from a pty in mintty,
rxvt, or ssh and "net use" doesn't recognize cygwin ptys.

cgf

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

^ permalink raw reply	[flat|nested] 6+ messages in thread

* Re: Mounting shares that require passwords
  2010-08-13 17:07     ` Christopher Faylor
@ 2010-08-13 17:13       ` Steven Collins
  2010-08-13 17:19         ` Daniel Colascione
  0 siblings, 1 reply; 6+ messages in thread
From: Steven Collins @ 2010-08-13 17:13 UTC (permalink / raw)
  To: cygwin

On Fri, Aug 13, 2010 at 11:07, Christopher Faylor <> wrote:
> On Fri, Aug 13, 2010 at 10:56:55AM -0600, Steven Collins wrote:
>>On Fri, Aug 13, 2010 at 10:28, Jeremy Bopp <> wrote:
>>> On 8/13/2010 11:24 AM, Steven Collins wrote:
>>>> Is there some way within cygwin to successfully mount a share that
>>>> requires a password. Until I run the "net use" command or other
>>>> Windows application to open the share with the password Cygwin is
>>>> unable to access it. The best I've come up with so far is to run the
>>>> "net use" from my .bashrc. Is there a better way to handle this?
>>>
>>> Cygwin doesn't really mount anything. ?It just creates a path
>>> translation table which is used to convert POSIX paths into their
>>> equivalent Windows paths. ?So if you need to enter a password to access
>>> the share using a Windows program or net use the path first, the same
>>> will be true for Cygwin.
>>
>>It would be nice though if Cygwin would recognize that it was trying
>>to access a share and that a password is required.
>
> Cygwin is a general-purpose DLL.  It can't stop what it is doing and ask
> the user for input.
>
>>I've actually run into an issue with my "net use" solution. Under
>>cygwin the command will prompt me for my password, but then it
>>immediately fails for a bad password. I'm never actually given a
>>chance to enter the password. If I enter the password on the command
>>line the command succeeds, but that is not an acceptable solution as
>>it means my password is in the clear. Any ideas on why this is
>>happening?
>
> Probably you're trying to run the "net use" command from a pty in mintty,
> rxvt, or ssh and "net use" doesn't recognize cygwin ptys.
>
> cgf
>
> --
> 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
>
>

I'm attempting to execute "net use" from the bash command prompt in an
xterm session that was started via the "XWin Server" menu item. The
'ps' command lists the TTY as "con", so I wouldn't expect to be using
a pty. Am I? If so, is there a work around for the problem? I have
noticed that even if I start a cmd session from cygwin that the
problem persists.

Regards,
Steven

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

^ permalink raw reply	[flat|nested] 6+ messages in thread

* Re: Mounting shares that require passwords
  2010-08-13 17:13       ` Steven Collins
@ 2010-08-13 17:19         ` Daniel Colascione
  0 siblings, 0 replies; 6+ messages in thread
From: Daniel Colascione @ 2010-08-13 17:19 UTC (permalink / raw)
  To: cygwin; +Cc: spc.for.nbc

On 8/13/10 10:13 AM, Steven Collins wrote:
> I'm attempting to execute "net use" from the bash command prompt in an
> xterm session that was started via the "XWin Server" menu item. The
> 'ps' command lists the TTY as "con", so I wouldn't expect to be using
> a pty. Am I? If so, is there a work around for the problem? I have
> noticed that even if I start a cmd session from cygwin that the
> problem persists.

Anything that's not a real Windows console window is a pty as far as
Cygwin is concerned, and a plain pipe as far as win32 is concerned.
Starting a cmd doesn't fix the issue because that cmd is still talking
to what it sees as a pipe.

You can just start a new console window for "net use" with cygstart; I
believe specifying the password on the command line should be fine.
Another option is trying the conin program, which uses black magic to
give a program a real console for input.

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

^ permalink raw reply	[flat|nested] 6+ messages in thread

end of thread, other threads:[~2010-08-13 17:19 UTC | newest]

Thread overview: 6+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2010-08-13 16:25 Mounting shares that require passwords Steven Collins
2010-08-13 16:29 ` Jeremy Bopp
2010-08-13 16:57   ` Steven Collins
2010-08-13 17:07     ` Christopher Faylor
2010-08-13 17:13       ` Steven Collins
2010-08-13 17:19         ` Daniel Colascione

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).