public inbox for cygwin@cygwin.com
 help / color / mirror / Atom feed
* Problems seeing/mounting partitions from ssh
@ 2019-07-18 14:06 Henry S. Thompson
  2019-07-18 19:09 ` Achim Gratz
  0 siblings, 1 reply; 7+ messages in thread
From: Henry S. Thompson @ 2019-07-18 14:06 UTC (permalink / raw)
  To: cygwin

I have one real (c:) and three virtual (d:, e:, f:) partitions on my
Windows 10 box

The virtual partitions are created at login by Windows tasks using the
'subst' command.

With an empty /etc/fstab, at first this all appears to work fine:

  > mount
  C:/C64/bin on /usr/bin type ntfs (binary,auto)
  C:/C64/lib on /usr/lib type ntfs (binary,auto)
  C:/C64 on / type ntfs (binary,auto)
  C: on /cygdrive/c type ntfs (binary,posix=0,user,noumount,auto)
  D: on /cygdrive/d type ntfs (binary,posix=0,user,noumount,auto)
  E: on /cygdrive/e type ntfs (binary,posix=0,user,noumount,auto)
  F: on /cygdrive/f type ntfs (binary,posix=0,user,noumount,auto)

  > mount -m
  none /cygdrive cygdrive binary,posix=0,user 0 0

  > ls /cygdrive
  c/  d/  e/  f/

  > ls /cygdrive/f | wc -l
  31

But if I come in to this machine via ssh (public key or password), the
virtual partitions are lost:

  > mount

  C:/C64/bin on /usr/bin type ntfs (binary,auto)
  C:/C64/lib on /usr/lib type ntfs (binary,auto)
  C:/C64 on / type ntfs (binary,auto)
  C: on /cygdrive/c type ntfs (binary,posix=0,user,noumount,auto)

  > ls /cygdrive
  c/

The problem seems to arise because the subst commands aren't being run:

  > cmd /c subst
  [nothing]

although they are Triggered by "At log on of [me]".  Checking the Task
Scheduler indeed shows them run at my original Windows login, but not
when I ssh in...

It appears that ssh login is not a Windows login -- what am I missing?

ht
-- 
       Henry S. Thompson, School of Informatics, University of Edinburgh
      10 Crichton Street, Edinburgh EH8 9AB, SCOTLAND -- (44) 131 650-4440
                Fax: (44) 131 650-4587, e-mail: ht@inf.ed.ac.uk
                       URL: http://www.ltg.ed.ac.uk/~ht/
 [mail from me _always_ has a .sig like this -- mail without it is forged spam]

The University of Edinburgh is a charitable body, registered in
Scotland, with registration number SC005336.


--
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] 7+ messages in thread

* Re: Problems seeing/mounting partitions from ssh
  2019-07-18 14:06 Problems seeing/mounting partitions from ssh Henry S. Thompson
@ 2019-07-18 19:09 ` Achim Gratz
  2019-07-18 21:03   ` Henry S. Thompson
  0 siblings, 1 reply; 7+ messages in thread
From: Achim Gratz @ 2019-07-18 19:09 UTC (permalink / raw)
  To: cygwin

Henry S. Thompson writes:
> But if I come in to this machine via ssh (public key or password), the
> virtual partitions are lost:

That's how Windows is designed.  If you have no desktop session, then
none of the associated setups are triggered.


Regards,
Achim.
-- 
+<[Q+ Matrix-12 WAVE#46+305 Neuron microQkb Andromeda XTk Blofeld]>+

SD adaptations for Waldorf Q V3.00R3 and Q+ V3.54R2:
http://Synth.Stromeko.net/Downloads.html#WaldorfSDada

--
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] 7+ messages in thread

* Re: Problems seeing/mounting partitions from ssh
  2019-07-18 19:09 ` Achim Gratz
@ 2019-07-18 21:03   ` Henry S. Thompson
  2019-07-18 21:30     ` Erik Soderquist
  2019-07-19 19:08     ` Achim Gratz
  0 siblings, 2 replies; 7+ messages in thread
From: Henry S. Thompson @ 2019-07-18 21:03 UTC (permalink / raw)
  To: cygwin

Achim Gratz writes:

> Henry S. Thompson writes:
>> But if I come in to this machine via ssh (public key or password), the
>> virtual partitions are lost:
>
> That's how Windows is designed.  If you have no desktop session, then
> none of the associated setups are triggered.

Not to dismiss your point, but this happens even when there _is_ a
desktop session.  Indeed the material showing the problem in my previous
post came from doing

  > [show working stuff from desktop session]
  > ssh localhost
  > [show failing stuff from ssh session]

That's what really baffled me.

ht
-- 
       Henry S. Thompson, School of Informatics, University of Edinburgh
      10 Crichton Street, Edinburgh EH8 9AB, SCOTLAND -- (44) 131 650-4440
                Fax: (44) 131 650-4587, e-mail: ht@inf.ed.ac.uk
                       URL: http://www.ltg.ed.ac.uk/~ht/
 [mail from me _always_ has a .sig like this -- mail without it is forged spam]

The University of Edinburgh is a charitable body, registered in
Scotland, with registration number SC005336.


--
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] 7+ messages in thread

* Re: Problems seeing/mounting partitions from ssh
  2019-07-18 21:03   ` Henry S. Thompson
