public inbox for cygwin@cygwin.com
 help / color / mirror / Atom feed
* cygrunsrv, sshd, services and not starting after boot
@ 2006-09-02 20:18 Ron Dozier
  2006-09-02 20:47 ` Igor Peshansky
                   ` (2 more replies)
  0 siblings, 3 replies; 4+ messages in thread
From: Ron Dozier @ 2006-09-02 20:18 UTC (permalink / raw)
  To: cygwin



I noted that a lot of people are having trouble getting the sshd service to
start automatically.  I think I discovered a problem.

Run services.msc and selecting sshd) there is a "Path to executable" field
that currently says :"C:\cygwin\bin\cygrunsrv.exe"

Based on looking at some other entries like "automatic updates which use
C:\WINDOWS\system32\svchost.exe -k netsvcs", I believe it should say:

C:\cygwin\bin\cygrunsrv.exe -S sshd

otherwise the application cygrunsrv has no idea what service to start.

Microsoft says it's up to the developer to provide a mechanism to do so.

"net start" sshd works.  Currently someone has to log in after a boot and
type the command.  The suggestion of running a batch file containing "net
start sshd" has been suggested to run automatically after a user logs in but
was not tried.

This would require a user logging in.

Features of cygrunsrv I'd like to see:
A method of changing the Path variable reported by services.msc.
A method of changing the options presented to sshd reported by services.msc.

Am I barking up the wrong tree?


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

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

* Re: cygrunsrv, sshd, services and not starting after boot
  2006-09-02 20:18 cygrunsrv, sshd, services and not starting after boot Ron Dozier
@ 2006-09-02 20:47 ` Igor Peshansky
  2006-09-02 20:55 ` René Berber
  2006-09-04  3:04 ` David Christensen
  2 siblings, 0 replies; 4+ messages in thread
From: Igor Peshansky @ 2006-09-02 20:47 UTC (permalink / raw)
  To: Ron Dozier; +Cc: cygwin

On Sat, 2 Sep 2006, Ron Dozier wrote:

> I noted that a lot of people are having trouble getting the sshd service
> to start automatically.  I think I discovered a problem.
>
> Run services.msc and selecting sshd) there is a "Path to executable"
> field that currently says :"C:\cygwin\bin\cygrunsrv.exe"
>
> Based on looking at some other entries like "automatic updates which use
> C:\WINDOWS\system32\svchost.exe -k netsvcs", I believe it should say:
>
> C:\cygwin\bin\cygrunsrv.exe -S sshd
>
> otherwise the application cygrunsrv has no idea what service to start.

Actually, that's not true.  Cygrunsrv knows exactly which service to
start, since the service application can easily retrieve the name of the
service, the parameters, etc.  svchost is just lazy, I guess...

Also, "cygrunsrv -S" will not do what you want -- it will send the message
to the service control manager to start the service (which will attempt to
execute "cygrunsrv -S" again, causing an infinite loop).

> Microsoft says it's up to the developer to provide a mechanism to do so.
>
> "net start" sshd works.  Currently someone has to log in after a boot
> and type the command.

The fact that it works after boot but doesn't at boot indicates a missing
service dependency (so that the system attempts to start sshd before some
prerequisite is started, while after boot the prerequisite service is
already running).  The well-known prerequisites are the Tcp/ip service and
the various firewall services.  I'd try those.

> The suggestion of running a batch file containing
> "net start sshd" has been suggested to run automatically after a user
> logs in but was not tried.
>
> This would require a user logging in.

Most likely that will work too, but adding the dependency will cause the
service to start correctly the first time.

> Features of cygrunsrv I'd like to see:
> A method of changing the Path variable reported by services.msc.

Look at the "-e" option.

> A method of changing the options presented to sshd reported by
> services.msc.

Look at the "-a" option.

All of the information shown by "cygrunsrv --verbose -Q" is stored in
standard ways in the service specifications.  If services.msc does not
display that information, then this is a deficiency on the part of
services.msc.

> Am I barking up the wrong tree?

Most likely yes, sorry.
HTH,
	Igor
-- 
				http://cs.nyu.edu/~pechtcha/
      |\      _,,,---,,_	    pechtcha@cs.nyu.edu | igor@watson.ibm.com
ZZZzz /,`.-'`'    -.  ;-;;,_		Igor Peshansky, Ph.D. (name changed!)
     |,4-  ) )-,_. ,\ (  `'-'		old name: Igor Pechtchanski
    '---''(_/--'  `-'\_) fL	a.k.a JaguaR-R-R-r-r-r-.-.-.  Meow!

"Las! je suis sot... -Mais non, tu ne l'es pas, puisque tu t'en rends compte."
"But no -- you are no fool; you call yourself a fool, there's proof enough in
that!" -- Rostand, "Cyrano de Bergerac"

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

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

* Re: cygrunsrv, sshd, services and not starting after boot
  2006-09-02 20:18 cygrunsrv, sshd, services and not starting after boot Ron Dozier
  2006-09-02 20:47 ` Igor Peshansky
@ 2006-09-02 20:55 ` René Berber
  2006-09-04  3:04 ` David Christensen
  2 siblings, 0 replies; 4+ messages in thread
From: René Berber @ 2006-09-02 20:55 UTC (permalink / raw)
  To: cygwin

Ron Dozier wrote:
> 
> I noted that a lot of people are having trouble getting the sshd service to
> start automatically.

What?  The only problem is that people don't read the _Cygwin_ provided
documentation and follow it (or even find it).

> I think I discovered a problem.
> 
> Run services.msc and selecting sshd) there is a "Path to executable" field
> that currently says :"C:\cygwin\bin\cygrunsrv.exe"

And it says the same for the other 10 services I'm running, and all of them
start automatically.

[snip]
> Am I barking up the wrong tree?

Yep.
-- 
René Berber


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

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

* RE: cygrunsrv, sshd, services and not starting after boot
  2006-09-02 20:18 cygrunsrv, sshd, services and not starting after boot Ron Dozier
  2006-09-02 20:47 ` Igor Peshansky
  2006-09-02 20:55 ` René Berber
@ 2006-09-04  3:04 ` David Christensen
  2 siblings, 0 replies; 4+ messages in thread
From: David Christensen @ 2006-09-04  3:04 UTC (permalink / raw)
  To: cygwin

Ron Dozier wrote
> I noted that a lot of people are having trouble getting the sshd
> service to start automatically.

I've run into the same issue with exim, sshd, and/or cron.  I haven't
tried to dig for the root cause.  Running rebaseall fixes the issue
(whatever it is), and that's good enough for me.


David


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

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

end of thread, other threads:[~2006-09-04  3:04 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2006-09-02 20:18 cygrunsrv, sshd, services and not starting after boot Ron Dozier
2006-09-02 20:47 ` Igor Peshansky
2006-09-02 20:55 ` René Berber
2006-09-04  3:04 ` David Christensen

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