public inbox for cygwin@cygwin.com
 help / color / mirror / Atom feed
* Installation problems with home path and sshd
@ 2011-11-27 12:31 gabier
  2011-11-27 12:31 ` Marc Girod
                   ` (6 more replies)
  0 siblings, 7 replies; 13+ messages in thread
From: gabier @ 2011-11-27 12:31 UTC (permalink / raw)
  To: cygwin


Hi everybody,
I got sshd to work between a Windows 7 computer and a FreeNAS/FreeBSD
server, and it works well now, thanks to you here. Now I try to implement
the same thing on a Vista laptop which is in the same home network. I
installed the same Cygwin, following the same howto.
But there are unexpected problems.
1. The home path was not created, there was nothing in the home directory.
The mintty console opens in /cygdrive/c/Users/username/Desktop/FREENAS,
which is merely the link to the icon used to open the console. I created a
home user directory and now if I enter "cd ~/" I am in it. But mintty still
opens in its own link directory.
Cygwin commands work though. I could excecute all file and permissions
commands.

2. I can't get sshd running. I ran ssh-host-config and cyglsa config (with
reboot) with no error. But the script did not ask me "environment variable
for CYGWIN=" as the howto said it should have done (with answer "ntsec
tty").
Now although the service "Cygwin sshd" exists in Windows, I cannot start it.
With cugrunsrv :

cygrunsrv: Error starting a service: StartService:  Win32 error 1069:
(Following sentence translated from French) The failure to open a session
has prevented the start of the service.

I feel the solution is not difficult but my knowledge of Cygwin/Linux is too
little to find out where to do something.

:) Gabier
-- 
View this message in context: http://old.nabble.com/Installation-problems-with-home-path-and-sshd-tp32877343p32877343.html
Sent from the Cygwin list mailing list archive at Nabble.com.


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

* Re: Installation problems with home path and sshd
  2011-11-27 12:31 Installation problems with home path and sshd gabier
@ 2011-11-27 12:31 ` Marc Girod
  2011-11-27 16:19   ` gabier
  2011-11-27 12:34 ` Marc Girod
                   ` (5 subsequent siblings)
  6 siblings, 1 reply; 13+ messages in thread
From: Marc Girod @ 2011-11-27 12:31 UTC (permalink / raw)
  To: cygwin



gabier wrote:
> 
> 1. The home path was not created, there was nothing in the home directory.
> The mintty console opens in /cygdrive/c/Users/username/Desktop/FREENAS,
> which is merely the link to the icon used to open the console. I created a
> home user directory and now if I enter "cd ~/" I am in it. But mintty
> still opens in its own link directory.
> 
Others may answer better than me, but... I think there are two sources for
the definition of home:
the HOME environment variable, and the entry in /etc/passwd.
I have myself:

~> id
uid=1000(marc) gid=513(None) groups=513(None),545(Users)
~> grep marc /etc/passwd
marc:unused:1000:513:U-sartre\marc,S-1-5-21-1848142070-2449128644-2827604881-1000:/home/marc:/bin/bash
~> echo $HOME
/home/marc

Marc

-- 
View this message in context: http://old.nabble.com/Installation-problems-with-home-path-and-sshd-tp32877343p32877389.html
Sent from the Cygwin list mailing list archive at Nabble.com.


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

* Re: Installation problems with home path and sshd
  2011-11-27 12:31 Installation problems with home path and sshd gabier
  2011-11-27 12:31 ` Marc Girod
@ 2011-11-27 12:34 ` Marc Girod
  2011-11-27 12:36 ` Marc Girod
                   ` (4 subsequent siblings)
  6 siblings, 0 replies; 13+ messages in thread
From: Marc Girod @ 2011-11-27 12:34 UTC (permalink / raw)
  To: cygwin



gabier wrote:
> 
> 1. The home path was not created, there was nothing in the home directory.
> The mintty console opens in /cygdrive/c/Users/username/Desktop/FREENAS,
> which is merely the link to the icon used to open the console.
> I created a home user directory and now if I enter "cd ~/" I am in it.
> But mintty still opens in its own link directory.
> 
Others may answer better than me, but... I think there are two sources for
the definition of home:
the HOME environment variable, and the entry in /etc/passwd.
I have myself:

~> id
uid=1000(marc) gid=513(None) groups=513(None),545(Users)
~> grep marc /etc/passwd
marc:unused:1000:513:U-sartre\marc,S-1-5-21-1848142070-2449128644-2827604881-1000:/home/marc:/bin/bash
~> echo $HOME
/home/marc

Marc

-- 
View this message in context: http://old.nabble.com/Installation-problems-with-home-path-and-sshd-tp32877343p32877390.html
Sent from the Cygwin list mailing list archive at Nabble.com.


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

