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]

Re: How to debug inetd/sshd services?


I think it is the right idea to change the AppArgs 
to have the "-d" (debug) option. IIRC you should be able to 
do this for both inetd and sshd, but it may be easier to 
install the service with something like Firedaemon so you 
can access the parameters from the services control pane. 

The error you are getting when sshd service fails to start 
sounds like your user account doesn't have the necessary 
rights to start a service. You may want to give your account 
those rights- they are detailed in 

/usr/doc/cygwin/inetutils-1.3.2.README 

Or you can try starting the service from the services control panel, 
or rebooting to start automatically. 

HTH,
Peter

"Lassi A. Tuura" wrote:
> 
> 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/

-- 
Your mouse has moved.
Windows NT must be restarted for the change to take effect.
Reboot now?  [OK]

--

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