This script will send you an email that contains all cron jobs for all your users.

#!/bin/bash
# Show all users cron jobs and send a report via email
# Created by [email protected], no rights reserved.
# Please submit feedback and questions at [email protected]
# Homepage: http://www.debian-tutorials.com

EMAIL=$1
if [ -n "$EMAIL" ] ; then
	TMPFILE=/tmp/cronjobs.tmp.$$

        #get all users list
	for i in `cat /etc/passwd | cut -f1 -d :`; do
		echo "##################################################"
		echo "Username: ${i}"
		echo "##################################################"
		crontab -u ${i} -l 2>&1
		echo "##################################################"
	done > $TMPFILE
	cat $TMPFILE | mail -s "Cronjobs report for `hostname`" ${EMAIL}
	rm -f $TMPFILE
else
	echo "Usage: ./cronlist your_email_address"
	exit
fi

You can download this script directly from here: How to show cron jobs for all users

This bash script was cread for you to help you to set up a VPN that will let you do many things.

This bash script is based primarily on another tutorials, but I have updated and I added some more infos.

This is the script:

#!/bin/bash
# OpenVPN install script
# Tested on Debian Squeeze
# Please submit feedback and questions at [email protected]

ip=`grep address /etc/network/interfaces | grep -v 127.0.0.1 | awk ‘{print $2}’`
apt-get update
apt-get install openvpn libssl-dev openssl
cd /etc/openvpn/
cp -R /usr/share/doc/openvpn/examples/easy-rsa/ /etc/openvpn/
cd /etc/openvpn/easy-rsa/2.0/
chmod +rwx *
. ./vars
./clean-all
source ./vars

echo -e “\n\n\n\n\n\n\n” | ./build-ca
clear

Continue Reading…

Page 1 of 11