* Re: Installation problems with home path and sshd
  2011-11-27 12:31 Installation problems with home path and sshd gabier
  2011-11-27 12:31 ` Marc Girod
  2011-11-27 12:34 ` Marc Girod
@ 2011-11-27 12:36 ` Marc Girod
  2011-11-27 12:38 ` Marc Girod
                   ` (3 subsequent siblings)
  6 siblings, 0 replies; 13+ messages in thread
From: Marc Girod @ 2011-11-27 12:36 UTC (permalink / raw)
  To: cygwin



gabier wrote:
> 
> 1. The home path was not created, there was nothing in the home directory.
> ...
> I created a home user directory and now if I enter "cd ~/" I am in it.
> But mintty still opens in its own link directory.
> 
Others may answer better than me, but... I think there are two sources for
the definition of home:
the HOME environment variable, and the entry in /etc/passwd.
I have myself:

~> id
uid=1000(marc) gid=513(None) groups=513(None),545(Users)
~> grep marc /etc/passwd | tr : '\n'
marc
unused
1000
513
U-sartre\marc,S-1-5-21-1848142070-2449128644-2827604881-1000
/home/marc
/bin/bash
~> echo $HOME
/home/marc

Marc

-- 
View this message in context: http://old.nabble.com/Installation-problems-with-home-path-and-sshd-tp32877343p32877391.html
Sent from the Cygwin list mailing list archive at Nabble.com.


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

* Re: Installation problems with home path and sshd
  2011-11-27 12:31 Installation problems with home path and sshd gabier
                   ` (2 preceding siblings ...)
  2011-11-27 12:36 ` Marc Girod
@ 2011-11-27 12:38 ` Marc Girod
  2011-11-27 14:43 ` Marc Girod
                   ` (2 subsequent siblings)
  6 siblings, 0 replies; 13+ messages in thread
From: Marc Girod @ 2011-11-27 12:38 UTC (permalink / raw)
  To: cygwin



gabier wrote:
> 
> 1. The home path was not created, there was nothing in the home directory.
> ...
> I created a home user directory and now if I enter "cd ~/" I am in it.
> But mintty still opens in its own link directory.
> 
Others may answer better than me, but... I think there are two sources
for the definition of home:
the HOME environment variable, and the entry in /etc/passwd.
I have myself:

~> id
uid=1000(marc) gid=513(None) groups=513(None),545(Users)
~> grep marc /etc/passwd | tr : '\n'
marc
unused
1000
513
U-sartre\marc,S-1-5-21-1848142070-2449128644-2827604881-1000
/home/marc
/bin/bash
~> echo $HOME
/home/marc

Marc

-- 
View this message in context: http://old.nabble.com/Installation-problems-with-home-path-and-sshd-tp32877343p32877392.html
Sent from the Cygwin list mailing list archive at Nabble.com.


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

* Re: Installation problems with home path and sshd
  2011-11-27 12:31 Installation problems with home path and sshd gabier
                   ` (3 preceding siblings ...)
  2011-11-27 12:38 ` Marc Girod
@ 2011-11-27 14:43 ` Marc Girod
  2011-11-28 13:36 ` Michael Lutz
  2011-11-28 14:00 ` Andy Koppe
  6 siblings, 0 replies; 13+ messages in thread
From: Marc Girod @ 2011-11-27 14:43 UTC (permalink / raw)
  To: cygwin



gabier wrote:
> 
> 1. The home path was not created, there was nothing in the home directory.
> ...
> I created a home user directory and now if I enter "cd ~/" I am in it.
> But mintty still opens in its own link directory.
> 
Others may answer better than me, but... I think there are two sources
for the definition of home:
the HOME environment variable, and the entry in /etc/passwd.
I have myself:

~> id
uid=1000(marc) gid=513(None) groups=513(None),545(Users)
~> grep marc /etc/passwd | tr : '\n'
marc
unused
1000
513
U-sartre\marc,S-1-5-21-1848142070-2449128644-2827604881-1000
/home/marc
/bin/bash
~> echo $HOME
/home/marc

Marc

-- 
View this message in context: http://old.nabble.com/Installation-problems-with-home-path-and-sshd-tp32877343p32877393.html
Sent from the Cygwin list mailing list archive at Nabble.com.


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

* Re: Installation problems with home path and sshd
  2011-11-27 12:31 ` Marc Girod
@ 2011-11-27 16:19   ` gabier
  2011-11-27 16:58     ` Marc Girod
  0 siblings, 1 reply; 13+ messages in thread
From: gabier @ 2011-11-27 16:19 UTC (permalink / raw)
  To: cygwin



