Mail Archives: cygwin/2002/04/18/14:24:42
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.
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/
- Raw text -