This is the mail archive of the cygwin@cygwin.com mailing list for the Cygwin project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]

How to debug inetd/sshd services?


Hi there,

I wrote a while ago about a problem with my remote login environment
(W2K, Cygwin 1.3.3(0.46/3/2), wrong /cygdrive prefix in my $PATH).  As
it seems that the same problem appears in all remote login methods
(telnet, rsh, ssh), I suspect this is somehow due to the service
starting circumstances.

So: how do I debug `inetd' or `sshd' when they start as services under
the local system account?

I see inetd starts on its own and sshd with cygrunsrv.  I would first
simply run these under strace, but I have difficulty figuring out where
and how to make that change.  This is what I have tried:
  - I was unable to see and alter the cygrunsrv parameters either in
    in the "Services" administrative tool or with cygrunsrv itself.
    So I changed the `sshd' entry with registry editor: `AppPath' to
    '/usr/bin/strace' and `AppArgs' to '-o /sshdlog /usr/sbin/sshd -D'.
    I then did `net stop sshd'.  On `net start sshd' the service did
    not start (`net' said no error message) and I got this in the
    event log: "starting service `sshd' failed: execv: 1, Not owner."

    The only references to the same error I found was with starting
    squid, but the solution there didn't seem to apply here as sshd
    and strace seem to have identical permissions, likewise for the
    directories (/usr/bin, /usr/sbin).

  - I modified the inetd.conf line for telnet to start in.telnetd via
    strace.  This seems to fail or upset in.telnetd, the connection
    terminates with "connection closed by foreign host" immediately
    after connection is established and in.telnetd should start.  I
    suppose the failure could be the same as above, but I could not
    find any error message anywhere.  Or I did something silly.

More information about my setup in my previous mail:
  http://sources.redhat.com/ml/cygwin/2001-10/msg00004.html

Any help to get me going would greatly appreciated...

At any rate, many thanks for the excellent tools!
//lat
-- 
We are waiting for the long-promised invasion.  So are the fishes.
	--Winston Churchill

--
Unsubscribe info:      http://cygwin.com/ml/#unsubscribe-simple
Bug reporting:         http://cygwin.com/bugs.html
Documentation:         http://cygwin.com/docs.html
FAQ:                   http://cygwin.com/faq/


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]