Marc Girod wrote:
> 
> Others may answer better than me, but... I think there are two sources for
> the definition of home:
> the HOME environment variable, and the entry in /etc/passwd.
> I have myself:
> ~> id
> uid=1000(marc) gid=513(None) groups=513(None),545(Users)
> ~> grep marc /etc/passwd
> marc:unused:1000:513:U-sartre\marc,S-1-5-21-1848142070-2449128644-2827604881-1000:/home/marc:/bin/bash
> ~> echo $HOME
> /home/marc
> Marc
> 
Quite interesting. My id command gives ("Josette" is the name of the user
and "PC-de-Josette" is the name of the computer)
Josette
unused
1000
513
U-PC-de-Josette\Josette,S-1-5-21-81082327-430422718-1981534784-1000
/home/Josette
/bin/bash

and the echo $Home command gives "/home/Josette"

So it seems quite correct. It does not explain why the mintty console does
not open in the home directory, but it seems to prove that it is only a
console problem.

As you can see, the user name is in the computer name, so the grep command
was not effective and I got all users listed. I noticed the following entry.
"
sshd
unused
1002
513
sshd 
privsep,U-PC-de-Josette\sshd,S-1-5-21-81082327-430422718-1981534784-1002
/var/empty
/bin/false
"
Does it seem also correct ? If not it could explain my sshd problems ?

:) Gabier
-- 
View this message in context: http://old.nabble.com/Installation-problems-with-home-path-and-sshd-tp32877343p32877431.html
Sent from the Cygwin list mailing list archive at Nabble.com.


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

* Re: Installation problems with home path and sshd
  2011-11-27 16:19   ` gabier
@ 2011-11-27 16:58     ` Marc Girod
  2011-11-28  8:51       ` gabier
  0 siblings, 1 reply; 13+ messages in thread
From: Marc Girod @ 2011-11-27 16:58 UTC (permalink / raw)
  To: cygwin



gabier wrote:
> 
> So it seems quite correct.
> ...
> I noticed the following entry.
> ...
> Does it seem also correct ? If not it could explain my sshd problems ?
> 
Yes: your home seems correct.
I didn't install sshd on my PC so that I cannot comment your sshd account,
but it doesn't seem wrong.
You'll have to wait for some better advice than mine.
Sorry for all the copies of my message. Nabble seems to be bugging...
Marc
-- 
View this message in context: http://old.nabble.com/Installation-problems-with-home-path-and-sshd-tp32877343p32877469.html
Sent from the Cygwin list mailing list archive at Nabble.com.


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

* Re: Installation problems with home path and sshd
  2011-11-27 16:58     ` Marc Girod
@ 2011-11-28  8:51       ` gabier
  0 siblings, 0 replies; 13+ messages in thread
From: gabier @ 2011-11-28  8:51 UTC (permalink / raw)
  To: cygwin



Marc Girod wrote:
> 
> Yes: your home seems correct.
> 
yes, but I do not know why my console does not open in the home directory.
Maybe there is console config file somewhere ?

Marc Girod wrote:
> 
> I didn't install sshd on my PC so that I cannot comment your sshd account,
> but it doesn't seem wrong.
> You'll have to wait for some better advice than mine.
> 
OK 

Marc Girod wrote:
> 
> Sorry for all the copies of my message. Nabble seems to be bugging...
> 
Yes, the replies display a http 500 error but the post is displayed
correctly!!!
-- 
View this message in context: http://old.nabble.com/Installation-problems-with-home-path-and-sshd-tp32877343p32877545.html
Sent from the Cygwin list mailing list archive at Nabble.com.


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

* Re: Installation problems with home path and sshd
  2011-11-27 12:31 Installation problems with home path and sshd gabier
                   ` (4 preceding siblings ...)
  2011-11-27 14:43 ` Marc Girod
@ 2011-11-28 13:36 ` Michael Lutz
  2011-11-28 14:27   ` gabier
  2011-11-28 14:00 ` Andy Koppe
  6 siblings, 1 reply; 13+ messages in thread
From: Michael Lutz @ 2011-11-28 13:36 UTC (permalink / raw)
  To: cygwin

Am 27.11.2011 11:37 schrieb gabier:
> cygrunsrv: Error starting a service: StartService:  Win32 error 1069:
> (Following sentence translated from French) The failure to open a session
> has prevented the start of the service.

Open the properties of the service and enable "Allow service to interact
with desktop" (or something like that). If that option is already enabled
I don't have any more ideas either.


Michael


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

* Re: Installation problems with home path and sshd
  2011-11-27 12:31 Installation problems with home path and sshd gabier
                   ` (5 preceding siblings ...)
  2011-11-28 13:36 ` Michael Lutz
