Compare commits
5 commits
Author | SHA1 | Date | |
---|---|---|---|
Jérémy Lecour | e3adfe773e | ||
Jérémy Lecour | 2f13fcb168 | ||
Jérémy Lecour | c4890c1477 | ||
Victor LABORIE | 23f6a69e5f | ||
Ludovic Poujol | 2ecff32592 |
2
htdocs/robots.txt
Normal file
2
htdocs/robots.txt
Normal file
|
@ -0,0 +1,2 @@
|
||||||
|
User-agent: *
|
||||||
|
Disallow: /
|
|
@ -28,6 +28,7 @@ VHOST_PATH="/etc/apache2/sites-enabled/"
|
||||||
MAX_LOGIN_CHAR=16
|
MAX_LOGIN_CHAR=16
|
||||||
HOME_DIR="/home"
|
HOME_DIR="/home"
|
||||||
MYSQL_CREATE_DB_OPTS=""
|
MYSQL_CREATE_DB_OPTS=""
|
||||||
|
SSH_GROUP="evolinux-ssh"
|
||||||
|
|
||||||
# Utiliser ce fichier pour redefinir la valeur des variables ci-dessus
|
# Utiliser ce fichier pour redefinir la valeur des variables ci-dessus
|
||||||
config_file="/etc/evolinux/web-add.conf"
|
config_file="/etc/evolinux/web-add.conf"
|
||||||
|
@ -211,7 +212,15 @@ create_www_account() {
|
||||||
/usr/sbin/adduser --disabled-password --home $HOME_DIR_USER/www \
|
/usr/sbin/adduser --disabled-password --home $HOME_DIR_USER/www \
|
||||||
--no-create-home --shell /bin/false --gecos "WWW $in_login" www-$in_login $OPT_WWWUID $OPT_WWWUID_ARG --ingroup $in_login --force-badname >/dev/null
|
--no-create-home --shell /bin/false --gecos "WWW $in_login" www-$in_login $OPT_WWWUID $OPT_WWWUID_ARG --ingroup $in_login --force-badname >/dev/null
|
||||||
|
|
||||||
|
if grep -qE '^AllowGroups' /etc/ssh/sshd_config; then
|
||||||
|
if ! grep -qE "^AllowGroups(\s+\S+)*(\s+$SSH_GROUP)" /etc/ssh/sshd_config; then
|
||||||
|
sed -i "s/^AllowGroups .*/& $SSH_GROUP/" /etc/ssh/sshd_config
|
||||||
|
groupadd --force $SSH_GROUP
|
||||||
|
fi
|
||||||
|
usermod -a -G $SSH_GROUP "$in_login"
|
||||||
|
elif grep -qE '^AllowUsers' /etc/ssh/sshd_config; then
|
||||||
sed -i "s/^AllowUsers .*/& $in_login/" /etc/ssh/sshd_config
|
sed -i "s/^AllowUsers .*/& $in_login/" /etc/ssh/sshd_config
|
||||||
|
fi
|
||||||
/etc/init.d/ssh reload
|
/etc/init.d/ssh reload
|
||||||
|
|
||||||
step_ok "Création des utilisateurs"
|
step_ok "Création des utilisateurs"
|
||||||
|
@ -355,8 +364,10 @@ op_del() {
|
||||||
sed -i.bak "/^$login:/d" /etc/aliases
|
sed -i.bak "/^$login:/d" /etc/aliases
|
||||||
sed -i.bak "/^www-$login:/d" /etc/aliases
|
sed -i.bak "/^www-$login:/d" /etc/aliases
|
||||||
|
|
||||||
|
if grep -E '^AllowUsers' /etc/ssh/sshd_config; then
|
||||||
sed -i "s/^\(AllowUsers .*\)$login/\1/" /etc/ssh/sshd_config
|
sed -i "s/^\(AllowUsers .*\)$login/\1/" /etc/ssh/sshd_config
|
||||||
/etc/init.d/ssh reload
|
/etc/init.d/ssh reload
|
||||||
|
fi
|
||||||
|
|
||||||
if [ -d "$HOME_DIR/$login" ]; then
|
if [ -d "$HOME_DIR/$login" ]; then
|
||||||
mv -i $HOME_DIR/$login $HOME_DIR/$login.`date '+%Y%m%d-%H%M%S'`.bak
|
mv -i $HOME_DIR/$login $HOME_DIR/$login.`date '+%Y%m%d-%H%M%S'`.bak
|
||||||
|
@ -642,4 +653,3 @@ op_add() {
|
||||||
|
|
||||||
# Point d'entrée
|
# Point d'entrée
|
||||||
arg_processing $*
|
arg_processing $*
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue