bon ben je me suis débrouillé sans le co-chef (ex-co-chef, soyons précis) pour les /home (c'était pas très compliqué en fait) seulement g pas réussi à les mettre en ext3 (moi ça m'empeche pas de dormir la nuit mais si ça pose un problème je changerai)

et g aussi terminé le script d'ajout des user, voilà la version définitive : 

[code:1:cc6bf1ea84]
#!/bin/bash
if &#91; $1 &#93;
then
        user=$1
fi
if &#91; ! $1 &#93;
then
        echo -n &quot;Entrez le nom de l'utilisateur ? ajouter&#58; &quot;
        read user
fi
echo $user
 
adduser --force-badname $user
path=&quot;/home/$&#123;user&#125;/public_html&quot;
mkdir $path
mkdir &quot;/home/$&#123;user&#125;/cgi-bin&quot;
chmod 711 &quot;/home/$&#123;user&#125;/cgi-bin&quot;
chown -R $user /home/$&#123;user&#125;
chgrp -R $user /home/$&#123;user&#125;
 
echo &quot;Creating mysql database&quot;
echo -n &quot;Enter mysql password &#58; &quot;
read dbpass
echo &quot;mysql root password is needed&quot;
mysql -e &quot;create database \`$&#123;user&#125;\`;
grant all privileges on \`$&#123;user&#125;\`.* to '$&#123;user&#125;'@'localhost'
identified by '$&#123;dbpass&#125;' with grant option;&quot; -p
 
echo -n &quot;Do you want to add a virtual host for this user? &#91;y/n&#93; &quot;
read yes
if &#91; $yes == &quot;y&quot; &#93;
then
echo &quot;&lt;VirtualHost *&gt;&quot; &gt;&gt; vhost.conf
echo -n &quot;Enter domain name &#40;e.g site.fede-ulg.org&#41; &#58; &quot;
read domain
echo &quot;ServerName $domain&quot; &gt;&gt; vhost.conf
echo &quot;DocumentRoot $path&quot; &gt;&gt; vhost.conf
echo -n &quot;Enter aliases for this domain &#40;separated by spaces&#41; &#58; &quot;
read aliases
        if &#91; &quot;$&#123;aliases&#125;&quot; &#93;
        then
        echo &quot;ServerAlias $aliases&quot; &gt;&gt; vhost.conf
        fi
mkdir /var/log/apache/$&#123;user&#125;
echo &quot;CustomLog /var/log/apache/$&#123;user&#125;/accesslog combined&quot; &gt;&gt; vhost.conf
echo &quot;ErrorLog /var/log/apache/$&#123;user&#125;/errorlog&quot; &gt;&gt; vhost.conf
 
echo &quot;Configuring cgi-bin directory&quot;
 
echo &quot;&lt;IfModule mod_alias.c&gt;
    ScriptAlias /cgi-bin/ /home/$&#123;user&#125;/cgi-bin/
    &lt;Directory /home/$&#123;user&#125;/cgi-bin/&gt;
        AllowOverride None
        Options ExecCGI -MultiViews +SymLinksIfOwnerMatch
        Order allow,deny
        Allow from all
    &lt;/Directory&gt;
&lt;/IfModule&gt;
&lt;/VirtualHost&gt;
&quot; &gt;&gt; vhost.conf
echo &quot;Redirect /$&#123;user&#125; http&#58;//$&#123;domain&#125;&quot; &gt;&gt; redirect.conf
fi
 
echo -n &quot;Do you want to add a webalizer directory for this user? &#91;y/n&#93; &quot;
read yess
if &#91; $yess == &quot;y&quot; &#93;
then
 
mkdir /home/webalizer/public_html/$&#123;user&#125;
chown webalizer&#58;webalizer /home/webalizer/public_html/$&#123;user&#125;
 
echo &quot;LogFile         /var/log/apache/$&#123;user&#125;/accesslog
OutputDir       /home/webalizer/public_html/$&#123;user&#125;
Incremental     yes
ReportTitle     Usage Statistics for
HostName        $&#123;user&#125;.fede-ulg.org
HideSite        *localhost
HideReferrer    localhost/
HideReferrer    Direct Request
HideURL         *.gif
HideURL         *.GIF
HideURL         *.jpg
HideURL         *.JPG
HideURL         *.ra
GroupURL        /cgi-bin/*
IgnoreSite      localhost
IgnoreReferrer  localhost
MangleAgents    4
&quot; &gt;&gt; /etc/webalizer/$&#123;user&#125;.conf
 
 
fi
 
/etc/init.d/apache reload

[/code:1:cc6bf1ea84]

je sais pas ce que vous en pensez mais moi je le trouve mignon comme tout ce script  :roll: