私のスクリプトはCRONログで実行されていると報告されていますが、どのユーザーのcrontabにもリストされていません。

私のスクリプトはCRONログで実行されていると報告されていますが、どのユーザーのcrontabにもリストされていません。

これはクローネログ一部のスクリプトを実行しているコンピュータ(インターネット接続):

luis@Fostrot:~$ sudo tail -n 50 /var/log/syslog | grep "cron" -i
Jan 19 21:30:01 Fostrot /USR/SBIN/CRON[11014]: (root) CMD (/bin/bash --login -i -c Reconectador3G.sh)
Jan 19 21:30:01 Fostrot /USR/SBIN/CRON[11013]: (root) CMD (/bin/bash --login -i -c ReportarIP.sh)
Jan 19 21:30:01 Fostrot /USR/SBIN/CRON[11015]: (root) CMD (   /bin/ReconectadorVPN.sh)
Jan 19 21:35:01 Fostrot /USR/SBIN/CRON[11224]: (root) CMD (/bin/bash --login -i -c Reconectador3G.sh)
Jan 19 21:35:01 Fostrot /USR/SBIN/CRON[11227]: (root) CMD (/bin/bash --login -i -c ReportarIP.sh)
Jan 19 21:35:01 Fostrot /USR/SBIN/CRON[11225]: (root) CMD (   /bin/ReconectadorVPN.sh)
Jan 19 21:39:01 Fostrot /USR/SBIN/CRON[11452]: (root) CMD (  [ -x /usr/lib/php5/maxlifetime ] && [ -x /usr/lib/php5/sessionclean ] && [ -d /var/lib/php5 ] && /usr/lib/php5/sessionclean /var/lib/php5 $(/usr/lib/php5/maxlifetime))
Jan 19 21:40:01 Fostrot /USR/SBIN/CRON[11477]: (root) CMD (   /bin/ReconectadorVPN.sh)
Jan 19 21:40:01 Fostrot /USR/SBIN/CRON[11478]: (root) CMD (/bin/bash --login -i -c Reconectador3G.sh)
Jan 19 21:40:01 Fostrot /USR/SBIN/CRON[11481]: (root) CMD (/bin/bash --login -i -c ReportarIP.sh)
Jan 19 21:45:01 Fostrot /USR/SBIN/CRON[11832]: (root) CMD (/bin/bash --login -i -c ReportarIP.sh)
Jan 19 21:45:01 Fostrot /USR/SBIN/CRON[11831]: (root) CMD (   /bin/ReconectadorVPN.sh)
Jan 19 21:45:01 Fostrot /USR/SBIN/CRON[11833]: (root) CMD (/bin/bash --login -i -c Reconectador3G.sh)

これはクローンタブですsudo

luis@Fostrot:~$ sudo crontab -l
# Edit this file to introduce tasks to be run by cron.
#
# Each task to run has to be defined through a single line
# indicating with different fields when the task will be run
# and what command to run for the task
#
# To define the time you can provide concrete values for
# minute (m), hour (h), day of month (dom), month (mon),
# and day of week (dow) or use '*' in these fields (for 'any').#
# Notice that tasks will be started based on the cron's system
# daemon's notion of time and timezones.
#
# Output of the crontab jobs (including errors) is sent through
# email to the user the crontab file belongs to (unless redirected).
#
# For example, you can run a backup of all your user accounts
# at 5 a.m every week with:
# 0 5 * * 1 tar -zcf /var/backups/home.tgz /home/
#
# For more information see the manual pages of crontab(5) and cron(8)
#
# m h  dom mon dow   command
*/5 * * * * /bin/bash --login -i -c Reconectador3G.sh
*/5 * * * * /bin/bash --login -i -c ReportarIP.sh

ご覧のとおり出入り不可のためのReconectadorVPN.sh。他のユーザーにはcrontabがないか、次のようになります。

luis@Fostrot:~$ crontab -l
no crontab for luis

すべてのユーザーのcrontabも確認しました。

root@Fostrot:/home/luis# awk -F: '{print $1}' /etc/passwd | xargs -l1 crontab -lu
# Edit this file to introduce tasks to be run by cron.
#
# Each task to run has to be defined through a single line
# indicating with different fields when the task will be run
# and what command to run for the task
#
# To define the time you can provide concrete values for
# minute (m), hour (h), day of month (dom), month (mon),
# and day of week (dow) or use '*' in these fields (for 'any').#
# Notice that tasks will be started based on the cron's system
# daemon's notion of time and timezones.
#
# Output of the crontab jobs (including errors) is sent through
# email to the user the crontab file belongs to (unless redirected).
#
# For example, you can run a backup of all your user accounts
# at 5 a.m every week with:
# 0 5 * * 1 tar -zcf /var/backups/home.tgz /home/
#
# For more information see the manual pages of crontab(5) and cron(8)
#
# m h  dom mon dow   command
*/5 * * * * /bin/bash --login -i -c Reconectador3G.sh
*/5 * * * * /bin/bash --login -i -c ReportarIP.sh
no crontab for daemon
no crontab for bin
no crontab for sys
no crontab for sync
no crontab for games
no crontab for man
no crontab for lp
no crontab for mail
no crontab for news
no crontab for uucp
no crontab for proxy
no crontab for www-data
no crontab for backup
no crontab for list
no crontab for irc
no crontab for gnats
no crontab for nobody
no crontab for libuuid
no crontab for mysql
no crontab for messagebus
no crontab for colord
no crontab for usbmux
no crontab for miredo
no crontab for ntp
no crontab for Debian-exim
no crontab for avahi
no crontab for beef-xss
no crontab for dradis
no crontab for pulse
no crontab for speech-dispatcher
no crontab for haldaemon
no crontab for iodine
no crontab for postgres
no crontab for sshd
no crontab for snmp
no crontab for stunnel4
no crontab for statd
no crontab for sslh
no crontab for Debian-gdm
no crontab for rtkit
no crontab for saned
no crontab for manolo
no crontab for luis
no crontab for dnsmasq
no crontab for arpwatch
no crontab for redsocks

...それらのどれもReconectadorVPN.shスクリプトのエントリを持っていません。

ここで何が起こっているのですか?位置通貨ReconectadorVPN.sh台本に?

ベストアンサー1

クローンのマニュアルページから:

   Cron  searches  /var/spool/cron for crontab files which are named after
   accounts in crontabs found are loaded into memory.  Cron also  searches
   for /etc/crontab and the files in the directory, which are in a differ-
   ent format (see crontab(5) ).

ユーザーcrontabを見ましたが、そうではありません/etc/crontab。通常、複数のcronディレクトリでエントリを実行するためのエントリが含まれています。

おすすめ記事