www.delorie.com/archives/browse.cgi | search |
Mailing-List: | contact cygwin-help AT cygwin DOT com; run by ezmlm |
List-Subscribe: | <mailto:cygwin-subscribe AT cygwin DOT com> |
List-Archive: | <http://sources.redhat.com/ml/cygwin/> |
List-Post: | <mailto:cygwin AT cygwin DOT com> |
List-Help: | <mailto:cygwin-help AT cygwin DOT com>, <http://sources.redhat.com/ml/#faqs> |
Sender: | cygwin-owner AT cygwin DOT com |
Mail-Followup-To: | cygwin AT cygwin DOT com |
Delivered-To: | mailing list cygwin AT cygwin DOT com |
X-WM-Posted-At: | avacado.atomice.net; Thu, 18 Apr 02 20:41:56 +0100 |
Message-ID: | <002301c1e711$1943ab50$0100a8c0@advent02> |
From: | "Chris January" <chris AT atomice DOT net> |
To: | <cygwin AT cygwin DOT com> |
References: | <20020418183018 DOT GE1580 AT tishler DOT net> |
Subject: | Re: A good way to debug LocalSystem services? |
Date: | Thu, 18 Apr 2002 20:41:56 +0100 |
MIME-Version: | 1.0 |
X-Priority: | 3 |
X-MSMail-Priority: | Normal |
X-MimeOLE: | Produced By Microsoft MimeOLE V6.00.2600.0000 |
> 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 AT 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/
webmaster | delorie software privacy |
Copyright © 2019 by DJ Delorie | Updated Jul 2019 |