cygrunsrv: Error starting a service: QueryServiceStatus: Win32 error 1062:

January 28, 2009

$ cygrunsrv.exe  -S sshd

cygrunsrv: Error starting a service: QueryServiceStatus:  Win32 error 1062:

Cannot start sshd.
$ cygrunsrv.exe  -I sshd –path /usr/sbin/sshd.exe
cygrunsrv: Error installing a service: OpenSCManager:  Win32 error 5:
Access is denied.
People seem to suggest permission problems. I haven’t solved the problem yet.

7 Responses to “cygrunsrv: Error starting a service: QueryServiceStatus: Win32 error 1062:”

  1. smugllama Says:

    I think the user account you are logging on as does not have permissions to install new services (Even though my user account is a member of the Administrators group)

    I ran into this problem on a Windows 2008 system and wasted a bunch of time trying to figure out how to grant myself that permission.

    I gave up on that route and was able to solve it by right-clicking on the shortcut for starting the Command Prompt and selecting “Run as Administrator”.

    I imagine you could also solve this by actually logging on as the Administrator account.

  2. Tom Says:

    I tried running a service — rsync in my case — as a member of the Administrative group. The batch file failed: Access denied.

    Then I ran the same batch file after right clicking on Command Prompt and selecting “Run as Administrator”. The service is now registered in Services (Local) but will not not start. This is an improvement but not sufficient. The new error is “Windows could not start the rsyncd service on Local Computer. Error 1067: The process terminated unexpectedly.”

  3. Thomas Says:

    I think I maybe having a similar problem. I have two programs giving me the same error message about openscmanager; “OpenSCManager: Win32 error 5”. (Cygwin and Wipfw) Also, I am using Windows 7 64 bit, and both programs are listed as being conpatible.

    I have tried running them as administrator, clearing out Registry errors, running other scans, and a few other things… nothing seems to work!

    Are there any other ideas!?

  4. dj Says:

    I’ve spent a while looking at this and other cygrunsrv / cron problems. If you still have the problem I’ve written up my findings here.

  5. robert Says:

    I looked at /var/log/sshd.log and I got info on the permissions of the host keys being set too high. “chmod go-rw *key” in /etc did it for me. Also gave full control to S
    YSTEM user for /cygwin, /cygwin/var and /cygwin/var/log. In windows 8 I got an error in doing this saying that objects in container weren’t accepted. This can be ignored safely as the access controls otherwise were accepted.

Leave a Reply

Fill in your details below or click an icon to log in: Logo

You are commenting using your account. Log Out /  Change )

Google+ photo

You are commenting using your Google+ account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )


Connecting to %s

%d bloggers like this: