Re: Cron Running As UID 400

2004-02-26 Thread Corinna Vinschen
On Feb 25 20:44, Pierre A. Humblet wrote:
 cron problems seem to be reported regularly.
 
 I have one suggestion:
 could the cron_diagnose.sh script of Mark Harig be turned into
 a cron-config script distributed with cron?
 In addition of going through the list of checks, it should also 
 start cron, taking into account Windows 2003 peculiarities
 as ssh-host-config and exim-config (among others) already do.
 
 Of course it's up to Mark and Corinna to agree/coordinate that
 transformation.

If Mark is interested in preparing a cron-config script, I'd be happy
to include it into the cron package.

I'd be even more happy to hand over the cron package maintainership
entirely!


Corinna

-- 
Corinna Vinschen  Please, send mails regarding Cygwin to
Cygwin Developermailto:[EMAIL PROTECTED]
Red Hat, Inc.


Re: Cron Running As UID 400

2004-02-25 Thread Pierre A. Humblet
cron problems seem to be reported regularly.

I have one suggestion:
could the cron_diagnose.sh script of Mark Harig be turned into
a cron-config script distributed with cron?
In addition of going through the list of checks, it should also 
start cron, taking into account Windows 2003 peculiarities
as ssh-host-config and exim-config (among others) already do.

Of course it's up to Mark and Corinna to agree/coordinate that
transformation.

Pierre


  
At 06:18 PM 2/25/2004 -0500, you wrote:

Pierre,

Windows Task Manager reports the user as SYSTEM for all cygrunsrv
processes and their children (cron, inetd, etc.).  Interestingly enough,
I regenerated the /etc/passwd entry for my user login on my Windows XP
Pro box at work and the UID field changed from what it was before (after
I sent the initial problem email to the Cygwin list).  Then, I rebooted
and all Cygwin related services (cygrunsrvs) were now identified as
unknown user 400 in ps -ef.  As one would then expect, now I do not have
any capabilities associated with these services, including ftp, telnet,
and IPC.

My /etc/passwd file has the SYSTEM, Administrators and my personal
account listed as:

SYSTEM:*:18:544:,S-1-5-18::
Administrators:*:544:544:,S-1-5-32-544::
winwa02:unused_by_nt/2000/xp:70656:10513:Winch Jr., Wayne
S,U-TANT-A01\winwa02,S-1-5-21-2129867641-919698055-327642922-60656:/home
/winwa02:/bin/bash

My company's domain is TANT-A01 and my username is winwa02.

Also, if I type passwd, then I get the following response:

$ passwd
passwd: unknown user winwa02


As you can see, my login entry is in /etc/passwd, but I seem to be
logged in as a different user, even though id reports:

$ id
uid=70656(winwa02) gid=10513(Domain Users)
groups=544(Administrators),545(Users),143344(442-SC-CRO-R),106908(98-Sit
e),10513(Domain Users),162415(NASiteGroups),169978(North American Sites)


Regards,

Wayne


Wayne,

The only reason why a Cygwin process runs with uid 400
is that its SID was not found in /etc/passwd when first
starting from Windows (you can observe that by temporarily
renaming /etc/passwd and starting a fresh Cygwin process).
It's stange that this happens only for one cygrunsrv process

Please use the Windows Task Manager (Processes tab) and
report the User of the strange cygrunsrv, according to Windows.
 
Pierre



RE: Cron Running As UID 400

2004-02-25 Thread Harig, Mark
Please read the message in the Cygwin mailing list at:

http://sources.redhat.com/ml/cygwin/2003-12/msg00711.html

