public inbox for cygwin@cygwin.com
 help / color / mirror / Atom feed
* Cron can't switch user context
@ 2021-04-27 10:37 Peter Pfannenschmid
  2021-04-28  0:14 ` Brian Inglis
  0 siblings, 1 reply; 9+ messages in thread
From: Peter Pfannenschmid @ 2021-04-27 10:37 UTC (permalink / raw)
  To: cygwin


[-- Attachment #1.1.1: Type: text/plain, Size: 2218 bytes --]

Dear ladies and gentlemen,

thank you very much for providing the Cygwin DLL and ecosystem. We are using it since many years without any problem.

However, today we have run into an issue with cron. Please see the attached logs for details.

Additional notes:

- O/S is Windows Server 2019 Standard x64

- The cyg_server user has been created by cron-config, and we didn't change anything in that user's configuration afterwards. However, we have verified that this user has sufficient privileges (Replace a process level token, Log on as a service, Create a token object, Be part of the Administrators group).

- We did some tests with cron-config. We always stopped the Cygwin Cron Service before running cron-config. We always answered con-config's question the same, except the question "Enter the value of CYGWIN for the daemon". We don't know what this is about, so we first let it at the default value, just hitting Enter. In the next try, we answered "netsec" and hit Enter (as found on stackoverflow). In the third try, we answered "binmode netsec" and hit Enter (as found on the Oracle website).

However, the behavior was the same regardless of what answer we had given 
there.

- Our goal is to run the Cygwin cron daemon as a Windows service, to have 
that Windows service log on as "cyg_server" (not "Administrator" or "System), and to let the cron daemon execute crontabs from different users (including the user "Administrator").

The service is starting and reads Administrator's crontab, but when trying to execute the entries, it can't do that and errors out with "(CRON) error (can't switch user context)". We haven't installed crontabs for other 
users yet, because the crontab of Administrator is the most important one, so we'd like to concentrate on solving that problem first.

We are aware that there are many tutorials and Q&A on the net which deal with exactly this subject. However, none of the proposed solutions worked 
for us.

We would be very glad if you could give us some hints how to solve the problem.

Thank you very much,

Peter

P.S. Please note that /var/log/cron.log and /home/Administrator/cron.log are both empty, so we didn't attach them.

[-- Attachment #1.1.2: cron-config-session.txt --]
[-- Type: text/plain, Size: 2508 bytes --]

$ cron-config
The cron daemon can run as a service or as a job. The latter is not recommended.
Cron is already installed as a service under account .\cyg_server.
Do you want to remove or reinstall it? (yes/no) yes
OK. The cron service was removed.

Do you want to install the cron daemon as a service? (yes/no) yes
Enter the value of CYGWIN for the daemon: [ ] binmode ntsec

You must decide under what account the cron daemon will run.
If you are the only user on this machine, the daemon can run as yourself.
   This gives access to all network drives but only allows you as user.
To run multiple users, cron must change user context without knowing
  the passwords. There are three methods to do that, as explained in
  http://cygwin.com/cygwin-ug-net/ntsec.html#ntsec-nopasswd1
If all the cron users have executed "passwd -R" (see man passwd),
  which provides access to network drives, or if you are using the
  cyglsa package, then cron should run under the local system account.
Otherwise you need to have or to create a privileged account.
  This script will help you do so.
Do you want the cron daemon to run as yourself? (yes/no) no

Were the passwords of all cron users saved with "passwd -R", or
are you using the cyglsa package ? (yes/no) no

Finding or creating a privileged user.
The following accounts were found: 'cyg_server' .
This script plans to use account cyg_server.
Do you want to use another privileged account name? (yes/no) no

Account cyg_server already exists. Checking its privileges.
INFO: cyg_server is a valid privileged account.
INFO: The cygwin user name for account cyg_server is cyg_server.

Please enter the password for user 'cyg_server':
Reenter:
Running cron_diagnose ...
... no problem found.

Do you want to start the cron daemon as a service now? (yes/no) yes
OK. The cron daemon is now running.

In case of problem, examine the log file for cron,
/var/log/cron.log, and the Windows event log (using /usr/bin/cronevents)
for information about the problem cron is having.

Examine also any cron.log file in the HOME directory
(or the file specified in MAILTO) and cron related files in /tmp.

If you cannot fix the problem, then report it to cygwin@cygwin.com.
Please run the script /usr/bin/cronbug and ATTACH its output
(the file cronbug.txt) to your e-mail.

WARNING: PATH may be set differently under cron than in interactive shells.
         Names such as "find" and "date" may refer to Windows programs.

[-- Attachment #1.1.3: cronevents.txt --]
[-- Type: text/plain, Size: 409 bytes --]

2021/04/27 11:57:23 [cyg_server] /usr/sbin/cron: PID 2764: (CRON) STARTUP (V5.0)
2021/04/27 11:57:24 [cyg_server] cron: PID 2763: `cron' service started
2021/04/27 11:58:01 [cyg_server] /usr/sbin/cron: PID 2769: (Administrator) CMD ((cd /cygdrive/c/Daten/websites; MAILTO="" bin/syncwebsites-cronjob.sh))
2021/04/27 11:58:01 [cyg_server] /usr/sbin/cron: PID 2769: (CRON) error (can't switch user context)

[-- Attachment #1.1.4: cronbug.txt --]
[-- Type: text/plain, Size: 35770 bytes --]


Current version
-rwxr-xr-x 1 Administrator None 5304 Feb 16  2010 /usr/share/doc/Cygwin/cron-4.1-65.README

Running crons:
     2764    2763    2764       1548  ?         197626 11:57:23 /usr/sbin/cron

Sendmail:
lrwxrwxrwx 1 Administrator None 16 Apr 27 08:50 /usr/sbin/sendmail -> /usr/bin/cronlog

Crontabs:
-rw-r----- 1 Administrator Administrators 295 Apr 27 11:50 /var/cron/tabs/Administrator
-rw-r----- 1 197108 544 295 Apr 27 11:50 /var/cron/tabs/Administrator

cron.log:
-rw-r--r-- 1 cyg_server None 0 Apr 27 11:57 /var/log/cron.log

cron.pid:
-rw-r--r-- 1 cyg_server None 5 Apr 27 11:57 /var/run/cron.pid

Crontab:
# DO NOT EDIT THIS FILE - edit the master and reinstall.
# (/tmp/crontab.11KWIqIGLk installed on Tue Apr 27 11:50:16 2021)
# (Cron version V5.0 -- $Id: crontab.c,v 1.12 2004/01/23 18:56:42 vixie Exp $)
   * *  *   *   *    (cd /cygdrive/c/Daten/websites; MAILTO="" bin/syncwebsites-cronjob.sh)


Windows Application Events log:
2021/04/27 08:51:05 [Administrator] crontab: PID 1357: (Administrator) BEGIN EDIT (Administrator)
2021/04/27 08:51:12 [Administrator] crontab: PID 1357: (Administrator) END EDIT (Administrator)
2021/04/27 08:52:02 [Administrator] crontab: PID 1359: (Administrator) BEGIN EDIT (Administrator)
2021/04/27 08:52:27 [Administrator] crontab: PID 1359: (Administrator) END EDIT (Administrator)
2021/04/27 08:52:29 [Administrator] crontab: PID 1361: (Administrator) BEGIN EDIT (Administrator)
2021/04/27 08:52:43 [Administrator] crontab: PID 1361: (Administrator) REPLACE (Administrator)
2021/04/27 08:52:43 [Administrator] crontab: PID 1361: (Administrator) END EDIT (Administrator)
2021/04/27 08:53:34 [Administrator] crontab: PID 1367: (Administrator) BEGIN EDIT (Administrator)
2021/04/27 08:53:57 [Administrator] crontab: PID 1367: (Administrator) END EDIT (Administrator)
2021/04/27 08:53:58 [Administrator] crontab: PID 1369: (Administrator) BEGIN EDIT (Administrator)
2021/04/27 08:54:16 [Administrator] crontab: PID 1369: (Administrator) REPLACE (Administrator)
2021/04/27 08:54:16 [Administrator] crontab: PID 1369: (Administrator) END EDIT (Administrator)
2021/04/27 09:00:26 [Administrator] crontab: PID 1379: (Administrator) BEGIN EDIT (Administrator)
2021/04/27 09:00:42 [Administrator] crontab: PID 1379: (Administrator) END EDIT (Administrator)
2021/04/27 09:00:45 [Administrator] crontab: PID 1381: (Administrator) BEGIN EDIT (Administrator)
2021/04/27 09:01:04 [Administrator] crontab: PID 1381: (Administrator) END EDIT (Administrator)
2021/04/27 09:03:21 [SYSTEM] /usr/sbin/cron: PID 1388: (CRON) STARTUP (V5.0)
2021/04/27 09:04:01 [SYSTEM] /usr/sbin/cron: PID 1390: (Administrator) CMD ((cd /cygdrive/c/daten/websites; MAILTO="" bin/syncwebsites-cronjob.sh))
2021/04/27 09:04:49 [Administrator] /usr/sbin/cron: PID 1409: (CRON) DEATH (can't lock /var/run/cron.pid, otherpid may be 1388: Resource temporarily unavailable)
2021/04/27 09:06:35 [Administrator] /usr/sbin/cron: PID 1415: (CRON) STARTUP (V5.0)
2021/04/27 09:09:39 [Administrator] /usr/sbin/cron: PID 1418: (CRON) DEATH (can't lock /var/run/cron.pid, otherpid may be 1415: Resource temporarily unavailable)
2021/04/27 09:10:00 [Administrator] /usr/sbin/cron: PID 1421: (CRON) STARTUP (V5.0)
2021/04/27 09:20:34 [Administrator] /usr/sbin/cron: PID 1466: (CRON) STARTUP (V5.0)
2021/04/27 09:20:35 [Administrator] cron: PID 1464: `cron' service stopped, exit status: 0
2021/04/27 09:22:03 [Administrator] /usr/sbin/cron: PID 1472: (CRON) DEATH (can't lock /var/run/cron.pid, otherpid may be 1466: Resource temporarily unavailable)
2021/04/27 09:22:04 [Administrator] cron: PID 1471: `cron' service stopped, exit status: 1
2021/04/27 09:37:36 [cyg_server] /usr/sbin/cron: PID 1593: (CRON) STARTUP (V5.0)
2021/04/27 09:37:37 [cyg_server] cron: PID 1592: `cron' service started
2021/04/27 09:41:54 [cyg_server] cron: PID 1592: `cron' service stopped, exit status: 0
2021/04/27 09:41:55 [cyg_server] /usr/sbin/cron: PID 1598: (CRON) STARTUP (V5.0)
2021/04/27 09:41:56 [cyg_server] cron: PID 1597: `cron' service started
2021/04/27 10:16:08 [cyg_server] cron: PID 1597: `cron' service stopped, exit status: 0
2021/04/27 10:16:20 [cyg_server] /usr/sbin/cron: PID 2204: (CRON) STARTUP (V5.0)
2021/04/27 10:16:21 [cyg_server] cron: PID 2203: `cron' service started
2021/04/27 11:06:47 [cyg_server] cron: PID 2203: `cron' service stopped, exit status: 0
2021/04/27 11:06:49 [cyg_server] /usr/sbin/cron: PID 2463: (CRON) STARTUP (V5.0)
2021/04/27 11:06:50 [cyg_server] cron: PID 2462: `cron' service started
2021/04/27 11:08:01 [cyg_server] /usr/sbin/cron: PID 2465: (Administrator) CMD ((cd /cygdrive/c/Daten/websites; MAILTO="" bin/syncwebsites-cronjob.sh))
2021/04/27 11:08:01 [cyg_server] /usr/sbin/cron: PID 2465: (CRON) error (can't switch user context)
2021/04/27 11:47:36 [cyg_server] cron: PID 2462: `cron' service stopped, exit status: 0
2021/04/27 11:49:33 [cyg_server] /usr/sbin/cron: PID 2581: (CRON) STARTUP (V5.0)
2021/04/27 11:49:34 [cyg_server] cron: PID 2580: `cron' service started
2021/04/27 11:50:00 [Administrator] crontab: PID 2583: (Administrator) BEGIN EDIT (Administrator)
2021/04/27 11:50:16 [Administrator] crontab: PID 2583: (Administrator) REPLACE (Administrator)
2021/04/27 11:50:16 [Administrator] crontab: PID 2583: (Administrator) END EDIT (Administrator)
2021/04/27 11:51:01 [cyg_server] /usr/sbin/cron: PID 2581: (Administrator) RELOAD (tabs/Administrator)
2021/04/27 11:52:01 [cyg_server] /usr/sbin/cron: PID 2596: (Administrator) CMD ((cd /cygdrive/c/Daten/websites; MAILTO="" bin/syncwebsites-cronjob.sh))
2021/04/27 11:52:01 [cyg_server] /usr/sbin/cron: PID 2596: (CRON) error (can't switch user context)
2021/04/27 11:52:18 [cyg_server] cron: PID 2580: `cron' service stopped, exit status: 0
2021/04/27 11:53:23 [cyg_server] /usr/sbin/cron: PID 2675: (CRON) STARTUP (V5.0)
2021/04/27 11:53:24 [cyg_server] cron: PID 2674: `cron' service started
2021/04/27 11:54:01 [cyg_server] /usr/sbin/cron: PID 2680: (Administrator) CMD ((cd /cygdrive/c/Daten/websites; MAILTO="" bin/syncwebsites-cronjob.sh))
2021/04/27 11:54:01 [cyg_server] /usr/sbin/cron: PID 2680: (CRON) error (can't switch user context)
2021/04/27 11:55:01 [cyg_server] /usr/sbin/cron: PID 2684: (Administrator) CMD ((cd /cygdrive/c/Daten/websites; MAILTO="" bin/syncwebsites-cronjob.sh))
2021/04/27 11:55:01 [cyg_server] /usr/sbin/cron: PID 2684: (CRON) error (can't switch user context)
2021/04/27 11:56:01 [cyg_server] /usr/sbin/cron: PID 2687: (Administrator) CMD ((cd /cygdrive/c/Daten/websites; MAILTO="" bin/syncwebsites-cronjob.sh))
2021/04/27 11:56:01 [cyg_server] /usr/sbin/cron: PID 2687: (CRON) error (can't switch user context)
2021/04/27 11:56:26 [cyg_server] cron: PID 2674: `cron' service stopped, exit status: 0
2021/04/27 11:57:23 [cyg_server] /usr/sbin/cron: PID 2764: (CRON) STARTUP (V5.0)
2021/04/27 11:57:24 [cyg_server] cron: PID 2763: `cron' service started
2021/04/27 11:58:01 [cyg_server] /usr/sbin/cron: PID 2769: (Administrator) CMD ((cd /cygdrive/c/Daten/websites; MAILTO="" bin/syncwebsites-cronjob.sh))
2021/04/27 11:58:01 [cyg_server] /usr/sbin/cron: PID 2769: (CRON) error (can't switch user context)
2021/04/27 11:59:01 [cyg_server] /usr/sbin/cron: PID 2772: (Administrator) CMD ((cd /cygdrive/c/Daten/websites; MAILTO="" bin/syncwebsites-cronjob.sh))
2021/04/27 11:59:01 [cyg_server] /usr/sbin/cron: PID 2772: (CRON) error (can't switch user context)
2021/04/27 12:00:01 [cyg_server] /usr/sbin/cron: PID 2774: (Administrator) CMD ((cd /cygdrive/c/Daten/websites; MAILTO="" bin/syncwebsites-cronjob.sh))
2021/04/27 12:00:01 [cyg_server] /usr/sbin/cron: PID 2774: (CRON) error (can't switch user context)
2021/04/27 12:01:01 [cyg_server] /usr/sbin/cron: PID 2776: (Administrator) CMD ((cd /cygdrive/c/Daten/websites; MAILTO="" bin/syncwebsites-cronjob.sh))
2021/04/27 12:01:01 [cyg_server] /usr/sbin/cron: PID 2776: (CRON) error (can't switch user context)
2021/04/27 12:02:01 [cyg_server] /usr/sbin/cron: PID 2778: (Administrator) CMD ((cd /cygdrive/c/Daten/websites; MAILTO="" bin/syncwebsites-cronjob.sh))
2021/04/27 12:02:01 [cyg_server] /usr/sbin/cron: PID 2778: (CRON) error (can't switch user context)
2021/04/27 12:03:01 [cyg_server] /usr/sbin/cron: PID 2780: (Administrator) CMD ((cd /cygdrive/c/Daten/websites; MAILTO="" bin/syncwebsites-cronjob.sh))
2021/04/27 12:03:01 [cyg_server] /usr/sbin/cron: PID 2780: (CRON) error (can't switch user context)
2021/04/27 12:04:01 [cyg_server] /usr/sbin/cron: PID 2782: (Administrator) CMD ((cd /cygdrive/c/Daten/websites; MAILTO="" bin/syncwebsites-cronjob.sh))
2021/04/27 12:04:01 [cyg_server] /usr/sbin/cron: PID 2782: (CRON) error (can't switch user context)
2021/04/27 12:05:01 [cyg_server] /usr/sbin/cron: PID 2784: (Administrator) CMD ((cd /cygdrive/c/Daten/websites; MAILTO="" bin/syncwebsites-cronjob.sh))
2021/04/27 12:05:01 [cyg_server] /usr/sbin/cron: PID 2784: (CRON) error (can't switch user context)
2021/04/27 12:06:01 [cyg_server] /usr/sbin/cron: PID 2786: (Administrator) CMD ((cd /cygdrive/c/Daten/websites; MAILTO="" bin/syncwebsites-cronjob.sh))
2021/04/27 12:06:01 [cyg_server] /usr/sbin/cron: PID 2786: (CRON) error (can't switch user context)
2021/04/27 12:07:01 [cyg_server] /usr/sbin/cron: PID 2788: (Administrator) CMD ((cd /cygdrive/c/Daten/websites; MAILTO="" bin/syncwebsites-cronjob.sh))
2021/04/27 12:07:01 [cyg_server] /usr/sbin/cron: PID 2788: (CRON) error (can't switch user context)
2021/04/27 12:08:01 [cyg_server] /usr/sbin/cron: PID 2790: (Administrator) CMD ((cd /cygdrive/c/Daten/websites; MAILTO="" bin/syncwebsites-cronjob.sh))
2021/04/27 12:08:01 [cyg_server] /usr/sbin/cron: PID 2790: (CRON) error (can't switch user context)
2021/04/27 12:09:01 [cyg_server] /usr/sbin/cron: PID 2792: (Administrator) CMD ((cd /cygdrive/c/Daten/websites; MAILTO="" bin/syncwebsites-cronjob.sh))
2021/04/27 12:09:01 [cyg_server] /usr/sbin/cron: PID 2792: (CRON) error (can't switch user context)
2021/04/27 12:10:01 [cyg_server] /usr/sbin/cron: PID 2794: (Administrator) CMD ((cd /cygdrive/c/Daten/websites; MAILTO="" bin/syncwebsites-cronjob.sh))
2021/04/27 12:10:01 [cyg_server] /usr/sbin/cron: PID 2794: (CRON) error (can't switch user context)
2021/04/27 12:11:01 [cyg_server] /usr/sbin/cron: PID 2796: (Administrator) CMD ((cd /cygdrive/c/Daten/websites; MAILTO="" bin/syncwebsites-cronjob.sh))
2021/04/27 12:11:01 [cyg_server] /usr/sbin/cron: PID 2796: (CRON) error (can't switch user context)
2021/04/27 12:12:01 [cyg_server] /usr/sbin/cron: PID 2798: (Administrator) CMD ((cd /cygdrive/c/Daten/websites; MAILTO="" bin/syncwebsites-cronjob.sh))
2021/04/27 12:12:01 [cyg_server] /usr/sbin/cron: PID 2798: (CRON) error (can't switch user context)
2021/04/27 12:13:01 [cyg_server] /usr/sbin/cron: PID 2800: (Administrator) CMD ((cd /cygdrive/c/Daten/websites; MAILTO="" bin/syncwebsites-cronjob.sh))
2021/04/27 12:13:01 [cyg_server] /usr/sbin/cron: PID 2800: (CRON) error (can't switch user context)
2021/04/27 12:14:01 [cyg_server] /usr/sbin/cron: PID 2802: (Administrator) CMD ((cd /cygdrive/c/Daten/websites; MAILTO="" bin/syncwebsites-cronjob.sh))
2021/04/27 12:14:01 [cyg_server] /usr/sbin/cron: PID 2802: (CRON) error (can't switch user context)
2021/04/27 12:15:01 [cyg_server] /usr/sbin/cron: PID 2804: (Administrator) CMD ((cd /cygdrive/c/Daten/websites; MAILTO="" bin/syncwebsites-cronjob.sh))
2021/04/27 12:15:01 [cyg_server] /usr/sbin/cron: PID 2804: (CRON) error (can't switch user context)
2021/04/27 12:16:01 [cyg_server] /usr/sbin/cron: PID 2806: (Administrator) CMD ((cd /cygdrive/c/Daten/websites; MAILTO="" bin/syncwebsites-cronjob.sh))
2021/04/27 12:16:01 [cyg_server] /usr/sbin/cron: PID 2806: (CRON) error (can't switch user context)
2021/04/27 12:17:01 [cyg_server] /usr/sbin/cron: PID 2808: (Administrator) CMD ((cd /cygdrive/c/Daten/websites; MAILTO="" bin/syncwebsites-cronjob.sh))
2021/04/27 12:17:01 [cyg_server] /usr/sbin/cron: PID 2808: (CRON) error (can't switch user context)
2021/04/27 12:18:01 [cyg_server] /usr/sbin/cron: PID 2810: (Administrator) CMD ((cd /cygdrive/c/Daten/websites; MAILTO="" bin/syncwebsites-cronjob.sh))
2021/04/27 12:18:01 [cyg_server] /usr/sbin/cron: PID 2810: (CRON) error (can't switch user context)
2021/04/27 12:19:01 [cyg_server] /usr/sbin/cron: PID 2812: (Administrator) CMD ((cd /cygdrive/c/Daten/websites; MAILTO="" bin/syncwebsites-cronjob.sh))
2021/04/27 12:19:01 [cyg_server] /usr/sbin/cron: PID 2812: (CRON) error (can't switch user context)
2021/04/27 12:20:01 [cyg_server] /usr/sbin/cron: PID 2814: (Administrator) CMD ((cd /cygdrive/c/Daten/websites; MAILTO="" bin/syncwebsites-cronjob.sh))
2021/04/27 12:20:01 [cyg_server] /usr/sbin/cron: PID 2814: (CRON) error (can't switch user context)
2021/04/27 12:21:01 [cyg_server] /usr/sbin/cron: PID 2816: (Administrator) CMD ((cd /cygdrive/c/Daten/websites; MAILTO="" bin/syncwebsites-cronjob.sh))
2021/04/27 12:21:01 [cyg_server] /usr/sbin/cron: PID 2816: (CRON) error (can't switch user context)
2021/04/27 12:22:01 [cyg_server] /usr/sbin/cron: PID 2818: (Administrator) CMD ((cd /cygdrive/c/Daten/websites; MAILTO="" bin/syncwebsites-cronjob.sh))
2021/04/27 12:22:01 [cyg_server] /usr/sbin/cron: PID 2818: (CRON) error (can't switch user context)
2021/04/27 12:23:01 [cyg_server] /usr/sbin/cron: PID 2820: (Administrator) CMD ((cd /cygdrive/c/Daten/websites; MAILTO="" bin/syncwebsites-cronjob.sh))
2021/04/27 12:23:01 [cyg_server] /usr/sbin/cron: PID 2820: (CRON) error (can't switch user context)
2021/04/27 12:24:01 [cyg_server] /usr/sbin/cron: PID 2823: (Administrator) CMD ((cd /cygdrive/c/Daten/websites; MAILTO="" bin/syncwebsites-cronjob.sh))
2021/04/27 12:24:01 [cyg_server] /usr/sbin/cron: PID 2823: (CRON) error (can't switch user context)
2021/04/27 12:25:01 [cyg_server] /usr/sbin/cron: PID 2826: (Administrator) CMD ((cd /cygdrive/c/Daten/websites; MAILTO="" bin/syncwebsites-cronjob.sh))
2021/04/27 12:25:01 [cyg_server] /usr/sbin/cron: PID 2826: (CRON) error (can't switch user context)
2021/04/27 12:26:01 [cyg_server] /usr/sbin/cron: PID 2829: (Administrator) CMD ((cd /cygdrive/c/Daten/websites; MAILTO="" bin/syncwebsites-cronjob.sh))
2021/04/27 12:26:01 [cyg_server] /usr/sbin/cron: PID 2829: (CRON) error (can't switch user context)
2021/04/27 12:26:44 [Administrator] crontab: PID 2839: (Administrator) LIST (Administrator)

Cygcheck:

Cygwin Configuration Diagnostics
Current System Time: Tue Apr 27 11:26:44 2021

Windows 2016 Server Standard Ver 10.0 Build 17763 

Running in Terminal Service session

Path:	C:\cygwin64\usr\local\bin
	C:\cygwin64\bin
	C:\Windows\system32
	C:\Windows
	C:\Windows\System32\Wbem
	C:\Windows\System32\WindowsPowerShell\v1.0
	C:\Windows\System32\OpenSSH
	C:\Users\Administrator\AppData\Local\Microsoft\WindowsApps

Output from C:\cygwin64\bin\id.exe
UID: 197108(Administrator)
GID: 197121(None)
197121(None)
114(Local account and member of Administrators group)
544(Administrators)
545(Users)
14(REMOTE INTERACTIVE LOGON)
4(INTERACTIVE)
11(Authenticated Users)
15(This Organization)
113(Local account)
4095(CurrentSession)
66048(LOCAL)
262154(NTLM Authentication)
405504(High Mandatory Level)

SysDir: C:\Windows\system32
WinDir: C:\Windows

USER = 'Administrator'
PWD = '/cygdrive/c/daten/websites'
HOME = '/home/Administrator'
CYGWIN = 'ntsec'

USERDOMAIN = 'SERVER'
OS = 'Windows_NT'
COMMONPROGRAMFILES = 'C:\Program Files\Common Files'
PROCESSOR_LEVEL = '6'
PSModulePath = 'C:\Program Files\WindowsPowerShell\Modules;C:\Windows\system32\WindowsPowerShell\v1.0\Modules'
CommonProgramW6432 = 'C:\Program Files\Common Files'
CommonProgramFiles(x86) = 'C:\Program Files (x86)\Common Files'
TZ = 'Europe/Berlin'
HOSTNAME = 'Server'
PUBLIC = 'C:\Users\Public'
OLDPWD = '/home/Administrator'
EDITOR = 'nano'
USERNAME = 'Administrator'
LOGONSERVER = '\\SERVER'
PROCESSOR_ARCHITECTURE = 'AMD64'
CLIENTNAME = 'ODO'
LOCALAPPDATA = 'C:\Users\Administrator\AppData\Local'
COMPUTERNAME = 'SERVER'
SYSTEMDRIVE = 'C:'
USERPROFILE = 'C:\Users\Administrator'
PATHEXT = '.COM;.EXE;.BAT;.CMD;.VBS;.VBE;.JS;.JSE;.WSF;.WSH;.MSC'
SYSTEMROOT = 'C:\Windows'
USERDOMAIN_ROAMINGPROFILE = 'SERVER'
PROCESSOR_IDENTIFIER = 'Intel64 Family 6 Model 63 Stepping 2, GenuineIntel'
TMP = '/tmp'
LC_CTYPE = 'en_US.UTF-8'
TERM_PROGRAM = 'mintty'
TERM_PROGRAM_VERSION = '3.5.0'
PROCESSOR_REVISION = '3f02'
PROFILEREAD = 'true'
NUMBER_OF_PROCESSORS = '8'
ProgramW6432 = 'C:\Program Files'
COMSPEC = 'C:\Windows\system32\cmd.exe'
APPDATA = 'C:\Users\Administrator\AppData\Roaming'
TERM = 'xterm'
SHELL = '/bin/bash'
WINDIR = 'C:\Windows'
ProgramData = 'C:\ProgramData'
SHLVL = '2'
MINTTY_SHORTCUT = '/cygdrive/c/Users/Public/Desktop/Cygwin64 Terminal.lnk'
PRINTER = 'Microsoft Print to PDF'
PROGRAMFILES = 'C:\Program Files'
ALLUSERSPROFILE = 'C:\ProgramData'
TEMP = '/tmp'
DriverData = 'C:\Windows\System32\Drivers\DriverData'
SESSIONNAME = 'RDP-Tcp#6'
ProgramFiles(x86) = 'C:\Program Files (x86)'
HOMEDRIVE = 'C:'
INFOPATH = '/usr/local/info:/usr/share/info:/usr/info'
HOMEPATH = '\Users\Administrator'
ORIGINAL_PATH = '/cygdrive/c/Windows/system32:/cygdrive/c/Windows:/cygdrive/c/Windows/System32/Wbem:/cygdrive/c/Windows/System32/WindowsPowerShell/v1.0:/cygdrive/c/Windows/System32/OpenSSH:/cygdrive/c/Users/Administrator/AppData/Local/Microsoft/WindowsApps'
EXECIGNORE = '*.dll'
_ = '/usr/bin/cygcheck'

HKEY_LOCAL_MACHINE\SOFTWARE\Cygwin
HKEY_LOCAL_MACHINE\SOFTWARE\Cygwin\Installations
  (default) = '\??\C:\cygwin64'
HKEY_LOCAL_MACHINE\SOFTWARE\Cygwin\setup
  (default) = 'C:\cygwin64'

obcaseinsensitive set to 1

Cygwin installations found in the registry:
  System: Key: e022582115c10879 Path: C:\cygwin64

c:  hd  NTFS   1572046Mb  63% CP CS UN PA FC    QU  
d:  cd             N/A    N/A                       

C:\cygwin64      /          system  binary,auto
C:\cygwin64\bin  /usr/bin   system  binary,auto
C:\cygwin64\lib  /usr/lib   system  binary,auto
cygdrive prefix  /cygdrive  user    binary,posix=0,auto

Found: C:\cygwin64\bin\awk
 -> C:\cygwin64\bin\gawk.exe
Found: C:\cygwin64\bin\bash.exe
Found: C:\cygwin64\bin\cat.exe
Found: C:\Windows\system32\certutil.exe
Not Found: clinfo
Found: C:\Windows\system32\comp.exe
Found: C:\Windows\system32\convert.exe
Found: C:\cygwin64\bin\cp.exe
Not Found: cpp (good!)
Found: C:\cygwin64\bin\crontab.exe
Found: C:\Windows\system32\curl.exe
Found: C:\cygwin64\bin\expand.exe
Found: C:\Windows\system32\expand.exe
Warning: C:\cygwin64\bin\expand.exe hides C:\Windows\system32\expand.exe
Found: C:\cygwin64\bin\find.exe
Found: C:\Windows\system32\find.exe
Warning: C:\cygwin64\bin\find.exe hides C:\Windows\system32\find.exe
Found: C:\Windows\system32\ftp.exe
Not Found: gcc
Not Found: gdb
Found: C:\cygwin64\bin\grep.exe
Found: C:\cygwin64\bin\hostname.exe
Found: C:\Windows\system32\hostname.exe
Warning: C:\cygwin64\bin\hostname.exe hides C:\Windows\system32\hostname.exe
Found: C:\cygwin64\bin\kill.exe
Found: C:\Windows\system32\klist.exe
Not Found: ld
Found: C:\cygwin64\bin\ls.exe
Found: C:\cygwin64\bin\make.exe
Found: C:\cygwin64\bin\mv.exe
Found: C:\Windows\system32\nslookup.exe
Not Found: patch
Not Found: perl
Found: C:\Windows\system32\replace.exe
Found: C:\cygwin64\bin\rm.exe
Found: C:\cygwin64\bin\sed.exe
Found: C:\cygwin64\bin\sh.exe
Found: C:\Windows\system32\shutdown.exe
Found: C:\cygwin64\bin\sort.exe
Found: C:\Windows\system32\sort.exe
Warning: C:\cygwin64\bin\sort.exe hides C:\Windows\system32\sort.exe
Found: C:\cygwin64\bin\ssh.exe
Found: C:\Windows\System32\OpenSSH\ssh.exe
Warning: C:\cygwin64\bin\ssh.exe hides C:\Windows\System32\OpenSSH\ssh.exe
Found: C:\cygwin64\bin\tar.exe
Found: C:\Windows\system32\tar.exe
Warning: C:\cygwin64\bin\tar.exe hides C:\Windows\system32\tar.exe
Found: C:\cygwin64\bin\test.exe
Found: C:\cygwin64\bin\timeout.exe
Found: C:\Windows\system32\timeout.exe
Warning: C:\cygwin64\bin\timeout.exe hides C:\Windows\system32\timeout.exe
Found: C:\cygwin64\bin\vi.exe
Not Found: vim
Found: C:\cygwin64\bin\whoami.exe
Found: C:\Windows\system32\whoami.exe
Warning: C:\cygwin64\bin\whoami.exe hides C:\Windows\system32\whoami.exe

   39k 2016/09/19 C:\cygwin64\bin\cygargp-0.dll - os=4.0 img=0.0 sys=5.2
                  "cygargp-0.dll" v0.0 ts=2016-09-19 02:13
   19k 2018/12/20 C:\cygwin64\bin\cygattr-1.dll - os=4.0 img=0.0 sys=5.2
                  "cygattr-1.dll" v0.0 ts=2018-12-20 09:48
  254k 2020/03/31 C:\cygwin64\bin\cygblkid-1.dll - os=4.0 img=0.0 sys=5.2
                  "cygblkid-1.dll" v0.0 ts=2020-03-28 06:22
   66k 2019/07/21 C:\cygwin64\bin\cygbz2-1.dll - os=4.0 img=0.0 sys=5.2
                  "cygbz2-1.dll" v0.0 ts=2019-07-22 00:05
   42k 2020/02/17 C:\cygwin64\bin\cygcbor-0.dll - os=4.0 img=0.0 sys=5.2
                  "cygcbor-0.dll" v0.0 ts=2020-02-17 12:04
   13k 2019/01/02 C:\cygwin64\bin\cygcom_err-2.dll - os=4.0 img=0.0 sys=5.2
                  "cygcom_err-2.dll" v0.0 ts=2019-01-02 02:39
  194k 2019/04/03 C:\cygwin64\bin\cygcrypt-2.dll - os=4.0 img=0.0 sys=5.2
                  "cygcrypt-2.dll" v0.0 ts=2019-04-03 22:05
 2363k 2019/09/11 C:\cygwin64\bin\cygcrypto-1.0.0.dll - os=4.0 img=0.0 sys=5.2
                  "cygcrypto-1.0.0.dll" v0.0 ts=2019-09-11 18:40
 2451k 2020/04/08 C:\cygwin64\bin\cygcrypto-1.1.dll - os=4.0 img=0.0 sys=5.2
                  "cygcrypto-1.1.dll" v0.0 ts=2020-04-08 12:11
 1552k 2017/09/28 C:\cygwin64\bin\cygdb-5.3.dll - os=4.0 img=0.0 sys=5.2
                  "cygdb-5.3.dll" v0.0 ts=2017-09-28 20:05
  119k 2017/09/28 C:\cygwin64\bin\cygdb_cxx-5.3.dll - os=4.0 img=0.0 sys=5.2
                  "cygdb_cxx-5.3.dll" v0.0 ts=2017-09-28 20:06
  569k 2017/09/28 C:\cygwin64\bin\cygdb_sql-5.3.dll - os=4.0 img=0.0 sys=5.2
                  "cygdb_sql-5.3.dll" v0.0 ts=2017-09-28 20:06
  154k 2013/10/20 C:\cygwin64\bin\cygedit-0.dll - os=4.0 img=0.0 sys=5.2
                  "cygedit-0.dll" v0.0 ts=2013-10-20 21:56
  353k 2020/03/31 C:\cygwin64\bin\cygfdisk-1.dll - os=4.0 img=0.0 sys=5.2
                  "cygfdisk-1.dll" v0.0 ts=2020-03-28 06:23
   27k 2015/11/17 C:\cygwin64\bin\cygffi-6.dll - os=4.0 img=0.0 sys=5.2
                  "cygffi-6.dll" v0.0 ts=2015-11-17 22:14
  136k 2020/10/20 C:\cygwin64\bin\cygfido2-1.dll - os=4.0 img=1.5 sys=5.2
                  "cygfido2-1.dll" v0.0 ts=2020-10-20 19:25
   56k 2019/07/28 C:\cygwin64\bin\cygformw-10.dll - os=4.0 img=0.0 sys=5.2
                  "cygformw-10.dll" v0.0 ts=2019-07-28 17:33
  137k 2019/03/29 C:\cygwin64\bin\cyggc-1.dll - os=4.0 img=0.0 sys=5.2
                  "cyggc-1.dll" v0.0 ts=2019-03-29 22:16
   72k 2020/09/12 C:\cygwin64\bin\cyggcc_s-seh-1.dll - os=4.0 img=0.0 sys=5.2
                  "cyggcc_s-seh-1.dll" v0.0 ts=2020-09-12 14:20
   49k 2019/07/10 C:\cygwin64\bin\cyggdbm-6.dll - os=4.0 img=0.0 sys=5.2
                  "cyggdbm-6.dll" v0.0 ts=2019-07-10 14:53
  580k 2020/11/16 C:\cygwin64\bin\cyggmp-10.dll - os=4.0 img=0.0 sys=5.2
                  "cyggmp-10.dll" v0.0 ts=2020-11-16 18:53
  274k 2018/03/16 C:\cygwin64\bin\cyggssapi_krb5-2.dll - os=4.0 img=0.0 sys=5.2
                  "cyggssapi_krb5-2.dll" v0.0 ts=2018-03-16 03:38
 1070k 2020/03/13 C:\cygwin64\bin\cygguile-2.2-1.dll - os=4.0 img=0.0 sys=5.2
                  "cygguile-2.2-1.dll" v0.0 ts=2020-03-08 21:47
   33k 2017/02/13 C:\cygwin64\bin\cyghistory7.dll - os=4.0 img=0.0 sys=5.2
                  "cyghistory7.dll" v0.0 ts=2017-02-11 22:39
 1007k 2020/07/13 C:\cygwin64\bin\cygiconv-2.dll - os=4.0 img=0.0 sys=5.2
                  "cygiconv-2.dll" v0.0 ts=2020-07-13 13:57
   42k 2016/10/23 C:\cygwin64\bin\cygintl-8.dll - os=4.0 img=0.0 sys=5.2
                  "cygintl-8.dll" v0.0 ts=2016-10-23 07:17
  192k 2018/03/16 C:\cygwin64\bin\cygk5crypto-3.dll - os=4.0 img=0.0 sys=5.2
                  "cygk5crypto-3.dll" v0.0 ts=2018-03-16 03:37
  754k 2018/03/16 C:\cygwin64\bin\cygkrb5-3.dll - os=4.0 img=0.0 sys=5.2
                  "cygkrb5-3.dll" v0.0 ts=2018-03-16 03:37
   37k 2018/03/16 C:\cygwin64\bin\cygkrb5support-0.dll - os=4.0 img=0.0 sys=5.2
                  "cygkrb5support-0.dll" v0.0 ts=2018-03-16 03:36
   48k 2021/03/19 C:\cygwin64\bin\cyglber-2-4-2.dll - os=4.0 img=0.0 sys=5.2
                  "cyglber-2-4-2.dll" v0.0 ts=2021-03-19 23:02
  264k 2021/03/19 C:\cygwin64\bin\cygldap-2-4-2.dll - os=4.0 img=0.0 sys=5.2
                  "cygldap-2-4-2.dll" v0.0 ts=2021-03-19 23:04
  282k 2021/03/19 C:\cygwin64\bin\cygldap_r-2-4-2.dll - os=4.0 img=0.0 sys=5.2
                  "cygldap_r-2-4-2.dll" v0.0 ts=2021-03-19 23:07
   35k 2019/07/28 C:\cygwin64\bin\cygltdl-7.dll - os=4.0 img=0.0 sys=5.2
                  "cygltdl-7.dll" v0.0 ts=2019-07-28 17:44
   73k 2017/06/19 C:\cygwin64\bin\cyglz4-1.dll - os=4.0 img=0.0 sys=5.2
                  "cyglz4-1.dll" v0.0 ts=2017-06-19 15:40
  144k 2019/07/21 C:\cygwin64\bin\cyglzma-5.dll - os=4.0 img=0.0 sys=5.2
                  "cyglzma-5.dll" v0.0 ts=2019-07-22 00:15
  153k 2020/10/29 C:\cygwin64\bin\cygmagic-1.dll - os=4.0 img=0.0 sys=5.2
                  "cygmagic-1.dll" v0.0 ts=2020-10-29 21:32
  212k 2021/02/16 C:\cygwin64\bin\cygman-2-9-4.dll - os=4.0 img=0.0 sys=5.2
                  "cygman-2-9-4.dll" v0.0 ts=2021-02-16 17:36
   24k 2021/02/16 C:\cygwin64\bin\cygmandb-2-9-4.dll - os=4.0 img=0.0 sys=5.2
                  "cygmandb-2-9-4.dll" v0.0 ts=2021-02-16 17:36
   28k 2019/07/28 C:\cygwin64\bin\cygmenuw-10.dll - os=4.0 img=0.0 sys=5.2
                  "cygmenuw-10.dll" v0.0 ts=2019-07-28 17:32
 2664k 2020/07/11 C:\cygwin64\bin\cygmpfr-6.dll - os=4.0 img=0.0 sys=5.2
                  "cygmpfr-6.dll" v0.0 ts=2020-07-11 14:36
  301k 2019/07/28 C:\cygwin64\bin\cygncursesw-10.dll - os=4.0 img=0.0 sys=5.2
                  "cygncursesw-10.dll" v0.0 ts=2019-07-28 17:30
 1020k 2020/03/27 C:\cygwin64\bin\cygp11-kit-0.dll - os=4.0 img=0.0 sys=5.2
                  "cygp11-kit-0.dll" v0.0 ts=2020-03-27 22:30
   14k 2019/07/28 C:\cygwin64\bin\cygpanelw-10.dll - os=4.0 img=0.0 sys=5.2
                  "cygpanelw-10.dll" v0.0 ts=2019-07-28 17:32
  498k 2020/12/29 C:\cygwin64\bin\cygpcre-1.dll - os=4.0 img=0.0 sys=5.2
                  "cygpcre-1.dll" v0.0 ts=2020-12-29 17:11
   42k 2020/12/27 C:\cygwin64\bin\cygpipeline-1.dll - os=4.0 img=0.0 sys=5.2
                  "cygpipeline-1.dll" v0.0 ts=2020-12-27 14:15
   42k 2020/12/31 C:\cygwin64\bin\cygpopt-0.dll - os=4.0 img=0.0 sys=5.2
                  "cygpopt-0.dll" v0.0 ts=2020-12-31 12:16
   61k 2021/02/20 C:\cygwin64\bin\cygprocps-8.dll - os=4.0 img=0.0 sys=5.2
                  "cygprocps-8.dll" v0.0 ts=2021-02-20 20:02
  219k 2017/02/13 C:\cygwin64\bin\cygreadline7.dll - os=4.0 img=0.0 sys=5.2
                  "cygreadline7.dll" v0.0 ts=2017-02-11 22:39
   99k 2020/01/09 C:\cygwin64\bin\cygsasl2-3.dll - os=4.0 img=0.0 sys=5.2
                  "cygsasl2-3.dll" v0.0 ts=2020-01-09 02:13
   11k 2015/07/17 C:\cygwin64\bin\cygsigsegv-2.dll - os=4.0 img=0.0 sys=5.2
                  "cygsigsegv-2.dll" v0.0 ts=2015-07-17 22:35
  156k 2020/03/31 C:\cygwin64\bin\cygsmartcols-1.dll - os=4.0 img=0.0 sys=5.2
                  "cygsmartcols-1.dll" v0.0 ts=2020-03-28 06:22
  408k 2019/09/11 C:\cygwin64\bin\cygssl-1.0.0.dll - os=4.0 img=0.0 sys=5.2
                  "cygssl-1.0.0.dll" v0.0 ts=2019-09-11 18:40
  506k 2020/04/08 C:\cygwin64\bin\cygssl-1.1.dll - os=4.0 img=0.0 sys=5.2
                  "cygssl-1.1.dll" v0.0 ts=2020-04-08 12:12
 1676k 2020/09/12 C:\cygwin64\bin\cygstdc++-6.dll - os=4.0 img=0.0 sys=5.2
                  "cygstdc++-6.dll" v0.0 ts=2020-09-12 14:26
   68k 2019/07/29 C:\cygwin64\bin\cygtasn1-6.dll - os=4.0 img=0.0 sys=5.2
                  "cygtasn1-6.dll" v0.0 ts=2019-07-29 03:12
   57k 2019/07/28 C:\cygwin64\bin\cygticw-10.dll - os=4.0 img=0.0 sys=5.2
                  "cygticw-10.dll" v0.0 ts=2019-07-28 17:31
 1612k 2018/08/16 C:\cygwin64\bin\cygunistring-2.dll - os=4.0 img=0.0 sys=5.2
                  "cygunistring-2.dll" v0.0 ts=2018-08-16 20:33
   27k 2020/03/31 C:\cygwin64\bin\cyguuid-1.dll - os=4.0 img=0.0 sys=5.2
                  "cyguuid-1.dll" v0.0 ts=2020-03-28 06:22
   31k 2018/07/14 C:\cygwin64\bin\cygwrap-0.dll - os=4.0 img=0.0 sys=5.2
                  "cygwrap-0.dll" v0.0 ts=2018-07-14 11:43
   37k 2020/09/06 C:\cygwin64\bin\cygxxhash-0.dll - os=4.0 img=0.0 sys=5.2
                  "cygxxhash-0.dll" v0.0 ts=2020-09-07 00:04
   83k 2017/03/03 C:\cygwin64\bin\cygz.dll - os=4.0 img=0.0 sys=5.2
                  "cygz.dll" v0.0 ts=2017-03-03 21:42
  762k 2021/03/07 C:\cygwin64\bin\cygzstd-1.dll - os=4.0 img=0.0 sys=5.2
                  "cygzstd-1.dll" v0.0 ts=2021-03-07 07:49
 3533k 2021/03/29 C:\cygwin64\bin\cygwin1.dll - os=4.0 img=0.0 sys=5.2
                  "cygwin1.dll" v0.0 ts=2021-03-29 09:42
    Cygwin DLL version info:
        DLL version: 3.2.0
        DLL epoch: 19
        DLL old termios: 5
        DLL malloc env: 28
        Cygwin conv: 181
        API major: 0
        API minor: 340
        Shared data: 5
        DLL identifier: cygwin1
        Mount registry: 3
        Cygwin registry name: Cygwin
        Installations name: Installations
        Cygdrive default prefix: 
        Build date: 
        Shared id: cygwin1S5


Service             : cron                
Display name        : Cron daemon
Current State       : Running
Controls Accepted   : Stop
Command             : /usr/sbin/cron -n
stdin path          : /dev/null
stdout path         : /var/log/cron.log
stderr path         : /var/log/cron.log
Environment         : CYGWIN="binmode ntsec" TMP="/tmp" TEMP="/tmp" 
Process Type        : Own Process
Startup             : Automatic
Account             : .\cyg_server


Cygwin Package Information
Last downloaded files to: C:\cygwin64
Last downloaded files from: https://mirrors.kernel.org/sourceware/cygwin/

Package              Version                         Status
_autorebase          001007-1                        OK
alternatives         1.3.30c-10                      OK
base-cygwin          3.8-1                           OK
base-files           4.3-3                           OK
bash                 4.4.12-3                        OK
bzip2                1.0.8-1                         OK
ca-certificates      2.40-1                          OK
coreutils            8.26-2                          OK
cron                 4.1-65                          OK
crypto-policies      20190218-1                      OK
csih                 0.9.11-1                        OK
cygrunsrv            1.62-1                          OK
cygutils             1.4.16-2                        OK
cygwin               3.2.0-1                         OK
cyrus-sasl           2.1.27-1                        OK
dash                 0.5.9.1-1                       OK
diffutils            3.5-2                           OK
editrights           1.03-1                          OK
email                3.2.3-git-2                     OK
file                 5.39-1                          OK
findutils            4.6.0-1                         OK
gawk                 5.1.0-1                         OK
getent               2.18.90-4                       OK
grep                 3.0-2                           OK
groff                1.22.4-1                        OK
gzip                 1.8-1                           OK
hostname             3.13-1                          OK
info                 6.7-1                           OK
ipc-utils            1.0-2                           OK
less                 563-1                           OK
libargp              20110921-3                      OK
libattr1             2.4.48-2                        OK
libblkid1            2.33.1-2                        OK
libbz2_1             1.0.8-1                         OK
libcbor              0.5.0-1                         OK
libcom_err2          1.44.5-1                        OK
libcrypt2            4.4.4-1                         OK
libdb5.3             5.3.28-2                        OK
libedit0             20130712-1                      OK
libfdisk1            2.33.1-2                        OK
libffi6              3.2.1-2                         OK
libfido2             1.5.0-1                         OK
libgc1               8.0.4-1                         OK
libgcc1              10.2.0-1                        OK
libgdbm6             1.18.1-1                        OK
libgmp10             6.2.1-1                         OK
libgssapi_krb5_2     1.15.2-2                        OK
libguile2.2_1        2.2.7-1                         OK
libiconv2            1.16-2                          OK
libintl8             0.19.8.1-2                      OK
libk5crypto3         1.15.2-2                        OK
libkrb5_3            1.15.2-2                        OK
libkrb5support0      1.15.2-2                        OK
libltdl7             2.4.6-7                         OK
liblz4_1             1.7.5-1                         OK
liblzma5             5.2.4-1                         OK
libmpfr6             4.1.0-1                         OK
libncursesw10        6.1-1.20190727                  OK
libopenldap2_4_2     2.4.58-1                        OK
libp11-kit0          0.23.20-1                       OK
libpcre1             8.44-2                          OK
libpipeline1         1.5.3-1                         OK
libpopt-common       1.18-1                          OK
libpopt0             1.18-1                          OK
libprocps8           3.3.17-1                        OK
libreadline7         7.0.3-3                         OK
libsasl2_3           2.1.27-1                        OK
libsigsegv2          2.10-2                          OK
libsmartcols1        2.33.1-2                        OK
libssl1.0            1.0.2t-1                        OK
libssl1.1            1.1.1f-1                        OK
libstdc++6           10.2.0-1                        OK
libtasn1_6           4.14-1                          OK
libunistring2        0.9.10-1                        OK
libuuid1             2.33.1-2                        OK
libwrap0             7.6-26                          OK
libxxhash0           0.8.0-1                         OK
libzstd1             1.4.9-1                         OK
login                1.13-1                          OK
m4                   1.4.18-1                        OK
make                 4.3-1                           OK
man-db               2.9.4-1                         OK
mintty               3.5.0-1                         OK
nano                 4.9-1                           OK
ncurses              6.1-1.20190727                  OK
openssh              8.5p1-1                         OK
openssl              1.1.1f-1                        OK
p11-kit              0.23.20-1                       OK
p11-kit-trust        0.23.20-1                       OK
procmail             3.22-15                         OK
Empty package procps
procps               3.3.10-1                        OK
procps-ng            3.3.17-1                        OK
rebase               4.4.4-1                         OK
rsync                3.2.3+20200903+git9f9240b-4     OK
run                  1.3.4-2                         OK
sed                  4.4-1                           OK
tar                  1.34-1                          OK
tcp_wrappers         7.6-26                          OK
terminfo             6.1-1.20190727                  OK
terminfo-extra       6.1-1.20190727                  OK
tzcode               2021a-1                         OK
tzdata               2021a-1                         OK
util-linux           2.33.1-2                        OK
vim-minimal          8.2.0486-1                      OK
which                2.20-2                          OK
xz                   5.2.4-1                         OK
zlib0                1.2.11-1                        OK
zstd                 1.4.9-1                         OK
Use -h to see help about each section

[-- Attachment #1.1.5: OpenPGP public key --]
[-- Type: application/pgp-keys, Size: 3181 bytes --]

[-- Attachment #2: OpenPGP digital signature --]
[-- Type: application/pgp-signature, Size: 931 bytes --]

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

* Re: Cron can't switch user context
  2021-04-27 10:37 Cron can't switch user context Peter Pfannenschmid
@ 2021-04-28  0:14 ` Brian Inglis
  2021-04-28  4:32   ` Andrey Repin
  0 siblings, 1 reply; 9+ messages in thread
From: Brian Inglis @ 2021-04-28  0:14 UTC (permalink / raw)
  To: cygwin

On 2021-04-27 04:37, Peter Pfannenschmid wrote:
> However, today we have run into an issue with cron. Please see the attached logs 
> for details.
> 
> Additional notes:
> 
> - O/S is Windows Server 2019 Standard x64
> 
> - The cyg_server user has been created by cron-config, and we didn't change 
> anything in that user's configuration afterwards. However, we have verified that 
> this user has sufficient privileges (Replace a process level token, Log on as a 
> service, Create a token object, Be part of the Administrators group).
> 
> - We did some tests with cron-config. We always stopped the Cygwin Cron Service 
> before running cron-config. We always answered con-config's question the same, 
> except the question "Enter the value of CYGWIN for the daemon". We don't know 
> what this is about, so we first let it at the default value, just hitting Enter. 
> In the next try, we answered "netsec" and hit Enter (as found on stackoverflow). 
> In the third try, we answered "binmode netsec" and hit Enter (as found on the 
> Oracle website).
> 
> However, the behavior was the same regardless of what answer we had given there.
> 
> - Our goal is to run the Cygwin cron daemon as a Windows service, to have that 
> Windows service log on as "cyg_server" (not "Administrator" or "System), and to 
> let the cron daemon execute crontabs from different users (including the user 
> "Administrator").
> 
> The service is starting and reads Administrator's crontab, but when trying to 
> execute the entries, it can't do that and errors out with "(CRON) error (can't 
> switch user context)". We haven't installed crontabs for other users yet, 
> because the crontab of Administrator is the most important one, so we'd like to 
> concentrate on solving that problem first.
> 
> We are aware that there are many tutorials and Q&A on the net which deal with 
> exactly this subject. However, none of the proposed solutions worked for us.
> 
> We would be very glad if you could give us some hints how to solve the problem.

> P.S. Please note that /var/log/cron.log and /home/Administrator/cron.log are 
> both empty, so we didn't attach them.

I changed mine to run under LocalSystem account when system upgraded, had cyglsa 
installed previously (not used now I believe), and set passwd -R for account.
Don't forget to either set PATH to scripts in crontab or set for system before 
cygrunsrv starts cron as a Windows service.

Start by running a simple test script to create some date-time dependent 
variable file name at some minute so you can change that to get it run immediately.
It won't run again for an hour, which gives you time to tweak your setup, and 
change the crontab to run it the next minute.

-- 
Take care. Thanks, Brian Inglis, Calgary, Alberta, Canada

This email may be disturbing to some readers as it contains
too much technical detail. Reader discretion is advised.
[Data in binary units and prefixes, physical quantities in SI.]

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

* Re: Cron can't switch user context
  2021-04-28  0:14 ` Brian Inglis
@ 2021-04-28  4:32   ` Andrey Repin
  0 siblings, 0 replies; 9+ messages in thread
From: Andrey Repin @ 2021-04-28  4:32 UTC (permalink / raw)
  To: Brian Inglis, cygwin

Greetings, Brian Inglis!

>> We are aware that there are many tutorials and Q&A on the net which deal with
>> exactly this subject. However, none of the proposed solutions worked for us.

The one Q&A should have get you started: since Cygwin 3.1 (IIRC, may be
earlier), the core was changed to use LocalSystem account and some new(-ish)
facilities only available in Windows 7 and up to rebuild auth user token
without using CygLSA or what not.
This affecting SSHD, Cron and any other Cygwin daemon dealing with user
authorization.

>> We would be very glad if you could give us some hints how to solve the problem.

>> P.S. Please note that /var/log/cron.log and /home/Administrator/cron.log are 
>> both empty, so we didn't attach them.

> I changed mine to run under LocalSystem account when system upgraded, had cyglsa
> installed previously (not used now I believe), and set passwd -R for account.
> Don't forget to either set PATH to scripts in crontab or set for system before
> cygrunsrv starts cron as a Windows service.


-- 
With best regards,
Andrey Repin
Wednesday, April 28, 2021 7:28:14

Sorry for my terrible english...


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

* Re: cron: can't switch user context
  2003-09-10 16:12 ` cron: " Larry Hall
@ 2003-09-14 21:22   ` René Haber
  0 siblings, 0 replies; 9+ messages in thread
From: René Haber @ 2003-09-14 21:22 UTC (permalink / raw)
  To: cygwin

I already read the link and tried to create an account as Corinna 
suggested, but then cron doesn't start while creating this error in the 
syslog:

    CYGWIN crond : PID 3376 : starting service `CYGWIN crond' failed:
    execv: 1, Operation not permitted.

I also tried Mark's new cron-diagnose script, but it didn't find any errors.

Thanks.
René

Larry Hall wrote:
> Actually, I'd suggest googling, especially when you're asking if 
> the issue you're having is a known problem or if there are any 
> work-arounds.  In this case, you'd find all sort of references to
> Windows 2003 and services that need to be able to switch user contexts.
> 
> <http://www.cygwin.com/ml/cygwin/2003-07/msg00684.html>
> 
> This one talks about ssh but it's the same issue.  Follow the instructions
> there for creating a privileged user that you can run cron as and you 
> should have your solution.  It's easy to look for this sort of stuff.
> Try it.
> 
> I'd suggest you run Mark's script as well though and provide feedback.
> It would be good to know if it thinks there's anything else that might
> be wrong too.
> 
> Larry
> 




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

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

* RE: cron: can't switch user context
       [not found] <BADF3C947A1BD54FBA75C70C241B0B9E763574@ex02.co.idirect.net >
@ 2003-09-10 16:12 ` Larry Hall
  2003-09-14 21:22   ` René Haber
  0 siblings, 1 reply; 9+ messages in thread
From: Larry Hall @ 2003-09-10 16:12 UTC (permalink / raw)
  To: Harig, Mark, René Haber; +Cc: cygwin

Actually, I'd suggest googling, especially when you're asking if 
the issue you're having is a known problem or if there are any 
work-arounds.  In this case, you'd find all sort of references to
Windows 2003 and services that need to be able to switch user contexts.

<http://www.cygwin.com/ml/cygwin/2003-07/msg00684.html>

This one talks about ssh but it's the same issue.  Follow the instructions
there for creating a privileged user that you can run cron as and you 
should have your solution.  It's easy to look for this sort of stuff.
Try it.

I'd suggest you run Mark's script as well though and provide feedback.
It would be good to know if it thinks there's anything else that might
be wrong too.

Larry

At 11:57 AM 9/10/2003, Harig, Mark you wrote:
>I cannot see the source of your problem from
>the cygcheck listing.  However, you are 
>running a Windows .NET server.  I do not know
>what effect that might have on cron.
>
>Please run the attached cron_diagnose.sh
>script.  It is the latest version.  I would
>like for you to eliminate the possibility
>that you ran an earlier version.
>
>> -----Original Message-----
>> From: René Haber [mailto:rene.haber@gmx.de]
>> Sent: Sunday, September 07, 2003 1:06 PM
>> To: cygwin@cygwin.com
>> Subject: cron: can't switch user context
>> 
>> 
>> Hello
>> 
>> I've got Cygwin runnig on Windows 2003 and wanted to use the cron
>> daemon. I installed it via
>> 
>>    cygrunsrv -I "CYGWIN crond" -p /usr/sbin/cron.exe -a -D
>> 
>> as a NT-Service. Then I added a cronjob via "crontab -e" (I was logged
>> in as Administrator)
>> 
>>    5 * * * * echo "test" > test.txt
>> 
>> after that, I started the cron-service and waited for the test-job to
>> complete. But instead of doing the job cron complaind in the Syslog
>> about
>> 
>>      Ereignisinformationen: /USR/SBIN/CRON : PID 228 : (CRON) 
>> error (can't switch user context).
>> 
>> I checked my install via a shellscript (cron_diagnose.sh) I found in
>> the Mailing-List Archiv, but it didn't find a problem.
>> 
>> Is there a solution to this Problem or a work-around?
>> 
>> Thanks.
>> 
>> René Haber
>> 
>
>--
>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/ 


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

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

* RE: cron: can't switch user context
@ 2003-09-10 15:57 Harig, Mark
  0 siblings, 0 replies; 9+ messages in thread
From: Harig, Mark @ 2003-09-10 15:57 UTC (permalink / raw)
  To: René Haber; +Cc: cygwin

[-- Attachment #1: Type: text/plain, Size: 1359 bytes --]

I cannot see the source of your problem from
the cygcheck listing.  However, you are 
running a Windows .NET server.  I do not know
what effect that might have on cron.

Please run the attached cron_diagnose.sh
script.  It is the latest version.  I would
like for you to eliminate the possibility
that you ran an earlier version.

> -----Original Message-----
> From: René Haber [mailto:rene.haber@gmx.de]
> Sent: Sunday, September 07, 2003 1:06 PM
> To: cygwin@cygwin.com
> Subject: cron: can't switch user context
> 
> 
> Hello
> 
> I've got Cygwin runnig on Windows 2003 and wanted to use the cron
> daemon. I installed it via
> 
>    cygrunsrv -I "CYGWIN crond" -p /usr/sbin/cron.exe -a -D
> 
> as a NT-Service. Then I added a cronjob via "crontab -e" (I was logged
> in as Administrator)
> 
>    5 * * * * echo "test" > test.txt
> 
> after that, I started the cron-service and waited for the test-job to
> complete. But instead of doing the job cron complaind in the Syslog
> about
> 
>      Ereignisinformationen: /USR/SBIN/CRON : PID 228 : (CRON) 
> error (can't switch user context).
> 
> I checked my install via a shellscript (cron_diagnose.sh) I found in
> the Mailing-List Archiv, but it didn't find a problem.
> 
> Is there a solution to this Problem or a work-around?
> 
> Thanks.
> 
> René Haber
> 

[-- Attachment #2: cron_diagnose.sh --]
[-- Type: application/octet-stream, Size: 10766 bytes --]

#!/bin/bash
# ======================================================================
# $Source: $
# $Revision: $
# $Name: $
# $Date: $
# $State: $
# $Author: $
# ======================================================================

# ======================================================================
# This script checks for the various files, directories, and mount
# points needed by the cron daemon exist and have the proper settings,
# permissions, etc.  This script is based primarily on the
# requirements listed in the text file /usr/doc/Cygwin/cron.README.
# ======================================================================

# ======================================================================
# Routine: check_program
# Check to see that a specified program ($1) is installed and accessible
# by this script.  If it is not, then alert the user about which package
# ($2) should be installed to provide that program.
# ======================================================================
function check_program() {

	if [ `type $1 > /dev/null 2>&1` ]; then
		echo "The '$1' program is missing or not in your PATH."
		echo "This program is included in the '$2' package."
		echo "Please install this program and run this script again."
		return 1
	fi

	return 0

} # === End of check_program() === #


# ======================================================================
# Routine: sanity_check
# Check for the set of programs that are used by this script.
# ======================================================================
function sanity_check() {

	# Check for programs that this script uses.
	check_program ls fileutils || return $?
	check_program egrep grep || return $?
	check_program id sh-utils || return $?
	check_program cut textutils || return $?
	check_program tr textutils || return $?
	check_program mount cygwin || return $?

	return 0

} # === End of sanity_check() === #


# ======================================================================
# Routine: check_passwd_and_group
# Check to see whether the user's password ID and group exist in the
# system /etc/passwd and /etc/group files, respectively.
# ======================================================================
function check_passwd_and_group() {

	if [ "$(id -gn)" = mkpasswd ]; then
		echo "It appears that you do not have an entry for your user ID"
		echo "in /etc/passwd.  If this check is incorrect, then re-run"
		echo "this script with the '-f' command-line option."
		echo
		echo "Otherwise, use the 'mkpasswd' utility to generate an"
		echo "entry for your User ID in the password file:"
		echo "   mkpasswd -l -u [User ID] >> /etc/passwd"
		echo "or"
		echo "   mkpasswd -d -u [User ID] >> /etc/passwd"
		return 1
	fi

	if [ "$(id -gn)" = mkgroup ]; then
		echo "It appears that you do not have an entry for your group ID"
		echo "in /etc/group.  If this check is incorrect, then re-run"
		echo "this script with the '-f' command-line option."
		echo
		echo "Otherwise, use the 'mkgroup' utility to generate an"
		echo "entry for your group ID in the password file:"
		echo "   mkgroup -l -u > /etc/group"
		echo "or"
		echo "   mkgroup -d -u > /etc/group"
		return 1
	fi

	return 0

} # === End of check_passwd_and_group() === #


# ======================================================================
# Routine: check_dir
# Check to see that the specified directory ($1) exists.
# ======================================================================
function check_dir() {

	if [ ! -d $1 ]; then
		echo "Your computer does not appear to have a $1 directory."
		echo "Please investigate this problem, and run this script again."
		return 1
	fi

	if [ `ls -ld $1 | egrep -q '^dr[-w]x.*'` ]; then
		echo "The permissions on the directory $1 are not correct."
		echo "Please run 'chmod u+rx $1', and run this script again."
		return 1
	fi

	return 0

} # === End of check_dir() === #


# ======================================================================
# Routine: check_dir_perms
# Check to see that the specified directory ($1) exists and has the
# required permissions, as described in /usr/doc/Cygwin/cron.README.
# ======================================================================
function check_dir_perms() {

	check_dir $1 || return $?

	if [ `ls -ld $1 | egrep -q 'drwxrwxrxt'` ]; then
		echo "The permissions on the directory $1 are not correct."
		echo "Please run 'chmod 1777 $1', and run this script again."
		return 1
	fi

	return 0

} # === End of check_dir_perms() === #


# ======================================================================
# Routine: check_var_run
# Check to see that SYSTEM or the Administrators group has write
# permission in the directory /var/run.  This permission is needed
# so that the cron.pid file can be created by the cron service.
# ======================================================================
function check_var_run() {

	# We check from least- to most-restrictive permission.

	# If 'everyone'/'other' does not have write permission, then
	# check to see whether group permissions are sufficient.
	if [ $(ls -dl /var/run | cut -b9) != w ]; then
		# If 'Administrators' has group access to /var/run, but does not have
		# write permission, then check to see whether user permissions are
		# sufficient.
		if [ $(ls -dl /var/run | tr -s " " | cut -f4 -d " ") = Administ ]  && \
			[ $(ls -dl /var/run | cut -b6) != w ]; then
			# If SYSTEM is the owner of /var/run and does not have write
			# permission, then notify the user.
			if [ $(ls -dln /var/run | tr -s " " | cut -f4 -d " ") -eq 18 ]; then
				if [ $(ls -dl /var/run | cut -b3) != w ]; then
					echo "The directory /var/run cannot be written to by its owner."
					echo "Please check/change the permissions of /var/run and run"
					echo "this script again.  For example:"
					echo "   chmod u+w /var/run"
					return 1
				fi
			else
				echo "The SYSTEM user or Administrators group needs to have"
				echo "write permission in the directory /var/run.  Please"
				echo "check/change the user and/or group ownership and"
				echo "permissions and run this script again."
				return 1
			fi
		fi
	fi

	return 0

} # === End of check_var_run() === #


# ======================================================================
# Routine: check_sys_mount
# Check to see that the SYSTEM account has access to the specified
# directory.
# ======================================================================
function check_sys_mount() {

	local mnt_point=$1
	local dos_dir=$2

	# Check to see that SYSTEM can access /usr/bin:
	if ! mount | grep -qe ".\+ on $mnt_point .\+system.\+"; then
		echo "The SYSTEM user cannot access the mount point ${mnt_point}."
		echo "Please run the following command to add a system mount point:"
		echo '   mount -f -s -b "[DOS path to Cygwin]'$dos_dir\" \"$mnt_point\"
		echo "where [DOS path to Cygwin] is something like c:/cygwin."
		echo
		echo "For more information, run 'mount -m' and 'mount -h'"
		echo
		echo "After adding this mount point, please re-run this script."
		return 1
	fi

	return 0

} # === End of check_sys_mount() === #


# ======================================================================
# Routine: check_cron_table
# Check for the existence of a crontab for the user, and check its
# permissions and ownership.
# ======================================================================
function check_cron_table() {

	local user_id=$(id -un)
	local cron_table=/var/cron/tabs/$user_id

	if [ ! -f $cron_table ]; then
		echo "Your computer does not appear to have a crontab for $user_id."
		echo "Please generate a crontab for $user_id using 'crontab -e',"
		echo "and run this script again."
		return 1
	fi

	if [ `ls -l $cron_table|egrep -q 'rw-r-----'` ]; then
		echo "The permissions of your crontab file are set to:"
		ls -l $cron_table
		echo "They need to be set to read/write for $user_id and"
		echo "to read-only for group.  You can set these with"
		echo "	chmod 640 $cron_table"
		echo "Please check your crontab's permissions, and run"
		echo "this script again."
		return 1
	fi

	if [ `ls -l $cron_table|cut -d" " -f8|egrep -q SYSTEM` ]; then
		echo "The group membership of your crontab file should be SYSTEM,"
		echo "as documented in the file /usr/doc/Cygwin/cron.README."
		echo "You can change this setting with:"
		echo "	 chgrp SYSTEM $cron_table"
		echo "Please check your crontab's group membership, and"
		echo "run this script again."
		return 1
	fi

	if [ `ls -ln $cron_table|cut -d" " -f8|egrep -q 18` ]; then
		echo "The value of SYSTEM in your /etc/group file needs to"
		echo "be the reserved number '18', as documented in"
		echo "/usr/doc/Cygwin/cron.README.  Please investigate this"
		echo "and run this script again."
		return 1
	fi

	echo "This script did not find any errors in your crontab setup."
	echo "If you are still unable to get cron to work, then try"
	echo "shutting down the cron service, uninstalling it,"
	echo "reinstalling it, and restarting it."
	echo
	echo "The following commands will do that:"
	echo "  $ cygrunsrv --stop cron"
	echo "  $ cygrunsrv --remove cron"
	echo "  $ cygrunsrv --install cron -p /usr/sbin/cron -a -D"
	echo "  $ cygrunsrv --start cron"
	echo 

	if [ -f /var/run/cron.pid ]; then
		echo "If the cron service does not start, try deleting the file"
		echo "/var/run/cron.pid and then repeating the commands above."
		echo
	fi

	echo "If none of this fixes the problem, then report your problem"
	echo "to cygwin@cygwin.com.  Please include a copy of your crontab,"
	echo "('crontab -l') and the output of 'cygcheck -srv > cygcheck.txt'."
	echo
	echo "PLEASE include the generated files 'cygcheck.txt' *as an attachment*,"
	echo "and NOT in the body of the mail message."

	return 0

} # === End of check_cron_table() === #


function main() {

	echo "cron_diagnose.sh 1.0"
	echo

	sanity_check || return 1

	if [ "$1" != '-f' ]; then  # Allow the user to skip the password check.
		check_passwd_and_group || return 1
	fi

	check_dir /etc/cron.d || return 1
	check_dir /var || return 1

	check_dir_perms /var/cron || return 1
	check_dir_perms /var/cron/tabs || return 1

	check_var_run || return 1

	check_sys_mount /usr/bin /bin || return 1
	check_sys_mount /usr/lib /lib || return 1
	check_sys_mount / / || return 1

	check_cron_table || return 1

	return 0

} # === End of main() === #

# Entry point:
main $@
exit $?

# === End of $RCSfile$ === #

[-- Attachment #3: Type: text/plain, Size: 218 bytes --]

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

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

* Re: cron: can't switch user context
  2003-09-07 18:08 ` Igor Pechtchanski
@ 2003-09-08 17:30   ` René Haber
  0 siblings, 0 replies; 9+ messages in thread
From: René Haber @ 2003-09-08 17:30 UTC (permalink / raw)
  To: cygwin

Igor Pechtchanski wrote:
> Do you Google?
> <http://www.google.com/search?q=%22windows+2003%22++switch+user+context+site%3Acygwin.com>
> 	Igor

Thx for the Hint. I only used the search function of the 
Maillinglist-Archiv. I've read through the results and did't get it to 
work. I tried to let the cron-service run under an user account with 
special rights ("create token objects" etc) and tried to give this 
rights to "SYSTEM", but both didn't work.

   René



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

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

* Re: cron: can't switch user context
  2003-09-07 17:06 René Haber
@ 2003-09-07 18:08 ` Igor Pechtchanski
  2003-09-08 17:30   ` René Haber
  0 siblings, 1 reply; 9+ messages in thread
From: Igor Pechtchanski @ 2003-09-07 18:08 UTC (permalink / raw)
  To: René Haber; +Cc: cygwin

On Sun, 7 Sep 2003, René Haber wrote:

> Hello
>
> I've got Cygwin runnig on Windows 2003 and wanted to use the cron
> daemon. I installed it via
>
>    cygrunsrv -I "CYGWIN crond" -p /usr/sbin/cron.exe -a -D
>
> as a NT-Service. Then I added a cronjob via "crontab -e" (I was logged
> in as Administrator)
>
>    5 * * * * echo "test" > test.txt
>
> after that, I started the cron-service and waited for the test-job to
> complete. But instead of doing the job cron complaind in the Syslog
> about
>
>      Ereignisinformationen: /USR/SBIN/CRON : PID 228 : (CRON) error (can't switch user context).
>
> I checked my install via a shellscript (cron_diagnose.sh) I found in
> the Mailing-List Archiv, but it didn't find a problem.
>
> Is there a solution to this Problem or a work-around?
>
> Thanks.
>
> Rene Haber

Do you Google?
<http://www.google.com/search?q=%22windows+2003%22++switch+user+context+site%3Acygwin.com>
	Igor
-- 
				http://cs.nyu.edu/~pechtcha/
      |\      _,,,---,,_		pechtcha@cs.nyu.edu
ZZZzz /,`.-'`'    -.  ;-;;,_		igor@watson.ibm.com
     |,4-  ) )-,_. ,\ (  `'-'		Igor Pechtchanski, Ph.D.
    '---''(_/--'  `-'\_) fL	a.k.a JaguaR-R-R-r-r-r-.-.-.  Meow!

"I have since come to realize that being between your mentor and his route
to the bathroom is a major career booster."  -- Patrick Naughton

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

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

* cron: can't switch user context
@ 2003-09-07 17:06 René Haber
  2003-09-07 18:08 ` Igor Pechtchanski
  0 siblings, 1 reply; 9+ messages in thread
From: René Haber @ 2003-09-07 17:06 UTC (permalink / raw)
  To: cygwin

[-- Attachment #1: Type: text/plain, Size: 734 bytes --]

Hello

I've got Cygwin runnig on Windows 2003 and wanted to use the cron
daemon. I installed it via

   cygrunsrv -I "CYGWIN crond" -p /usr/sbin/cron.exe -a -D

as a NT-Service. Then I added a cronjob via "crontab -e" (I was logged
in as Administrator)

   5 * * * * echo "test" > test.txt

after that, I started the cron-service and waited for the test-job to
complete. But instead of doing the job cron complaind in the Syslog
about

     Ereignisinformationen: /USR/SBIN/CRON : PID 228 : (CRON) error (can't switch user context).

I checked my install via a shellscript (cron_diagnose.sh) I found in
the Mailing-List Archiv, but it didn't find a problem.

Is there a solution to this Problem or a work-around?

Thanks.

René Haber

[-- Attachment #2: cygcheck.out --]
[-- Type: application/octet-stream, Size: 13303 bytes --]


Cygwin Win95/NT Configuration Diagnostics
Current System Time: Sun Sep 07 18:54:30 2003

Windows .NET Server Ver 5.2 Build 3790 

Path:	d:\cygwin\usr\local\bin
	d:\cygwin\bin
	d:\cygwin\bin
	c:\Server\Perl\bin
	c:\WINDOWS\system32
	c:\WINDOWS
	c:\WINDOWS\System32\Wbem
	d:\cygwin\bin
	c:\Server\mysql\bin

Output from d:\cygwin\bin\id.exe (nontsec)
UID: 500(Administrator) GID: 513(Kein)
513(Kein)

Output from d:\cygwin\bin\id.exe (ntsec)
UID: 500(Administrator) GID: 513(Kein)
513(Kein)               544(Administratoren)
545(Benutzer)

SysDir: C:\WINDOWS\system32
WinDir: C:\WINDOWS

CYGWIN = `ntsec tty'
HOME = `d:\cygwin\home\Administrator'
MAKE_MODE = `unix'
PWD = `/home/Administrator'
USER = `Administrator'

ALLUSERSPROFILE = `C:\Dokumente und Einstellungen\All Users'
APPDATA = `C:\Dokumente und Einstellungen\Administrator\Anwendungsdaten'
CLUSTERLOG = `C:\WINDOWS\Cluster\cluster.log'
COMMONPROGRAMFILES = `C:\Programme\Gemeinsame Dateien'
COMPUTERNAME = `AVH'
COMSPEC = `C:\WINDOWS\system32\cmd.exe'
HOMEDRIVE = `C:'
HOMEPATH = `\Dokumente und Einstellungen\Administrator'
HOSTNAME = `avh'
LOGONSERVER = `\\AVH'
MANPATH = `:/usr/ssl/man'
NUMBER_OF_PROCESSORS = `1'
OLDPWD = `/usr/bin'
OS = `Windows_NT'
PATHEXT = `.COM;.EXE;.BAT;.CMD;.VBS;.VBE;.JS;.JSE;.WSF;.WSH'
PHP_PEAR_BIN_DIR = `C:\Server\php'
PHP_PEAR_DATA_DIR = `C:\Server\php\pear\data'
PHP_PEAR_DOC_DIR = `C:\Server\php\pear\docs'
PHP_PEAR_INSTALL_DIR = `C:\Server\php\pear'
PHP_PEAR_PHP_BIN = `C:\Server\php\cli\php.exe'
PHP_PEAR_SYSCONF_DIR = `C:\Server\php'
PHP_PEAR_TEST_DIR = `C:\Server\php\pear\tests'
PROCESSOR_ARCHITECTURE = `x86'
PROCESSOR_IDENTIFIER = `x86 Family 6 Model 3 Stepping 1, AuthenticAMD'
PROCESSOR_LEVEL = `6'
PROCESSOR_REVISION = `0301'
PROGRAMFILES = `C:\Programme'
PS1 = `[$USER@$HOSTNAME]\w:{\!}:\$ '
SESSIONNAME = `Console'
SHLVL = `1'
SYSTEMDRIVE = `C:'
SYSTEMROOT = `C:\WINDOWS'
TEMP = `c:\DOKUME~1\ADMINI~1\LOKALE~1\Temp'
TERM = `cygwin'
USERDOMAIN = `AVH'
USERNAME = `Administrator'
USERPROFILE = `C:\Dokumente und Einstellungen\Administrator'
WINDIR = `C:\WINDOWS'
_ = `/usr/bin/cygcheck'

HKEY_CURRENT_USER\Software\Cygnus Solutions
HKEY_CURRENT_USER\Software\Cygnus Solutions\Cygwin
HKEY_CURRENT_USER\Software\Cygnus Solutions\Cygwin\mounts v2
HKEY_CURRENT_USER\Software\Cygnus Solutions\Cygwin\Program Options
HKEY_LOCAL_MACHINE\SOFTWARE\Cygnus Solutions
HKEY_LOCAL_MACHINE\SOFTWARE\Cygnus Solutions\Cygwin
HKEY_LOCAL_MACHINE\SOFTWARE\Cygnus Solutions\Cygwin\mounts v2
  (default) = `/cygdrive'
  cygdrive flags = 0x00000022
HKEY_LOCAL_MACHINE\SOFTWARE\Cygnus Solutions\Cygwin\mounts v2\/
  (default) = `d:\cygwin'
  flags = 0x0000000a
HKEY_LOCAL_MACHINE\SOFTWARE\Cygnus Solutions\Cygwin\mounts v2\/usr/bin
  (default) = `d:\cygwin/bin'
  flags = 0x0000000a
HKEY_LOCAL_MACHINE\SOFTWARE\Cygnus Solutions\Cygwin\mounts v2\/usr/lib
  (default) = `d:\cygwin/lib'
  flags = 0x0000000a
HKEY_LOCAL_MACHINE\SOFTWARE\Cygnus Solutions\Cygwin\Program Options

c:  hd  NTFS    4000Mb  69% CP CS UN PA FC     Windoof
d:  hd  NTFS   35259Mb  89% CP CS UN PA FC     S P I E L E
e:  cd           N/A    N/A                    
f:  cd           N/A    N/A                    

d:\cygwin      /          system  binmode
d:\cygwin/bin  /usr/bin   system  binmode
d:\cygwin/lib  /usr/lib   system  binmode
.              /cygdrive  system  binmode,cygdrive

Found: d:\cygwin\bin\awk.exe
Found: d:\cygwin\bin\bash.exe
Found: d:\cygwin\bin\cat.exe
Found: d:\cygwin\bin\cp.exe
Not Found: cpp (good!)
Found: d:\cygwin\bin\find.exe
Not Found: gcc
Not Found: gdb
Found: d:\cygwin\bin\grep.exe
Not Found: ld
Found: d:\cygwin\bin\ls.exe
Not Found: make
Found: d:\cygwin\bin\mv.exe
Found: d:\cygwin\bin\rm.exe
Found: d:\cygwin\bin\sed.exe
Found: d:\cygwin\bin\sh.exe
Found: d:\cygwin\bin\tar.exe

   61k 2003/08/09 d:\cygwin\bin\cygbz2-1.dll - os=4.0 img=1.0 sys=4.0
                  "cygbz2-1.dll" v0.0 ts=2003/8/9 8:35
  849k 2003/08/11 d:\cygwin\bin\cygcrypto-0.9.7.dll - os=4.0 img=1.0 sys=4.0
                  "cygcrypto-0.9.7.dll" v0.0 ts=2003/8/11 10:58
  645k 2003/04/11 d:\cygwin\bin\cygcrypto.dll - os=4.0 img=1.0 sys=4.0
                  "cygcrypto.dll" v0.0 ts=2003/4/11 12:37
   45k 2001/04/25 d:\cygwin\bin\cygform5.dll - os=4.0 img=1.0 sys=4.0
                  "cygform5.dll" v0.0 ts=2001/4/25 7:28
   35k 2002/01/09 d:\cygwin\bin\cygform6.dll - os=4.0 img=1.0 sys=4.0
                  "cygform6.dll" v0.0 ts=2002/1/9 7:03
   48k 2003/08/09 d:\cygwin\bin\cygform7.dll - os=4.0 img=1.0 sys=4.0
                  "cygform7.dll" v0.0 ts=2003/8/9 11:25
   28k 2003/07/20 d:\cygwin\bin\cyggdbm-3.dll - os=4.0 img=1.0 sys=4.0
                  "cyggdbm-3.dll" v0.0 ts=2003/7/20 9:58
   30k 2003/08/11 d:\cygwin\bin\cyggdbm-4.dll - os=4.0 img=1.0 sys=4.0
                  "cyggdbm-4.dll" v0.0 ts=2003/8/11 4:12
   19k 2003/03/22 d:\cygwin\bin\cyggdbm.dll - os=4.0 img=1.0 sys=4.0
                  "cyggdbm.dll" v0.0 ts=2002/2/20 4:05
   15k 2003/07/20 d:\cygwin\bin\cyggdbm_compat-3.dll - os=4.0 img=1.0 sys=4.0
                  "cyggdbm_compat-3.dll" v0.0 ts=2003/7/20 10:00
   15k 2003/08/11 d:\cygwin\bin\cyggdbm_compat-4.dll - os=4.0 img=1.0 sys=4.0
                  "cyggdbm_compat-4.dll" v0.0 ts=2003/8/11 4:13
   69k 2003/08/10 d:\cygwin\bin\cyggettextlib-0-12-1.dll - os=4.0 img=1.0 sys=4.0
                  "cyggettextlib-0-12-1.dll" v0.0 ts=2003/8/11 0:10
   12k 2003/08/10 d:\cygwin\bin\cyggettextpo-0.dll - os=4.0 img=1.0 sys=4.0
                  "cyggettextpo-0.dll" v0.0 ts=2003/8/11 0:11
  134k 2003/08/10 d:\cygwin\bin\cyggettextsrc-0-12-1.dll - os=4.0 img=1.0 sys=4.0
                  "cyggettextsrc-0-12-1.dll" v0.0 ts=2003/8/11 0:10
   17k 2001/06/28 d:\cygwin\bin\cyghistory4.dll - os=4.0 img=1.0 sys=4.0
                  "cyghistory4.dll" v0.0 ts=2001/1/7 5:34
   29k 2003/08/10 d:\cygwin\bin\cyghistory5.dll - os=4.0 img=1.0 sys=4.0
                  "cyghistory5.dll" v0.0 ts=2003/8/11 1:16
  958k 2003/08/10 d:\cygwin\bin\cygiconv-2.dll - os=4.0 img=1.0 sys=4.0
                  "cygiconv-2.dll" v0.0 ts=2003/8/10 22:57
   22k 2001/12/13 d:\cygwin\bin\cygintl-1.dll - os=4.0 img=1.0 sys=4.0
                  "cygintl-1.dll" v0.0 ts=2001/12/13 10:28
   37k 2003/08/10 d:\cygwin\bin\cygintl-2.dll - os=4.0 img=1.0 sys=4.0
                  "cygintl-2.dll" v0.0 ts=2003/8/10 23:50
   21k 2001/06/20 d:\cygwin\bin\cygintl.dll - os=4.0 img=1.0 sys=4.0
                  "cygintl.dll" v0.0 ts=2001/6/20 19:09
   26k 2001/04/25 d:\cygwin\bin\cygmenu5.dll - os=4.0 img=1.0 sys=4.0
                  "cygmenu5.dll" v0.0 ts=2001/4/25 7:27
   20k 2002/01/09 d:\cygwin\bin\cygmenu6.dll - os=4.0 img=1.0 sys=4.0
                  "cygmenu6.dll" v0.0 ts=2002/1/9 7:03
   29k 2003/08/09 d:\cygwin\bin\cygmenu7.dll - os=4.0 img=1.0 sys=4.0
                  "cygmenu7.dll" v0.0 ts=2003/8/9 11:25
  156k 2001/04/25 d:\cygwin\bin\cygncurses++5.dll - os=4.0 img=1.0 sys=4.0
                  "cygncurses++5.dll" v0.0 ts=2001/4/25 7:29
  175k 2002/01/09 d:\cygwin\bin\cygncurses++6.dll - os=4.0 img=1.0 sys=4.0
                  "cygncurses++6.dll" v0.0 ts=2002/1/9 7:03
  226k 2001/04/25 d:\cygwin\bin\cygncurses5.dll - os=4.0 img=1.0 sys=4.0
                  "cygncurses5.dll" v0.0 ts=2001/4/25 7:17
  202k 2002/01/09 d:\cygwin\bin\cygncurses6.dll - os=4.0 img=1.0 sys=4.0
                  "cygncurses6.dll" v0.0 ts=2002/1/9 7:03
  224k 2003/08/09 d:\cygwin\bin\cygncurses7.dll - os=4.0 img=1.0 sys=4.0
                  "cygncurses7.dll" v0.0 ts=2003/8/9 11:24
   15k 2001/04/25 d:\cygwin\bin\cygpanel5.dll - os=4.0 img=1.0 sys=4.0
                  "cygpanel5.dll" v0.0 ts=2001/4/25 7:27
   12k 2002/01/09 d:\cygwin\bin\cygpanel6.dll - os=4.0 img=1.0 sys=4.0
                  "cygpanel6.dll" v0.0 ts=2002/1/9 7:03
   19k 2003/08/09 d:\cygwin\bin\cygpanel7.dll - os=4.0 img=1.0 sys=4.0
                  "cygpanel7.dll" v0.0 ts=2003/8/9 11:24
   67k 2003/08/22 d:\cygwin\bin\cygpcre-0.dll - os=4.0 img=1.0 sys=4.0
                  "cygpcre-0.dll" v0.0 ts=2003/8/22 12:41
   63k 2003/04/11 d:\cygwin\bin\cygpcre.dll - os=4.0 img=1.0 sys=4.0
                  "cygpcre.dll" v0.0 ts=2003/4/11 10:31
   15k 2003/08/22 d:\cygwin\bin\cygpcreposix-0.dll - os=4.0 img=1.0 sys=4.0
                  "cygpcreposix-0.dll" v0.0 ts=2003/8/22 12:41
   61k 2003/04/11 d:\cygwin\bin\cygpcreposix.dll - os=4.0 img=1.0 sys=4.0
                  "cygpcreposix.dll" v0.0 ts=2003/4/11 10:31
   22k 2002/06/09 d:\cygwin\bin\cygpopt-0.dll - os=4.0 img=1.0 sys=4.0
                  "cygpopt-0.dll" v0.0 ts=2002/6/9 7:45
  108k 2001/06/28 d:\cygwin\bin\cygreadline4.dll - os=4.0 img=1.0 sys=4.0
                  "cygreadline4.dll" v0.0 ts=2001/1/7 5:34
  148k 2003/08/10 d:\cygwin\bin\cygreadline5.dll - os=4.0 img=1.0 sys=4.0
                  "cygreadline5.dll" v0.0 ts=2003/8/11 1:16
  176k 2003/08/11 d:\cygwin\bin\cygssl-0.9.7.dll - os=4.0 img=1.0 sys=4.0
                  "cygssl-0.9.7.dll" v0.0 ts=2003/8/11 10:58
  165k 2003/04/11 d:\cygwin\bin\cygssl.dll - os=4.0 img=1.0 sys=4.0
                  "cygssl.dll" v0.0 ts=2003/4/11 12:37
   60k 2003/08/09 d:\cygwin\bin\cygz.dll - os=4.0 img=1.0 sys=4.0
                  "cygz.dll" v0.0 ts=2003/8/9 8:28
  945k 2003/09/01 d:\cygwin\bin\cygwin1.dll - os=4.0 img=1.0 sys=4.0
                  "cygwin1.dll" v0.0 ts=2003/9/1 19:15
    Cygwin DLL version info:
        DLL version: 1.5.3
        DLL epoch: 19
        DLL bad signal mask: 19005
        DLL old termios: 5
        DLL malloc env: 28
        API major: 0
        API minor: 90
        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: Mon Sep 1 13:15:28 EDT 2003
        Shared id: cygwin1S3

  653k 2003/05/16 c:\Server\mysql\bin\cygwinb19.dll - os=4.0 img=1.0 sys=4.0
                  "cygwinb19.dll" v0.0 ts=1998/7/15 19:50

Cygwin Package Information
Last downloaded files to: c:\temp
Last downloaded files from: http://ftp.inf.tu-dresden.de/software/windows/cygwin32

Package              Version            
_update-info-dir     00211-1            
ash                  20020731-3         
base-files           2.5-1              
base-passwd          1.1-1              
bash                 2.05b-13           
bzip2                1.0.2-5            
cron                 3.0.1-11           
cygrunsrv            0.96-2             
cygutils             1.2.1-2            
cygwin               1.5.3-1            
cygwin-doc           1.3-6              
diffutils            2.8.4-1            
fileutils            4.1-2              
findutils            4.1.7-4            
gawk                 3.1.3-3            
gdbm                 1.8.3-7            
grep                 2.5-1              
groff                1.18.1-2           
gzip                 1.3.3-4            
less                 381-1              
libbz2_1             1.0.2-5            
libgdbm              1.8.0-5            
libgdbm-devel        1.8.3-7            
libgdbm3             1.8.3-3            
libgdbm4             1.8.3-7            
libgettextpo0        0.12.1-3           
libiconv2            1.9.1-3            
libintl              0.10.38-3          
libintl1             0.10.40-1          
libintl2             0.12.1-3           
libncurses5          5.2-1              
libncurses6          5.2-8              
libncurses7          5.3-4              
libpcre              4.1-1              
libpcre0             4.4-1              
libpopt0             1.6.4-4            
libreadline4         4.1-2              
libreadline5         4.3-5              
login                1.9-7              
lynx                 2.8.4-7            
man                  1.5j-2             
mc                   4.6.0-4            
mktemp               1.5-3              
ncurses              5.3-4              
newlib-man           20020801           
openssh              3.6.1p2-2          
openssl              0.9.7b-3           
openssl096           0.9.6j-1           
pcre                 4.4-1              
pcre-doc             4.4-1              
readline             4.3-5              
rsync                2.5.6-1            
sed                  4.0.7-3            
sh-utils             2.0.15-4           
shutdown             1.3-1              
tar                  1.13.25-3          
termcap              20021106-2         
terminfo             5.3_20030726-1     
texinfo              4.2-4              
textutils            2.0.21-1           
unzip                5.50-5             
vim                  6.2-3              
wget                 1.8.2-2            
which                1.5-2              
zip                  2.3-5              
zlib                 1.1.4-4            
Use -h to see help about each section

[-- Attachment #3: Type: text/plain, Size: 218 bytes --]

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

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

end of thread, other threads:[~2021-04-28  4:35 UTC | newest]

Thread overview: 9+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2021-04-27 10:37 Cron can't switch user context Peter Pfannenschmid
2021-04-28  0:14 ` Brian Inglis
2021-04-28  4:32   ` Andrey Repin
     [not found] <BADF3C947A1BD54FBA75C70C241B0B9E763574@ex02.co.idirect.net >
2003-09-10 16:12 ` cron: " Larry Hall
2003-09-14 21:22   ` René Haber
  -- strict thread matches above, loose matches on Subject: below --
2003-09-10 15:57 Harig, Mark
2003-09-07 17:06 René Haber
2003-09-07 18:08 ` Igor Pechtchanski
2003-09-08 17:30   ` René Haber

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