@ 2019-07-18 21:30     ` Erik Soderquist
  2019-07-18 21:35       ` Erik Soderquist
  2019-07-19 19:08     ` Achim Gratz
  1 sibling, 1 reply; 7+ messages in thread
From: Erik Soderquist @ 2019-07-18 21:30 UTC (permalink / raw)
  To: cygwin

On Thu, Jul 18, 2019 at 5:04 PM Henry S. Thompson wrote:
>
> Achim Gratz writes:
>
> > Henry S. Thompson writes:
> >> But if I come in to this machine via ssh (public key or password), the
> >> virtual partitions are lost:
> >
> > That's how Windows is designed.  If you have no desktop session, then
> > none of the associated setups are triggered.
>
> Not to dismiss your point, but this happens even when there _is_ a
> desktop session.  Indeed the material showing the problem in my previous
> post came from doing

The subst command creates an illusion that exists only for the user
session (usually a desktop session) it is executed in.  The ssh
session has no desktop session at all, and is its own independent user
session.

You may be able to work around this by adding the subst command to
your .profile, but should not expect subst commands from one user
session to be visible in another user session.

-- Erik

--
"I do not think any of us are truly sane, Caleb. Not even you. Courage
is not sanity. Being willing to die for someone else is not sanity."
... "Love is not sane, nor is faith." ... "If sanity lacks those
things, Caleb, I want no part of it."

-- Alexandria Terri in "Weaving the Wyvern" by Alexis Desiree Thorne

--
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] 7+ messages in thread

* Re: Problems seeing/mounting partitions from ssh
  2019-07-18 21:30     ` Erik Soderquist
@ 2019-07-18 21:35       ` Erik Soderquist
  2019-07-19  7:57         ` Henry S. Thompson
  0 siblings, 1 reply; 7+ messages in thread
From: Erik Soderquist @ 2019-07-18 21:35 UTC (permalink / raw)
  To: cygwin

On Thu, Jul 18, 2019 at 5:29 PM Erik Soderquist wrote:
> You may be able to work around this by adding the subst command to
> your .profile, but should not expect subst commands from one user
> session to be visible in another user session.

I just tested, and yes, executing the subst commands within the ssh
session does work.

-- Erik

--
"I do not think any of us are truly sane, Caleb. Not even you. Courage
is not sanity. Being willing to die for someone else is not sanity."
... "Love is not sane, nor is faith." ... "If sanity lacks those
things, Caleb, I want no part of it."

-- Alexandria Terri in "Weaving the Wyvern" by Alexis Desiree Thorne

--
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] 7+ messages in thread

* Re: Problems seeing/mounting partitions from ssh
  2019-07-18 21:35       ` Erik Soderquist
@ 2019-07-19  7:57         ` Henry S. Thompson
  0 siblings, 0 replies; 7+ messages in thread
From: Henry S. Thompson @ 2019-07-19  7:57 UTC (permalink / raw)
  To: cygwin

Erik Soderquist writes:

> On Thu, Jul 18, 2019 at 5:29 PM Erik Soderquist wrote:
>> You may be able to work around this by adding the subst command to
>> your .profile, but should not expect subst commands from one user
>> session to be visible in another user session.
>
> I just tested, and yes, executing the subst commands within the ssh
> session does work.

Thanks, and yes, I've added them to my .ssh/rc and that has fixed my
problem.

ht
-- 
       Henry S. Thompson, School of Informatics, University of Edinburgh
      10 Crichton Street, Edinburgh EH8 9AB, SCOTLAND -- (44) 131 650-4440
                Fax: (44) 131 650-4587, e-mail: ht@inf.ed.ac.uk
                       URL: http://www.ltg.ed.ac.uk/~ht/
 [mail from me _always_ has a .sig like this -- mail without it is forged spam]

The University of Edinburgh is a charitable body, registered in
Scotland, with registration number SC005336.


--
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] 7+ messages in thread

* Re: Problems seeing/mounting partitions from ssh
  2019-07-18 21:03   ` Henry S. Thompson
  2019-07-18 21:30     ` Erik Soderquist
@ 2019-07-19 19:08     ` Achim Gratz
  1 sibling, 0 replies; 7+ messages in thread
From: Achim Gratz @ 2019-07-19 19:08 UTC (permalink / raw)
  To: cygwin

Henry S. Thompson writes:
> Achim Gratz writes:
>
>> Henry S. Thompson writes:
>>> But if I come in to this machine via ssh (public key or password), the
>>> virtual partitions are lost:
>>
>> That's how Windows is designed.  If you have no desktop session, then
>> none of the associated setups are triggered.
>
> Not to dismiss your point, but this happens even when there _is_ a
> desktop session.  Indeed the material showing the problem in my previous
> post came from doing
>
>   > [show working stuff from desktop session]
>   > ssh localhost
>   > [show failing stuff from ssh session]
>
> That's what really baffled me.

The SSH session is completely separate from your desktop session.  That
the same user owns the two sessions doesn't make any difference, they
are still isolated from each other.


Regards,
Achim.
-- 
+<[Q+ Matrix-12 WAVE#46+305 Neuron microQkb Andromeda XTk Blofeld]>+

Factory and User Sound Singles for Waldorf rackAttack:
http://Synth.Stromeko.net/Downloads.html#WaldorfSounds

--
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] 7+ messages in thread

end of thread, other threads:[~2019-07-19 19:08 UTC | newest]

Thread overview: 7+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2019-07-18 14:06 Problems seeing/mounting partitions from ssh Henry S. Thompson
2019-07-18 19:09 ` Achim Gratz
2019-07-18 21:03   ` Henry S. Thompson
2019-07-18 21:30     ` Erik Soderquist
2019-07-18 21:35       ` Erik Soderquist
2019-07-19  7:57         ` Henry S. Thompson
2019-07-19 19:08     ` Achim Gratz

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