public inbox for cygwin@cygwin.com
 help / color / mirror / Atom feed
* A good way to debug LocalSystem services?
@ 2002-04-18 11:59 Jason Tishler
  2002-04-18 12:49 ` Chris January
  0 siblings, 1 reply; 3+ messages in thread
From: Jason Tishler @ 2002-04-18 11:59 UTC (permalink / raw)
  To: Cygwin

While trying to debug the following problem:

    http://sources.redhat.com/ml/cygwin/2002-04/msg00677.html

I needed to run code (i.e., seteuid()) under the LocalSystem account.
So, I used ssh to simulate su.

Specifically, I changed the SYSTEM entry in /etc/passwd to be as follows:

    SYSTEM:*:18:18:Local System,U-TISHLERJASON\LocalSystem,S-1-5-18:/home/system:/bin/bash

Then I created /home/system and copied my ssh keys to /home/system/.ssh.

After these steps, I could "su" to SYSTEM by simply executing the
following:

    $ ssh system@tishlerjason

Now I could run strace, gdb, etc. in the context of the LocalSystem
account which really help me solve the above problem.  Maybe this is a
decent way of debugging LocalSystem services in general?  Do others agree?

Note that I found one anomaly so far.  With /etc/passwd as above, when
cron runs jt's crontab it sets $HOME to /home/system instead of /home/jt.

Jason

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

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

* Re: A good way to debug LocalSystem services?
  2002-04-18 11:59 A good way to debug LocalSystem services? Jason Tishler
@ 2002-04-18 12:49 ` Chris January
  2002-04-18 15:03   ` Jason Tishler
  0 siblings, 1 reply; 3+ messages in thread
From: Chris January @ 2002-04-18 12:49 UTC (permalink / raw)
  To: cygwin

> While trying to debug the following problem:
>
>     http://sources.redhat.com/ml/cygwin/2002-04/msg00677.html
>
> I needed to run code (i.e., seteuid()) under the LocalSystem account.
> So, I used ssh to simulate su.
>
> Specifically, I changed the SYSTEM entry in /etc/passwd to be as follows:
>
>     SYSTEM:*:18:18:Local
System,U-TISHLERJASON\LocalSystem,S-1-5-18:/home/system:/bin/bash
>
> Then I created /home/system and copied my ssh keys to /home/system/.ssh.
>
> After these steps, I could "su" to SYSTEM by simply executing the
> following:
>
>     $ ssh system@tishlerjason
>
> Now I could run strace, gdb, etc. in the context of the LocalSystem
> account which really help me solve the above problem.  Maybe this is a
> decent way of debugging LocalSystem services in general?  Do others agree?
>
> Note that I found one anomaly so far.  With /etc/passwd as above, when
> cron runs jt's crontab it sets $HOME to /home/system instead of /home/jt.
A better way is:
AT <time> /interactive C:\Cygwin\Cygwin.bat
where <time> is 1 minute from now...
And for other users:
RUNAS /user:<username> C:\Cygwin\Cygwin.bat

Regards
Chris



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

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

* Re: A good way to debug LocalSystem services?
  2002-04-18 12:49 ` Chris January
@ 2002-04-18 15:03   ` Jason Tishler
  0 siblings, 0 replies; 3+ messages in thread
From: Jason Tishler @ 2002-04-18 15:03 UTC (permalink / raw)
  To: cygwin

Chris,

On Thu, Apr 18, 2002 at 08:41:56PM +0100, Chris January wrote:
> And for other users:
> RUNAS /user:<username> C:\Cygwin\Cygwin.bat

I thought of runas, but what is the password for LocalSystem?

Jason

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

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

end of thread, other threads:[~2002-04-18 21:06 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2002-04-18 11:59 A good way to debug LocalSystem services? Jason Tishler
2002-04-18 12:49 ` Chris January
2002-04-18 15:03   ` Jason Tishler

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