@ 2011-11-28 14:00 ` Andy Koppe
  2011-11-28 14:01   ` gabier
  6 siblings, 1 reply; 13+ messages in thread
From: Andy Koppe @ 2011-11-28 14:00 UTC (permalink / raw)
  To: cygwin

On 27 November 2011 10:37, gabier wrote:
> I got sshd to work between a Windows 7 computer and a FreeNAS/FreeBSD
> server, and it works well now, thanks to you here. Now I try to implement
> the same thing on a Vista laptop which is in the same home network. I
> installed the same Cygwin, following the same howto.

Which howto? The author of that should probably be your first port of call.

> But there are unexpected problems.
> 1. The home path was not created, there was nothing in the home directory.
> The mintty console opens in /cygdrive/c/Users/username/Desktop/FREENAS,
> which is merely the link to the icon used to open the console. I created a
> home user directory and now if I enter "cd ~/" I am in it. But mintty still
> opens in its own link directory.
> Cygwin commands work though. I could excecute all file and permissions
> commands.

How did you install mintty, and how are you invoking it? If you invoke
it without arguments, it'll run your shell as a so-called non-login
shell (as is standard behaviour for terminal emulators). This means
that /etc/profile won't be sourced, which is where your home directory
gets created and cd'd to.

To tell mintty to invoke the shell as a login shell and hence source
/etc/profile, pass a '-' (i.e. a hyphen/minus sign) as the last
argument. That's what the mintty shortcut created by setup.exe does.

Andy

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

* Re: Installation problems with home path and sshd
  2011-11-28 14:00 ` Andy Koppe
@ 2011-11-28 14:01   ` gabier
  0 siblings, 0 replies; 13+ messages in thread
From: gabier @ 2011-11-28 14:01 UTC (permalink / raw)
  To: cygwin




Andy Koppe wrote:
> 
> How did you install mintty, and how are you invoking it? If you invoke
> it without arguments, it'll run your shell as a so-called non-login
> shell (as is standard behaviour for terminal emulators). This means
> that /etc/profile won't be sourced, which is where your home directory
> gets created and cd'd to.
> 
> To tell mintty to invoke the shell as a login shell and hence source
> /etc/profile, pass a '-' (i.e. a hyphen/minus sign) as the last
> argument. That's what the mintty shortcut created by setup.exe does.
> 
Thank you Andy,
I understand where the problem is, but I am not sure to understand what is
to be done, i.e. what arguments give to mintty ?
I installed it with the Cygwin setup. Its shortcut is
"C:\cygwin\bin\mintty.exe -". The hyphen is indeed there. By contrast, the
regular Cygwin console  (which opens in the right directory) calls a
cygwin.bat, which contains
@echo off
C:
chdir C:\cygwin\bin
bash --login -i
Should I make mintty call the same bat file ?
:) gabier
-- 
View this message in context: http://old.nabble.com/Installation-problems-with-home-path-and-sshd-tp32877343p32878103.html
Sent from the Cygwin list mailing list archive at Nabble.com.


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

* Re: Installation problems with home path and sshd
  2011-11-28 13:36 ` Michael Lutz
@ 2011-11-28 14:27   ` gabier
  0 siblings, 0 replies; 13+ messages in thread
From: gabier @ 2011-11-28 14:27 UTC (permalink / raw)
  To: cygwin




Michael Lutz-2 wrote:
> 
> Open the properties of the service and enable "Allow service to interact
> with desktop" (or something like that). If that option is already enabled
> I don't have any more ideas either.
> 
Thank you Michael, it was NOT enabled, and enabling it solved the problem.
Great!!!
:) Gabier
-- 
View this message in context: http://old.nabble.com/Installation-problems-with-home-path-and-sshd-tp32877343p32878115.html
Sent from the Cygwin list mailing list archive at Nabble.com.


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

end of thread, other threads:[~2011-11-28 14:11 UTC | newest]

Thread overview: 13+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2011-11-27 12:31 Installation problems with home path and sshd gabier
2011-11-27 12:31 ` Marc Girod
2011-11-27 16:19   ` gabier
2011-11-27 16:58     ` Marc Girod
2011-11-28  8:51       ` gabier
2011-11-27 12:34 ` Marc Girod
2011-11-27 12:36 ` Marc Girod
2011-11-27 12:38 ` Marc Girod
2011-11-27 14:43 ` Marc Girod
2011-11-28 13:36 ` Michael Lutz
2011-11-28 14:27   ` gabier
2011-11-28 14:00 ` Andy Koppe
2011-11-28 14:01   ` gabier

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