This is the mail archive of the
mailing list for the Cygwin project.
Fix for sshd service start failure problem
- From: "Joseph E. Vornehm, Jr." <jvornehm at hotmail dot com>
- To: cygwin at cygwin dot com
- Date: Fri, 23 Jan 2004 21:04:04 -0600
- Subject: Fix for sshd service start failure problem
For what it's worth, I think I've found a fix to a problem posted in October
of 2002 in this thread:
Here's my version of the problem: After running ssh-host-config (and
noticing two errors from chown about the system account), the sshd Windows
service won't start, even though manually executing /usr/sbin/sshd works
fine. I'm running the current openssh package, 3.7.1p2-2, on WinXP. All my
other Cygwin packages are current (as of today). Here is the error message
from sshd in the Windows application log (Event Viewer):
sshd : PID 4320 : starting service `sshd' failed: execv: 1, Operation not
The problem is that I didn't have the SYSTEM user listed in my /etc/passwd.
I noticed that ssh-host-config had some issues with some chown calls at
the end of its run. The application log message seems to come from the fact
that the ownership is incorrect for the /var/empty directory (where sshd
chroots to on startup, I gather).
Here was the easiest fix for me:
mypc$ mkpasswd -l | grep '^SYSTEM:' >> /etc/passwd
mypc$ cygrunsrv -R sshd
mypc$ rm /etc/ssh_host* /etc/ssh_config /etc/sshd_config
By the way, don't forget to delete /var/run/sshd.pid, if it's still around.
(It shouldn't exist if sshd exits cleanly.)
I have some fuzzy memory that putting the SYSTEM user in /etc/passwd used to
be a security issue in Cygwin. Just for safety, I removed the SYSTEM entry
from /etc/passwd again after I had run ssh-host-config. Would anyone else
care to comment one way or the other?
Please copy any replies to me directly, as I'm not subscribed to the list.
Unsubscribe info: http://cygwin.com/ml/#unsubscribe-simple
Problem reports: http://cygwin.com/problems.html