It will provide you with a script that will attempt
to diagnose the problem that you are having with cron.


 -Original Message-
 From: Winch Jr., Wayne S [mailto:[EMAIL PROTECTED]
 Sent: Tuesday, February 24, 2004 4:06 PM
 To: [EMAIL PROTECTED]
 Subject: Cron Running As UID 400
 
 
 Hi,
 
 I've been through a couple of problems already with cron and have
 resolved all of them (thanks to this list!) except this last one.  The
 cron service is indeed running, but no jobs are ever run as 
 described in
 the crontab.  A strange thing I've noted is that the user 
 that the cron
 service is running under is not the expected SYSTEM but the 
 unknown 400
 as:
 
 $ ps -ef
  UID PIDPPID TTY STIME COMMAND
  winwa02 904   1   ?Feb 23 /usr/X11R6/bin/XWin
   SYSTEM3912   1   ?Feb 23 /usr/bin/cygrunsrv
   SYSTEM15123912   ?Feb 23 /usr/sbin/inetd
   SYSTEM2616   1   ?Feb 23 /usr/bin/cygrunsrv
   SYSTEM26482616   ?Feb 23 /usr/sbin/cygserver
  winwa021412   1   4Feb 23 /usr/bin/rxvt
  winwa0235521412   5Feb 23 /usr/bin/bash
  winwa0230843552   5Feb 23 /usr/bin/telnet
  winwa023228   1   2  14:16:18 /usr/bin/rxvt
  winwa0236403228   3  14:16:19 /usr/bin/bash
  winwa0231763640   3  15:46:35 /usr/bin/telnet
  winwa023016   1   6  16:06:23 /usr/bin/rxvt
  winwa0225043016   7  16:06:23 /usr/bin/bash
  winwa023856   1   0  11:13:47 /usr/bin/rxvt
  winwa0235763856   1  11:13:48 /usr/bin/bash
  4002228   1   ?  12:30:59 /usr/bin/cygrunsrv
  400 5362228   ?  12:30:59 /usr/sbin/cron
  winwa0221882504   7  12:37:47 /usr/bin/ps
 
 
 
 Note that other cygrunsrv processes do indeed correctly run under
 SYSTEM.  I suspect that if my cron and its associated parent cygrunsrv
 process were running as SYSTEM, then the cron jobs would 
 execute per the
 crontab.  In fact, I manually ran /usr/sbin/cron as my user (winwa02)
 and cron was indeed able to kick off the crontab jobs properly.
 
 A relevant entry in the Windows XP Application Event log 
 appears in full
 when /usr/sbin/cron starts as:
 
 The description for Event ID ( 0 ) in Source ( /usr/sbin/cron ) cannot
 be found. The local computer may not have the necessary registry
 information or message DLL files to display messages from a remote
 computer. You may be able to use the /AUXSOURCE= flag to retrieve this
 description; see Help and Support for details. The following 
 information
 is part of the event: /usr/sbin/cron : PID 536 : (winwa02) ORPHAN (no
 passwd entry).
 
 The typical command line used to install the cron service was:
 
 cygrunsrv -I cron -p /usr/sbin/cron -a -D -e CYGWIN=tty ntsec -d
 CYGWIN cron
 
 My domain /etc/passwd and /etc/group files are up-to-date.
 
 As usual the output of the relevant sections of cygcheck -svr appears
 below:
 
 
 Cygwin Win95/NT Configuration Diagnostics
 Current System Time: Tue Feb 24 11:08:08 2004
 
 Windows XP Professional Ver 5.1 Build 2600 Service Pack 1
 
 --snip--
 
 Output from C:\cygwin\bin\id.exe (nontsec)
 UID: 5120(winwa02) GID: 10513(Domain Users)
 10513(Domain Users)
 
 Output from C:\cygwin\bin\id.exe (ntsec)
 UID: 5120(winwa02) GID: 10513(Domain Users)
 544(Administrators)   
 545(Users)143344(442-SC-CRO-R)
 106908(98-Site)   
 10513(Domain Users)   162415(NASiteGroups)
 169978(North American Sites)
 
 SysDir: C:\WINDOWS\System32
 WinDir: C:\WINDOWS
 
 CYGWIN = `tty notitle glob ntsec codepage:oem server'
 HOME = `C:\cygwin\home\winwa02'
 MAKE_MODE = `unix'
 PWD = `/home/winwa02'
 USER = `winwa02'
 
 --snip--
 
 
  1083k 2004/01/31 C:\cygwin\bin\cygwin1.dll - os=4.0 img=1.0 sys=4.0
   cygwin1.dll v0.0 ts=2004/1/30 16:32
 Cygwin DLL version info:
 DLL version: 1.5.7
 DLL epoch: 19
 DLL bad signal mask: 19005
 DLL old termios: 5
 DLL malloc env: 28
 API major: 0
 API minor: 109
 Shared data: 3
 DLL identifier: cygwin1
 Mount registry: 2
 Cygnus registry name: Cygnus Solutions
 Cygwin registry name: Cygwin
 Program options name: Program Options
 Cygwin mount registry name: mounts v2
 Cygdrive flags: cygdrive flags
 Cygdrive prefix: cygdrive prefix
 Cygdrive default prefix: 
 Build date: Fri Jan 30 19:32:04 EST 2004
 CVS tag: cr-0x9e
 Shared id: cygwin1S3
 
 --snip--
 
 Cygwin Package Information
 Last downloaded files to: C:\Documents and Settings\winwa02\My
 Documents\My Downloads\cygwin
 Last downloaded files from: 
ftp://mirrors.rcn.net/pub/sourceware/cygwin

Package Version
-- snip --
cron 

RE: Cron Running As UID 400

2004-02-25 Thread Winch Jr., Wayne S
Mark,

Thanks for your quick reply.  I'm sorry that I had neglected to mention
that I had already run the cron_diagnose.sh script and it reported that
no problems were found; I ran it again just now as a sanity check and
still no problems found.  I did try uninstalling/reinstalling the cron
service as suggested by cron_diagnose.sh (several times with
variations), but cron still does not kick jobs off as expected.

My test crontab is as follows:

$ crontab -l
# DO NOT EDIT THIS FILE - edit the master and reinstall.
# (/tmp/crontab.3604 installed on Tue Feb 24 12:15:13 2004)
# (Cron version -- $Id: crontab.c,v 1.7 2003/04/15 15:13:41 corinna Exp
$)
0 0-23/4 * * * /usr/bin/updatedb
* * * * * pwd  /tmp/crontest 


Also, I was able to get cron running properly on my home system (Windows
XP Pro).  In that setup, I once again noticed that cron and its parent
cygrunsrv processes are identified as running under SYSTEM vice unknown
user 400 as on my office system that doesn't work.

Regards,

Wayne

-Original Message-
From: Harig, Mark [mailto:[EMAIL PROTECTED] 
Sent: Wednesday, February 25, 2004 7:56 AM
To: Winch Jr., Wayne S; [EMAIL PROTECTED]
Subject: RE: Cron Running As UID 400

Please read the message in the Cygwin mailing list at:

http://sources.redhat.com/ml/cygwin/2003-12/msg00711.html

It will provide you with a script that will attempt to diagnose the
problem that you are having with cron.


 -Original Message-
 From: Winch Jr., Wayne S [mailto:[EMAIL PROTECTED]
 Sent: Tuesday, February 24, 2004 4:06 PM
 To: [EMAIL PROTECTED]
 Subject: Cron Running As UID 400
 
 
 Hi,
 
 I've been through a couple of problems already with cron and have 
 resolved all of them (thanks to this list!) except this last one.  The

 cron service is indeed running, but no jobs are ever run as described 
 in the crontab.  A strange thing I've noted is that the user that the 
 cron service is running under is not the expected SYSTEM but the 
 unknown 400
 as:
 
 $ ps -ef
  UID PIDPPID TTY STIME COMMAND
  winwa02 904   1   ?Feb 23 /usr/X11R6/bin/XWin
   SYSTEM3912   1   ?Feb 23 /usr/bin/cygrunsrv
   SYSTEM15123912   ?Feb 23 /usr/sbin/inetd
   SYSTEM2616   1   ?Feb 23 /usr/bin/cygrunsrv
   SYSTEM26482616   ?Feb 23 /usr/sbin/cygserver
  winwa021412   1   4Feb 23 /usr/bin/rxvt
  winwa0235521412   5Feb 23 /usr/bin/bash
  winwa0230843552   5Feb 23 /usr/bin/telnet
  winwa023228   1   2  14:16:18 /usr/bin/rxvt
  winwa0236403228   3  14:16:19 /usr/bin/bash
  winwa0231763640   3  15:46:35 /usr/bin/telnet
  winwa023016   1   6  16:06:23 /usr/bin/rxvt
  winwa0225043016   7  16:06:23 /usr/bin/bash
  winwa023856   1   0  11:13:47 /usr/bin/rxvt
  winwa0235763856   1  11:13:48 /usr/bin/bash
  4002228   1   ?  12:30:59 /usr/bin/cygrunsrv
  400 5362228   ?  12:30:59 /usr/sbin/cron
  winwa0221882504   7  12:37:47 /usr/bin/ps
 
 
 
 Note that other cygrunsrv processes do indeed correctly run under 
 SYSTEM.  I suspect that if my cron and its associated parent cygrunsrv

 process were running as SYSTEM, then the cron jobs would execute per 
 the crontab.  In fact, I manually ran /usr/sbin/cron as my user 
 (winwa02) and cron was indeed able to kick off the crontab jobs 
 properly.
 
 A relevant entry in the Windows XP Application Event log appears in 
 full when /usr/sbin/cron starts as:
 
 The description for Event ID ( 0 ) in Source ( /usr/sbin/cron ) cannot

 be found. The local computer may not have the necessary registry 
 information or message DLL files to display messages from a remote 
 computer. You may be able to use the /AUXSOURCE= flag to retrieve this

 description; see Help and Support for details. The following 
 information is part of the event: /usr/sbin/cron : PID 536 : (winwa02)

 ORPHAN (no passwd entry).
 
 The typical command line used to install the cron service was:
 
 cygrunsrv -I cron -p /usr/sbin/cron -a -D -e CYGWIN=tty ntsec -d 
 CYGWIN cron
 
 My domain /etc/passwd and /etc/group files are up-to-date.
 
 As usual the output of the relevant sections of cygcheck -svr appears
 below:
 
 
 Cygwin Win95/NT Configuration Diagnostics Current System Time: Tue Feb

 24 11:08:08 2004
 
 Windows XP Professional Ver 5.1 Build 2600 Service Pack 1
 
 --snip--
 
 Output from C:\cygwin\bin\id.exe (nontsec)
 UID: 5120(winwa02) GID: 10513(Domain Users) 10513(Domain Users)
 
 Output from C:\cygwin\bin\id.exe (ntsec)
 UID: 5120(winwa02) GID: 10513(Domain Users)
 544(Administrators)   
 545(Users)143344(442-SC-CRO-R)
 106908(98-Site)   
 10513(Domain Users)   162415(NASiteGroups)
 169978(North American Sites)
 
 SysDir: C:\WINDOWS\System32
 WinDir: C:\WINDOWS
 
 CYGWIN = `tty notitle glob ntsec codepage:oem server'
 HOME = `C:\cygwin\home\winwa02'
 MAKE_MODE = `unix

Re: Cron Running As UID 400

2004-02-25 Thread Pierre A. Humblet
Wayne,

The only reason why a Cygwin process runs with uid 400
is that its SID was not found in /etc/passwd when first
starting from Windows (you can observe that by temporarily
renaming /etc/passwd and starting a fresh Cygwin process).
It's stange that this happens only for one cygrunsrv process 

Please use the Windows Task Manager (Processes tab) and
report the User of the strange cygrunsrv, according to Windows.
 
Pierre

On Wed, Feb 25, 2004 at 12:41:20PM -0500, Winch Jr., Wayne S wrote:
 Mark,
 
 Thanks for your quick reply.  I'm sorry that I had neglected to mention
 that I had already run the cron_diagnose.sh script and it reported that
 no problems were found; I ran it again just now as a sanity check and
 still no problems found.  I did try uninstalling/reinstalling the cron
 service as suggested by cron_diagnose.sh (several times with
 variations), but cron still does not kick jobs off as expected.
 
 My test crontab is as follows:
 
 $ crontab -l
 # DO NOT EDIT THIS FILE - edit the master and reinstall.
 # (/tmp/crontab.3604 installed on Tue Feb 24 12:15:13 2004)
 # (Cron version -- $Id: crontab.c,v 1.7 2003/04/15 15:13:41 corinna Exp
 $)
 0 0-23/4 * * * /usr/bin/updatedb
 * * * * * pwd  /tmp/crontest 
 
 
 Also, I was able to get cron running properly on my home system (Windows
 XP Pro).  In that setup, I once again noticed that cron and its parent
 cygrunsrv processes are identified as running under SYSTEM vice unknown
 user 400 as on my office system that doesn't work.
 
 Regards,
 
 Wayne
 
 -Original Message-
 From: Harig, Mark [mailto:[EMAIL PROTECTED] 
 Sent: Wednesday, February 25, 2004 7:56 AM
 To: Winch Jr., Wayne S; [EMAIL PROTECTED]
 Subject: RE: Cron Running As UID 400
 
 Please read the message in the Cygwin mailing list at:
 
 http://sources.redhat.com/ml/cygwin/2003-12/msg00711.html
 
 It will provide you with a script that will attempt to diagnose the
 problem that you are having with cron.
 
 
  -Original Message-
  From: Winch Jr., Wayne S [mailto:[EMAIL PROTECTED]
  Sent: Tuesday, February 24, 2004 4:06 PM
  To: [EMAIL PROTECTED]
  Subject: Cron Running As UID 400
  
  
  Hi,
  
  I've been through a couple of problems already with cron and have 
  resolved all of them (thanks to this list!) except this last one.  The
 
  cron service is indeed running, but no jobs are ever run as described 
  in the crontab.  A strange thing I've noted is that the user that the 
  cron service is running under is not the expected SYSTEM but the 
  unknown 400
  as:
  
  $ ps -ef
   UID PIDPPID TTY STIME COMMAND
   winwa02 904   1   ?Feb 23 /usr/X11R6/bin/XWin
SYSTEM3912   1   ?Feb 23 /usr/bin/cygrunsrv
SYSTEM15123912   ?Feb 23 /usr/sbin/inetd
SYSTEM2616   1   ?Feb 23 /usr/bin/cygrunsrv
SYSTEM26482616   ?Feb 23 /usr/sbin/cygserver
   winwa021412   1   4Feb 23 /usr/bin/rxvt
   winwa0235521412   5Feb 23 /usr/bin/bash
   winwa0230843552   5Feb 23 /usr/bin/telnet
   winwa023228   1   2  14:16:18 /usr/bin/rxvt
   winwa0236403228   3  14:16:19 /usr/bin/bash
   winwa0231763640   3  15:46:35 /usr/bin/telnet
   winwa023016   1   6  16:06:23 /usr/bin/rxvt
   winwa0225043016   7  16:06:23 /usr/bin/bash
   winwa023856   1   0  11:13:47 /usr/bin/rxvt
   winwa0235763856   1  11:13:48 /usr/bin/bash
   4002228   1   ?  12:30:59 /usr/bin/cygrunsrv
   400 5362228   ?  12:30:59 /usr/sbin/cron
   winwa0221882504   7  12:37:47 /usr/bin/ps
  
  
  
  Note that other cygrunsrv processes do indeed correctly run under 
  SYSTEM.  I suspect that if my cron and its associated parent cygrunsrv
 
  process were running as SYSTEM, then the cron jobs would execute per 
  the crontab.  In fact, I manually ran /usr/sbin/cron as my user 
  (winwa02) and cron was indeed able to kick off the crontab jobs 
  properly.
  
  A relevant entry in the Windows XP Application Event log appears in 
  full when /usr/sbin/cron starts as:
  
  The description for Event ID ( 0 ) in Source ( /usr/sbin/cron ) cannot
 
  be found. The local computer may not have the necessary registry 
  information or message DLL files to display messages from a remote 
  computer. You may be able to use the /AUXSOURCE= flag to retrieve this
 
  description; see Help and Support for details. The following 
  information is part of the event: /usr/sbin/cron : PID 536 : (winwa02)
 
  ORPHAN (no passwd entry).
  
  The typical command line used to install the cron service was:
  
  cygrunsrv -I cron -p /usr/sbin/cron -a -D -e CYGWIN=tty ntsec -d 
  CYGWIN cron
  
  My domain /etc/passwd and /etc/group files are up-to-date.
  
  As usual the output of the relevant sections of cygcheck -svr appears
  below:
  
  
  Cygwin Win95/NT Configuration Diagnostics Current System Time: Tue Feb
 
  24 11:08:08 2004
  
  Windows XP Professional

Re: Cron Running As UID 400

2004-02-25 Thread Winch Jr., Wayne S

Pierre,

Windows Task Manager reports the user as SYSTEM for all cygrunsrv
processes and their children (cron, inetd, etc.).  Interestingly enough,
I regenerated the /etc/passwd entry for my user login on my Windows XP
Pro box at work and the UID field changed from what it was before (after
I sent the initial problem email to the Cygwin list).  Then, I rebooted
and all Cygwin related services (cygrunsrvs) were now identified as
unknown user 400 in ps -ef.  As one would then expect, now I do not have
any capabilities associated with these services, including ftp, telnet,
and IPC.

My /etc/passwd file has the SYSTEM, Administrators and my personal
account listed as:

SYSTEM:*:18:544:,S-1-5-18::
Administrators:*:544:544:,S-1-5-32-544::
winwa02:unused_by_nt/2000/xp:70656:10513:Winch Jr., Wayne
S,U-TANT-A01\winwa02,S-1-5-21-2129867641-919698055-327642922-60656:/home
/winwa02:/bin/bash

My company's domain is TANT-A01 and my username is winwa02.

Also, if I type passwd, then I get the following response:

$ passwd
passwd: unknown user winwa02


As you can see, my login entry is in /etc/passwd, but I seem to be
logged in as a different user, even though id reports:

$ id
uid=70656(winwa02) gid=10513(Domain Users)
groups=544(Administrators),545(Users),143344(442-SC-CRO-R),106908(98-Sit
e),10513(Domain Users),162415(NASiteGroups),169978(North American Sites)


Regards,

Wayne


Wayne,

The only reason why a Cygwin process runs with uid 400
is that its SID was not found in /etc/passwd when first
starting from Windows (you can observe that by temporarily
renaming /etc/passwd and starting a fresh Cygwin process).
It's stange that this happens only for one cygrunsrv process

Please use the Windows Task Manager (Processes tab) and
report the User of the strange cygrunsrv, according to Windows.
 
Pierre

--
Unsubscribe info:  http://cygwin.com/ml/#unsubscribe-simple
Problem reports:   http://cygwin.com/problems.html
Documentation: http://cygwin.com/docs.html
FAQ:   http://cygwin.com/faq/



Re: Cron Running As UID 400

2004-02-25 Thread Pierre A. Humblet
At 06:18 PM 2/25/2004 -0500, Winch Jr., Wayne S wrote:

Pierre,

Windows Task Manager reports the user as SYSTEM for all cygrunsrv
processes and their children (cron, inetd, etc.).  Interestingly enough,
I regenerated the /etc/passwd entry for my user login on my Windows XP
Pro box at work and the UID field changed from what it was before (after
I sent the initial problem email to the Cygwin list).  Then, I rebooted
and all Cygwin related services (cygrunsrvs) were now identified as
unknown user 400 in ps -ef.  As one would then expect, now I do not have
any capabilities associated with these services, including ftp, telnet,
and IPC.

At least now it's consistent! 
Is /etc/passwd readable by everybody?
Is the system mount for / (or /etc) the same as your user mount?
Is /etc/passwd on a local disk?
One way or another, SYSTEM cannot read /etc/passwd, 
although (going back to your original mail), it was initially
able to read it. 


My /etc/passwd file has the SYSTEM, Administrators and my personal
account listed as:

SYSTEM:*:18:544:,S-1-5-18::
Administrators:*:544:544:,S-1-5-32-544::
winwa02:unused_by_nt/2000/xp:70656:10513:Winch Jr., Wayne
S,U-TANT-A01\winwa02,S-1-5-21-2129867641-919698055-327642922-60656:/home
/winwa02:/bin/bash

That looks OK.

My company's domain is TANT-A01 and my username is winwa02.

Also, if I type passwd, then I get the following response:

$ passwd
passwd: unknown user winwa02


As you can see, my login entry is in /etc/passwd, but I seem to be
logged in as a different user, even though id reports:

Does passwd support domain users?

$ id
uid=70656(winwa02) gid=10513(Domain Users)
groups=544(Administrators),545(Users),143344(442-SC-CRO-R),106908(98-Sit
e),10513(Domain Users),162415(NASiteGroups),169978(North American Sites)


That's OK, you are logged in as U-TANT-A01\winwa02

Pierre


Wayne,

The only reason why a Cygwin process runs with uid 400
is that its SID was not found in /etc/passwd when first
starting from Windows (you can observe that by temporarily
renaming /etc/passwd and starting a fresh Cygwin process).
It's stange that this happens only for one cygrunsrv process

Please use the Windows Task Manager (Processes tab) and
report the User of the strange cygrunsrv, according to Windows.
 
Pierre


--
Unsubscribe info:  http://cygwin.com/ml/#unsubscribe-simple
Problem reports:   http://cygwin.com/problems.html
Documentation: http://cygwin.com/docs.html
FAQ:   http://cygwin.com/faq/



RE: Cron Running As UID 400

2004-02-25 Thread Winch Jr., Wayne S
 Pierre,

Somehow the permissions on my /etc/passwd and /etc/group files only gave
read permission to my account not SYSTEM.  Perhaps cron_diagnose.sh can
be updated to incorporate this checkpoint, i.e., that passwd and group
in /etc are readable by everyone.

Thanks for your help, Pierre.  Now cron jobs kick off properly and I
have telnet, ftp, etc. back again!  :-D

Cygwin rocks!

Wayne

-Original Message-
From: Pierre A. Humblet [mailto:[EMAIL PROTECTED] 
Sent: Wednesday, February 25, 2004 3:42 PM
To: Winch Jr., Wayne S; [EMAIL PROTECTED]
Subject: Re: Cron Running As UID 400

At 06:18 PM 2/25/2004 -0500, Winch Jr., Wayne S wrote:

Pierre,

Windows Task Manager reports the user as SYSTEM for all cygrunsrv 
processes and their children (cron, inetd, etc.).  Interestingly 
enough, I regenerated the /etc/passwd entry for my user login on my 
Windows XP Pro box at work and the UID field changed from what it was 
before (after I sent the initial problem email to the Cygwin list).  
Then, I rebooted and all Cygwin related services (cygrunsrvs) were now 
identified as unknown user 400 in ps -ef.  As one would then expect, 
now I do not have any capabilities associated with these services, 
including ftp, telnet, and IPC.

At least now it's consistent! 
Is /etc/passwd readable by everybody?
Is the system mount for / (or /etc) the same as your user mount?
Is /etc/passwd on a local disk?
One way or another, SYSTEM cannot read /etc/passwd, although (going back
to your original mail), it was initially able to read it. 


My /etc/passwd file has the SYSTEM, Administrators and my personal 
account listed as:

SYSTEM:*:18:544:,S-1-5-18::
Administrators:*:544:544:,S-1-5-32-544::
winwa02:unused_by_nt/2000/xp:70656:10513:Winch Jr., Wayne 
S,U-TANT-A01\winwa02,S-1-5-21-2129867641-919698055-327642922-60656:/hom
e
/winwa02:/bin/bash

That looks OK.

My company's domain is TANT-A01 and my username is winwa02.

Also, if I type passwd, then I get the following response:

$ passwd
passwd: unknown user winwa02


As you can see, my login entry is in /etc/passwd, but I seem to be 
logged in as a different user, even though id reports:

Does passwd support domain users?

$ id
uid=70656(winwa02) gid=10513(Domain Users) 
groups=544(Administrators),545(Users),143344(442-SC-CRO-R),106908(98-Si
t e),10513(Domain Users),162415(NASiteGroups),169978(North American 
Sites)


That's OK, you are logged in as U-TANT-A01\winwa02

Pierre


Wayne,

The only reason why a Cygwin process runs with uid 400 is that its SID

was not found in /etc/passwd when first starting from Windows (you can

observe that by temporarily renaming /etc/passwd and starting a fresh 
Cygwin process).
It's stange that this happens only for one cygrunsrv process

Please use the Windows Task Manager (Processes tab) and report the 
User of the strange cygrunsrv, according to Windows.
 
Pierre



--
Unsubscribe info:  http://cygwin.com/ml/#unsubscribe-simple
Problem reports:   http://cygwin.com/problems.html
Documentation: http://cygwin.com/docs.html
FAQ:   http://cygwin.com/faq/