This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
cd /etc/apache2/sites-available/ | |
for vhostname in *; | |
do | |
if [ -f /etc/awstats/awstats.${vhostname}.conf ]; then | |
echo "Traiter le vhost $vhostname ? [Y/n]" | |
read | |
if [ "$REPLY" = "n" ]; then | |
continue; | |
fi |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
date=$(date +%Y%m%d) | |
for homedir in toto tata titi; | |
do | |
if [ -d /home/${homedir} ] ; then | |
echo "Deactivating $homedir vacation"; | |
cd /home/${homedir} | |
mv .forward .forward.${date} | |
mv .vacation.db .vacation.db.${date} | |
mv .vacation.msg .vacation.msg.${date} |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# Find files newert than (mtime) a precise date, and execute an action. | |
find . ! -newermt '2012-09-19 11:40:00' -exec cp {} /tmp/mails \; |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
for i in user1 user2 user3...; do echo -n 'useradd -m -s /bin/bash -u '$(grep -E "^$i" /etc/passwd | cut -d':' -f3) && echo -en ' -p' \'$(grep -E "^$i" /etc/shadow | cut -d ':' -f2)\' $i '\n'; done | |
Output : | |
useradd -m -s /bin/bash -u USERID -p 'USERPWD' username |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
find /tmp/ -user www-user.old -exec chown www-user:user {} \; | |
find /tmp/ -user user.old -exec chown user:user {} \; | |
* Détecter les fichiers non lisibles par Apache (lecture sur le groupe) : find ./ -type f ! -perm /g=r -exec ls -l {} \; | |
* Détecter les répertoires non lisibles par Apache (lecture/exécution sur le groupe) : find ./ -type d \( ! -perm /g=r -o ! -perm /g=x \) -exec ls -ld {} \; | |
* Détecter les fichiers/répertoires accessibles en écriture par Apache (écriture sur le groupe) : find ./ -perm /g=w | |
* Détecter les fichiers/répertoires accessibles en écriture par tous : find ./ -perm -007 -o -type f -perm -006 |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# Use vi style when copy-paste mode. | |
set-window-option -g mode-keys vi | |
# Use ZSH by default | |
set-option -g default-shell /bin/zsh | |
# Map alt keys + direction keys for switching pane. | |
bind -n M-Left select-pane -L | |
bind -n M-Right select-pane -R | |
bind -n M-Up select-pane -U | |
bind -n M-Down select-pane -D | |
# Active monitoring |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
#Script de connection automatique au réseau wifi et au portail captif de l'université | |
#de Nancy-Metz | |
#Start 28/09/10 | |
#Last edit : 5/10/10 | |
#Last Comment : Ajout de la libnotify pour envoyer de msg. | |
#Révision : stable | |
#Version : 1.2 | |
#Var |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
#################### | |
#SCRIPTUS # | |
#Version 2.0a # | |
#By Benpro # | |
#[email protected]# | |
#www.benprobox.fr # | |
#Date : 27/07/09 # | |
#################### |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/sh | |
#Upload auto for animesost | |
#benrpo - 27-08-08 | |
#Variables | |
ftp_user="" | |
ftp_password="" | |
ftp_host="animesost.info" | |
http_user="" | |
http_pass="" |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
abuse@<domain>, admin@<domain>, administrator@<domain>, contact@<domain>, info@<domain>, postmaster@<domain>, support@<domain>, webmaster@<domain> |
OlderNewer