New answers tagged

0

I got the idea from the answer provided by @segaps To disable: crontab -l | awk '{print "# "$1}' | crontab To enable: crontab -l | cut -c 3- | crontab The only problem with the solution provided by segaps, is that it will uncomment the jobs, that are already commented by the user.


0

You can periodically run crontab -l > my_crontab.backup to backup the crontab into file.


0

I would verify that your cron is actually running. You can look in /var/log/cron and see if there is an entry for that. If not, then possibly verify that the file is executable. If selinux is enabled, you might check in the audit logs.


0

Probably aide output to stderr but not to stdout. Try redirect stderr /sbin/aide --check 2> /tmp/$AIDEOUT Or both stdout and stderr /sbin/aide --check 2>&1 /tmp/$AIDEOUT http://stackoverflow.com/a/637834/205355


3

Maybe your crontab file now looks like: # My cronjobs: * 2 * * * /scripts/task1.sh * 4 * * * /scripts/task2.sh You have multiple options instead of hoping that scheduling two cron jobs far enough apart is sufficient that they won't overlap when one runs a bit longer than expected: 1. Simply schedule a single cron job that executes multiple scripts ...


1

You may want to switch to (or allow) ident auth, then create a local system user with that same name. Then you can just run that script as that user, and it will log you in to postgres with that same user. https://www.postgresql.org/docs/9.0/static/auth-methods.html https://www.postgresql.org/docs/9.0/static/auth-pg-hba-conf.html So something like this ...


1

Take a look at a similar post here: Postgresql: Scripting psql execution with password The overall accepted answer (which may or may not work for your version of Postgres) is to use the PGPASSWORD environment variable like so: PGPASSWORD=[your password] psql -Umyuser < myscript.sql EDIT: Seems as though you tried and this didn't work. Have you looked ...


1

You should never run munin-cron with 'root' user. Try running this command: chown -R munin:munin /var/www/munin After this try running "munin-cron" back from the "munin" user.


0

Solved. Please check the answer on "superuser" Not sure if I should delete the question on "serverfault"? At least I am not able to mark it as duplicate, sice I only can refer to other server-fault questions.


1

cron runs under root user, make sure your root user has s3cmd configuration otherwise copy them for root user cp -i /home/ubuntu/.s3cfg /root/.s3cfg


0

Another possible simple solution, not exactly what is being asked but possible useful for someone. Simply send the number of "Total violations found" in the subject of the mail, so I keep receiving the notifications, but I don't have the need to open them although I see some violation is happening. That way I'm also sure tripwire keeps working as expected: ...


1

The crontab(1) man page notes you can populate the crontab via stdin: The first form of this command is used to install a new crontab from some named file or standard input if the pseudo-filename ``-'' is given. So we can do this: $ cat cron.dev1.txt * * * * * /bin/script1 $ cat cron.dev2.txt * * * * * /bin/script2 $ cat cron.dev*.txt | ...



Top 50 recent answers are included