<?xml version="1.0" encoding="utf-8" standalone="yes"?><rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom" xmlns:content="http://purl.org/rss/1.0/modules/content/"><channel><title>Gnu/Linux on Welcome to /dev/null</title><link>https://www.morot.fr/categories/gnu/linux/</link><description>Recent content in Gnu/Linux on Welcome to /dev/null</description><generator>Hugo</generator><language>fr-FR</language><lastBuildDate>Sun, 25 Oct 2026 21:11:40 +0100</lastBuildDate><atom:link href="https://www.morot.fr/categories/gnu/linux/feed.xml" rel="self" type="application/rss+xml"/><item><title>J'ai enfin migré de WordPress à Hugo</title><link>https://www.morot.fr/jai-enfin-migre-de-wordpress-a-hugo/</link><pubDate>Sun, 25 Oct 2026 21:11:40 +0100</pubDate><guid isPermaLink="false">https://www.morot.fr/jai-enfin-migre-de-wordpress-a-hugo/</guid><description>&lt;p&gt;Ça faisait pas loin d&amp;rsquo;un an que l&amp;rsquo;idée trottait dans un coin de ma tête, migrer de WordPress vers Hugo. Je n&amp;rsquo;avais plus envie de cette usine à gaz toujours trouée, de ce moteur monopolistique sur internet. Et puis le Markdown c&amp;rsquo;est nettement plus sympa.&lt;/p&gt;
&lt;h1 id="hugo-en-deux-mots"&gt;Hugo en deux mots&lt;/h1&gt;
&lt;p&gt;Hugo est un générateur de site statique libre, écrit en Go et livré sous la forme d&amp;rsquo;un unique binaire. Là où WordPress fabrique chaque page à la volée en interrogeant sa base de données, Hugo fait tout le travail une fois pour toutes : il prend les articles écrits en Markdown, les passe dans les gabarits du thème et produit un site complet en HTML, prêt à être servi tel quel.&lt;/p&gt;</description></item><item><title>Gérez votre stockage avec Stratis (Publié dans Linux Pratique N°128)</title><link>https://www.morot.fr/gerez-votre-stockage-avec-stratis-publie-dans-linux-pratique-n128/</link><pubDate>Mon, 27 May 2024 20:05:16 +0000</pubDate><guid isPermaLink="false">http://www.morot.fr/?p=9141</guid><description>&lt;p&gt;Quand on parle de gestion du stockage local à un administrateur système Linux, il est généralement question de LVM et de filesystem XFS ou EXT4. A un niveau plus évolué, on trouvera ZFS qui n&amp;rsquo;est pas libre ou bien BTRFS qui tarde à tenir ses promesses. Stratis a pour vocation de proposer quelque chose de neuf avec l’existant !
Lors de la sortie de la RHEL8, RedHat a annoncé Stratis qui permet une gestion moderne et avancée du stockage proche de ce qu&amp;rsquo;offre ZFS. Cependant à la différence des filesystems traditionnels opérant avec un module kernel et une CLI, Stratis se base sur les briques existantes, device-mapper et XFS. Ces briques étant matures et éprouvées depuis des années et stratis opérant en espace utilisateur, cela a permis de nettement accélérer le développement.&lt;/p&gt;</description></item><item><title>Gnome clic droit et touchpad</title><link>https://www.morot.fr/gnome-clic-droit-et-touchpad/</link><pubDate>Thu, 04 Apr 2024 19:26:02 +0000</pubDate><guid isPermaLink="false">http://www.morot.fr/?p=9915</guid><description>&lt;p&gt;Dans certaines conditions en particulier avec les touchpad non synaptic le clic droit est désactivé par défaut.&lt;/p&gt;
&lt;p&gt;Pour lister les options du périphérique de pointage :&lt;/p&gt;
&lt;div class="highlight"&gt;&lt;pre tabindex="0" style="color:#f8f8f2;background-color:#272822;-moz-tab-size:4;-o-tab-size:4;tab-size:4;-webkit-text-size-adjust:none;"&gt;&lt;code class="language-fallback" data-lang="fallback"&gt;&lt;span style="display:flex;"&gt;&lt;span&gt;julien@gollum:~$ gsettings list-recursively org.gnome.desktop.peripherals.touchpad
&lt;/span&gt;&lt;/span&gt;&lt;span style="display:flex;"&gt;&lt;span&gt;org.gnome.desktop.peripherals.touchpad accel-profile &amp;#39;default&amp;#39;
&lt;/span&gt;&lt;/span&gt;&lt;span style="display:flex;"&gt;&lt;span&gt;org.gnome.desktop.peripherals.touchpad click-method &amp;#39;areas&amp;#39;
&lt;/span&gt;&lt;/span&gt;&lt;span style="display:flex;"&gt;&lt;span&gt;org.gnome.desktop.peripherals.touchpad disable-while-typing true
&lt;/span&gt;&lt;/span&gt;&lt;span style="display:flex;"&gt;&lt;span&gt;org.gnome.desktop.peripherals.touchpad edge-scrolling-enabled false
&lt;/span&gt;&lt;/span&gt;&lt;span style="display:flex;"&gt;&lt;span&gt;org.gnome.desktop.peripherals.touchpad left-handed &amp;#39;mouse&amp;#39;
&lt;/span&gt;&lt;/span&gt;&lt;span style="display:flex;"&gt;&lt;span&gt;org.gnome.desktop.peripherals.touchpad middle-click-emulation false
&lt;/span&gt;&lt;/span&gt;&lt;span style="display:flex;"&gt;&lt;span&gt;org.gnome.desktop.peripherals.touchpad natural-scroll true
&lt;/span&gt;&lt;/span&gt;&lt;span style="display:flex;"&gt;&lt;span&gt;org.gnome.desktop.peripherals.touchpad send-events &amp;#39;enabled&amp;#39;
&lt;/span&gt;&lt;/span&gt;&lt;span style="display:flex;"&gt;&lt;span&gt;org.gnome.desktop.peripherals.touchpad speed 0.31506849315068486
&lt;/span&gt;&lt;/span&gt;&lt;span style="display:flex;"&gt;&lt;span&gt;org.gnome.desktop.peripherals.touchpad tap-and-drag true
&lt;/span&gt;&lt;/span&gt;&lt;span style="display:flex;"&gt;&lt;span&gt;org.gnome.desktop.peripherals.touchpad tap-and-drag-lock false
&lt;/span&gt;&lt;/span&gt;&lt;span style="display:flex;"&gt;&lt;span&gt;org.gnome.desktop.peripherals.touchpad tap-button-map &amp;#39;default&amp;#39;
&lt;/span&gt;&lt;/span&gt;&lt;span style="display:flex;"&gt;&lt;span&gt;org.gnome.desktop.peripherals.touchpad tap-to-click true
&lt;/span&gt;&lt;/span&gt;&lt;span style="display:flex;"&gt;&lt;span&gt;org.gnome.desktop.peripherals.touchpad two-finger-scrolling-enabled true
&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;p&gt;Pour identifier le mode de clic actuel :&lt;/p&gt;</description></item><item><title>Docker swarm et NFS</title><link>https://www.morot.fr/docker-swarm-et-nfs/</link><pubDate>Tue, 19 Dec 2023 21:37:43 +0000</pubDate><guid isPermaLink="false">http://www.morot.fr/?p=9910</guid><description>&lt;p&gt;Docker Swarm fournit de manière native via son driver local, la possibilité de monter un système de fichiers partagé. En natif, nous allons retrouver NFS, Glusterfs ou SSHFS par exemple. Dans mon cas, ce sera NFS :&lt;/p&gt;
&lt;p&gt;Mon cluster Swarm est le suivant :&lt;/p&gt;
&lt;div class="highlight"&gt;&lt;pre tabindex="0" style="color:#f8f8f2;background-color:#272822;-moz-tab-size:4;-o-tab-size:4;tab-size:4;-webkit-text-size-adjust:none;"&gt;&lt;code class="language-fallback" data-lang="fallback"&gt;&lt;span style="display:flex;"&gt;&lt;span&gt;julien@swarm0:~$ docker node ls
&lt;/span&gt;&lt;/span&gt;&lt;span style="display:flex;"&gt;&lt;span&gt;ID HOSTNAME STATUS AVAILABILITY MANAGER STATUS ENGINE VERSION
&lt;/span&gt;&lt;/span&gt;&lt;span style="display:flex;"&gt;&lt;span&gt;uhr91g3ak37vhumtlpic86gwl * swarm0 Ready Drain Leader 24.0.7
&lt;/span&gt;&lt;/span&gt;&lt;span style="display:flex;"&gt;&lt;span&gt;qmsjds24sx5ed9ez9q8quas99 swarm1 Ready Active 24.0.7
&lt;/span&gt;&lt;/span&gt;&lt;span style="display:flex;"&gt;&lt;span&gt;uxigsaj9j6z0y6hdsyxz162my swarm2 Ready Active 24.0.7
&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;p&gt;Le volume partagé est construit depuis un serveur NFS en HA géré par mon rôle Ansible DRBD+Heartbeat.&lt;/p&gt;</description></item><item><title>Premiers pas avec Docker Swarm</title><link>https://www.morot.fr/premiers-pas-avec-docker-swarm/</link><pubDate>Tue, 21 Mar 2023 21:14:41 +0000</pubDate><guid isPermaLink="false">http://www.morot.fr/?p=9512</guid><description>&lt;h1 id="principe"&gt;Principe&lt;/h1&gt;
&lt;p&gt;Docker Swarm est un système d&amp;rsquo;orchestration de conteneur incorporé à Docker Engine. Moins populaire et complet de Kubernetes, il est aussi plus simple à utiliser.&lt;/p&gt;
&lt;p&gt;Un cluster Swarm est composé de deux types de noeuds :&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;Les manager nodes qui gèrent la configuration du cluster&lt;/li&gt;
&lt;li&gt;Les worker nodes qui offrent de la capacité de calcul&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;Swarm va permettre de déployer des services. Un service est l&amp;rsquo;état désiré d&amp;rsquo;un ou plusieurs conteneurs, les ports exposés, le nombre de conteneurs à instancier pour assurer le fonctionnement etc&amp;hellip; Le manager node va ensuite se charger de gérer l&amp;rsquo;orchestration sur les worker afin d&amp;rsquo;offire le fonctionnement désiré.&lt;/p&gt;</description></item><item><title>Stockage des sessions PHP dans memcached</title><link>https://www.morot.fr/stockage-des-sessions-php-dans-memcached/</link><pubDate>Sat, 04 Mar 2023 20:41:16 +0000</pubDate><guid isPermaLink="false">http://www.morot.fr/?p=9425</guid><description>&lt;h1 id="contexte-"&gt;Contexte :&lt;/h1&gt;
&lt;p&gt;Sans configuration particulière, les sesions PHP sont stockées dans un répertoire local sur le système de fichiers du serveur.
Cependant, dans le cas d&amp;rsquo;une infrastructure web composée de plusieurs serveurs derrière un load balancer, si l&amp;rsquo;utilisateur se trouve aiguillé sur un second serveur, il perd alors sa session.
Pour assurer une continuité du service, on peut utiliser un système de fichiers partagé ou un système en mémoire comme Memcached.&lt;/p&gt;</description></item><item><title>Memo Docker</title><link>https://www.morot.fr/memo-docker/</link><pubDate>Sun, 15 Nov 2020 21:41:43 +0000</pubDate><guid isPermaLink="false">http://www.morot.fr/?p=8710</guid><description>&lt;h1 id="dockerfile"&gt;Dockerfile&lt;/h1&gt;
&lt;p&gt;Image source :&lt;/p&gt;
&lt;div class="highlight"&gt;&lt;pre tabindex="0" style="color:#f8f8f2;background-color:#272822;-moz-tab-size:4;-o-tab-size:4;tab-size:4;-webkit-text-size-adjust:none;"&gt;&lt;code class="language-fallback" data-lang="fallback"&gt;&lt;span style="display:flex;"&gt;&lt;span&gt;FROM ubuntu:18.04
&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;p&gt;Ecouter sur un port :&lt;/p&gt;
&lt;div class="highlight"&gt;&lt;pre tabindex="0" style="color:#f8f8f2;background-color:#272822;-moz-tab-size:4;-o-tab-size:4;tab-size:4;-webkit-text-size-adjust:none;"&gt;&lt;code class="language-fallback" data-lang="fallback"&gt;&lt;span style="display:flex;"&gt;&lt;span&gt;EXPOSE 80
&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;p&gt;Ajouter des métadonnées :&lt;/p&gt;
&lt;div class="highlight"&gt;&lt;pre tabindex="0" style="color:#f8f8f2;background-color:#272822;-moz-tab-size:4;-o-tab-size:4;tab-size:4;-webkit-text-size-adjust:none;"&gt;&lt;code class="language-fallback" data-lang="fallback"&gt;&lt;span style="display:flex;"&gt;&lt;span&gt;LABEL &amp;#34;relase-date=20201115&amp;#34;
&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;p&gt;Lancer une commande :&lt;/p&gt;
&lt;div class="highlight"&gt;&lt;pre tabindex="0" style="color:#f8f8f2;background-color:#272822;-moz-tab-size:4;-o-tab-size:4;tab-size:4;-webkit-text-size-adjust:none;"&gt;&lt;code class="language-fallback" data-lang="fallback"&gt;&lt;span style="display:flex;"&gt;&lt;span&gt;RUN apt-get update &amp;amp;&amp;amp; \
&lt;/span&gt;&lt;/span&gt;&lt;span style="display:flex;"&gt;&lt;span&gt;apt-get dist-upgrade
&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;p&gt;Commande par défaut du conteneur :&lt;/p&gt;
&lt;div class="highlight"&gt;&lt;pre tabindex="0" style="color:#f8f8f2;background-color:#272822;-moz-tab-size:4;-o-tab-size:4;tab-size:4;-webkit-text-size-adjust:none;"&gt;&lt;code class="language-fallback" data-lang="fallback"&gt;&lt;span style="display:flex;"&gt;&lt;span&gt;CMD [&amp;#34;commande&amp;#34;, &amp;#34;arg1&amp;#34;, &amp;#34;arg2&amp;#34;]
&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;p&gt;Déclarer une variable d&amp;rsquo;environnement :&lt;/p&gt;
&lt;div class="highlight"&gt;&lt;pre tabindex="0" style="color:#f8f8f2;background-color:#272822;-moz-tab-size:4;-o-tab-size:4;tab-size:4;-webkit-text-size-adjust:none;"&gt;&lt;code class="language-fallback" data-lang="fallback"&gt;&lt;span style="display:flex;"&gt;&lt;span&gt;ENV APACHE_HTTP_PORT_NUMBER=8080
&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;p&gt;Ajouter un fichier :&lt;/p&gt;
&lt;div class="highlight"&gt;&lt;pre tabindex="0" style="color:#f8f8f2;background-color:#272822;-moz-tab-size:4;-o-tab-size:4;tab-size:4;-webkit-text-size-adjust:none;"&gt;&lt;code class="language-fallback" data-lang="fallback"&gt;&lt;span style="display:flex;"&gt;&lt;span&gt;COPY requirements.txt /tmp
&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;p&gt;Commande de lancement du conteneur :&lt;/p&gt;
&lt;div class="highlight"&gt;&lt;pre tabindex="0" style="color:#f8f8f2;background-color:#272822;-moz-tab-size:4;-o-tab-size:4;tab-size:4;-webkit-text-size-adjust:none;"&gt;&lt;code class="language-fallback" data-lang="fallback"&gt;&lt;span style="display:flex;"&gt;&lt;span&gt;ENTRYPOINT [&amp;#34;commande&amp;#34;, &amp;#34;arg1&amp;#34;, &amp;#34;arg2&amp;#34;]
&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;p&gt;Exposer un volume pour du stockage persistant :&lt;/p&gt;
&lt;div class="highlight"&gt;&lt;pre tabindex="0" style="color:#f8f8f2;background-color:#272822;-moz-tab-size:4;-o-tab-size:4;tab-size:4;-webkit-text-size-adjust:none;"&gt;&lt;code class="language-fallback" data-lang="fallback"&gt;&lt;span style="display:flex;"&gt;&lt;span&gt;VOLUME [&amp;#34;/data/myapp&amp;#34;]
&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;p&gt;Lancement sur un compte non privilégié :&lt;/p&gt;</description></item><item><title>Chiffrer une archive tar.gz</title><link>https://www.morot.fr/chiffrer-une-archive-tar-gz/</link><pubDate>Thu, 06 Aug 2020 19:38:52 +0000</pubDate><guid isPermaLink="false">http://www.morot.fr/?p=8665</guid><description>&lt;p&gt;Pour transférer des fichiers de façon sécurisée comme des certificats x509 avec leur clé :&lt;/p&gt;
&lt;div class="highlight"&gt;&lt;pre tabindex="0" style="color:#f8f8f2;background-color:#272822;-moz-tab-size:4;-o-tab-size:4;tab-size:4;-webkit-text-size-adjust:none;"&gt;&lt;code class="language-fallback" data-lang="fallback"&gt;&lt;span style="display:flex;"&gt;&lt;span&gt;tar -cvzf - /etc/ssl/ | openssl enc -e -aes-256-cbc -out certs.tar.gz
&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;p&gt;Et pour déchiffrer :&lt;/p&gt;
&lt;div class="highlight"&gt;&lt;pre tabindex="0" style="color:#f8f8f2;background-color:#272822;-moz-tab-size:4;-o-tab-size:4;tab-size:4;-webkit-text-size-adjust:none;"&gt;&lt;code class="language-fallback" data-lang="fallback"&gt;&lt;span style="display:flex;"&gt;&lt;span&gt;openssl enc -d -aes-256-cbc -in certs.tar.gz | tar xz
&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;p&gt;Dans les deux cas la clé de chiffrement est bien entendu demandée.&lt;/p&gt;</description></item><item><title>Installation d'un cluster Zimbra à 6 serveurs</title><link>https://www.morot.fr/installation-dun-cluster-zimbra-a-6-serveurs/</link><pubDate>Sat, 08 Feb 2020 10:18:12 +0000</pubDate><guid isPermaLink="false">http://www.morot.fr/?p=8193</guid><description>&lt;h1 id="introduction"&gt;Introduction&lt;/h1&gt;
&lt;p&gt;Dans cet article, nous allons voir comment installer un cluster Zimbra à six noeuds étape par étape. La répartition des rôles au sein de ce cluster permettra de fournir une architecture résistante aux pannes dans les limites de ce qui est permis par Zimbra. L&amp;rsquo;installation se fera avec Zimbra version 8.8.15, l&amp;rsquo;installation ayant peu changé depuis au moins la version 7, il ne devrait pas y avoir de changements pour les versions à venir de la 8.8.&lt;/p&gt;</description></item><item><title>Désactiver les stratégies de mots de passe SambaAD</title><link>https://www.morot.fr/desactiver-les-strategies-de-mots-de-passe-sambaad/</link><pubDate>Wed, 15 Jan 2020 20:27:03 +0000</pubDate><guid isPermaLink="false">http://www.morot.fr/?p=8170</guid><description>&lt;p&gt;Voici :&lt;/p&gt;
&lt;div class="highlight"&gt;&lt;pre tabindex="0" style="color:#f8f8f2;background-color:#272822;-moz-tab-size:4;-o-tab-size:4;tab-size:4;-webkit-text-size-adjust:none;"&gt;&lt;code class="language-gdscript3" data-lang="gdscript3"&gt;&lt;span style="display:flex;"&gt;&lt;span&gt;samba&lt;span style="color:#f92672"&gt;-&lt;/span&gt;&lt;span style="color:#66d9ef"&gt;tool&lt;/span&gt; domain passwordsettings set &lt;span style="color:#f92672"&gt;--&lt;/span&gt;complexity&lt;span style="color:#f92672"&gt;=&lt;/span&gt;off
&lt;/span&gt;&lt;/span&gt;&lt;span style="display:flex;"&gt;&lt;span&gt;samba&lt;span style="color:#f92672"&gt;-&lt;/span&gt;&lt;span style="color:#66d9ef"&gt;tool&lt;/span&gt; domain passwordsettings set &lt;span style="color:#f92672"&gt;--&lt;/span&gt;history&lt;span style="color:#f92672"&gt;-&lt;/span&gt;length&lt;span style="color:#f92672"&gt;=&lt;/span&gt;&lt;span style="color:#ae81ff"&gt;0&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span style="display:flex;"&gt;&lt;span&gt;samba&lt;span style="color:#f92672"&gt;-&lt;/span&gt;&lt;span style="color:#66d9ef"&gt;tool&lt;/span&gt; domain passwordsettings set &lt;span style="color:#f92672"&gt;--&lt;/span&gt;min&lt;span style="color:#f92672"&gt;-&lt;/span&gt;pwd&lt;span style="color:#f92672"&gt;-&lt;/span&gt;age&lt;span style="color:#f92672"&gt;=&lt;/span&gt;&lt;span style="color:#ae81ff"&gt;0&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span style="display:flex;"&gt;&lt;span&gt;samba&lt;span style="color:#f92672"&gt;-&lt;/span&gt;&lt;span style="color:#66d9ef"&gt;tool&lt;/span&gt; domain passwordsettings set &lt;span style="color:#f92672"&gt;--&lt;/span&gt;max&lt;span style="color:#f92672"&gt;-&lt;/span&gt;pwd&lt;span style="color:#f92672"&gt;-&lt;/span&gt;age&lt;span style="color:#f92672"&gt;=&lt;/span&gt;&lt;span style="color:#ae81ff"&gt;0&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span style="display:flex;"&gt;&lt;span&gt;samba&lt;span style="color:#f92672"&gt;-&lt;/span&gt;&lt;span style="color:#66d9ef"&gt;tool&lt;/span&gt; domain passwordsettings set &lt;span style="color:#f92672"&gt;--&lt;/span&gt;history&lt;span style="color:#f92672"&gt;-&lt;/span&gt;length&lt;span style="color:#f92672"&gt;=&lt;/span&gt;&lt;span style="color:#ae81ff"&gt;0&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span style="display:flex;"&gt;&lt;span&gt;samba&lt;span style="color:#f92672"&gt;-&lt;/span&gt;&lt;span style="color:#66d9ef"&gt;tool&lt;/span&gt; domain passwordsettings set &lt;span style="color:#f92672"&gt;--&lt;/span&gt;min&lt;span style="color:#f92672"&gt;-&lt;/span&gt;pwd&lt;span style="color:#f92672"&gt;-&lt;/span&gt;length&lt;span style="color:#f92672"&gt;=&lt;/span&gt;&lt;span style="color:#ae81ff"&gt;0&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;</description></item><item><title>Monter une partition dans un disque qcow2</title><link>https://www.morot.fr/monter-une-partition-dans-un-disque-qcow2/</link><pubDate>Mon, 13 Jan 2020 19:15:00 +0000</pubDate><guid isPermaLink="false">http://www.morot.fr/?p=8167</guid><description>&lt;p&gt;Installer les prérequis :&lt;/p&gt;
&lt;div class="highlight"&gt;&lt;pre tabindex="0" style="color:#f8f8f2;background-color:#272822;-moz-tab-size:4;-o-tab-size:4;tab-size:4;-webkit-text-size-adjust:none;"&gt;&lt;code class="language-gdscript3" data-lang="gdscript3"&gt;&lt;span style="display:flex;"&gt;&lt;span&gt;sudo apt &lt;span style="color:#f92672"&gt;-&lt;/span&gt;y install libguestfs&lt;span style="color:#f92672"&gt;-&lt;/span&gt;tools
&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;div class="highlight"&gt;&lt;pre tabindex="0" style="color:#f8f8f2;background-color:#272822;-moz-tab-size:4;-o-tab-size:4;tab-size:4;-webkit-text-size-adjust:none;"&gt;&lt;code class="language-fallback" data-lang="fallback"&gt;&lt;span style="display:flex;"&gt;&lt;span&gt;guestfish --ro -i -a /data/vms/images/116/vm-116-disk-0.qcow2
&lt;/span&gt;&lt;/span&gt;&lt;span style="display:flex;"&gt;&lt;span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span style="display:flex;"&gt;&lt;span&gt;Welcome to guestfish, the guest filesystem shell for
&lt;/span&gt;&lt;/span&gt;&lt;span style="display:flex;"&gt;&lt;span&gt;editing virtual machine filesystems and disk images.
&lt;/span&gt;&lt;/span&gt;&lt;span style="display:flex;"&gt;&lt;span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span style="display:flex;"&gt;&lt;span&gt;Type: ‘help’ for help on commands
&lt;/span&gt;&lt;/span&gt;&lt;span style="display:flex;"&gt;&lt;span&gt; ‘man’ to read the manual
&lt;/span&gt;&lt;/span&gt;&lt;span style="display:flex;"&gt;&lt;span&gt; ‘quit’ to quit the shell
&lt;/span&gt;&lt;/span&gt;&lt;span style="display:flex;"&gt;&lt;span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span style="display:flex;"&gt;&lt;span&gt;Système d&amp;#39;exploitation : Ubuntu 18.04.2 LTS
&lt;/span&gt;&lt;/span&gt;&lt;span style="display:flex;"&gt;&lt;span&gt;/dev/sda2 monté sur /
&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;p&gt;Lister les partitions :&lt;/p&gt;
&lt;div class="highlight"&gt;&lt;pre tabindex="0" style="color:#f8f8f2;background-color:#272822;-moz-tab-size:4;-o-tab-size:4;tab-size:4;-webkit-text-size-adjust:none;"&gt;&lt;code class="language-fallback" data-lang="fallback"&gt;&lt;span style="display:flex;"&gt;&lt;span&gt;&amp;gt; list-filesystems
&lt;/span&gt;&lt;/span&gt;&lt;span style="display:flex;"&gt;&lt;span&gt;/dev/sda1: unknown
&lt;/span&gt;&lt;/span&gt;&lt;span style="display:flex;"&gt;&lt;span&gt;/dev/sda2: ext4
&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;p&gt;Monter la partition /dev/sda2 du disque virtuel dans /mnt/vmdisk :&lt;/p&gt;</description></item><item><title>Vagrant</title><link>https://www.morot.fr/vagrant/</link><pubDate>Tue, 05 Feb 2019 19:26:30 +0000</pubDate><guid isPermaLink="false">http://www.morot.fr/?p=7413</guid><description>&lt;p&gt;Vagrant est un logiciel libre permettant de constuire rapidement des machines virtuelles (et depuis peu des conteneurs Docker) à destination de développeurs. Bien qu&amp;rsquo;utilisable également avec d&amp;rsquo;autres solutions de virtualisation, Virtualbox reste la solution privilégiée. Via une syntaxe de type code, il permet de faciliter la génération et la configuration de ces machines ainsi que leur post-configuration.&lt;/p&gt;
&lt;p&gt;Les exemples pas à pas sont tous disponibles sur mon Gitlab à l&amp;rsquo;adresse : &lt;a href="https://gitlab.com/julienmorot/vagrant-examples"&gt;https://gitlab.com/julienmorot/vagrant-examples&lt;/a&gt;. J&amp;rsquo;utiliserai pour tous les exemples la &amp;ldquo;box&amp;rdquo;, c&amp;rsquo;est à dire l&amp;rsquo;image système officielle Ubuntu 18.04 de l&amp;rsquo;équipe Ubuntu.&lt;/p&gt;</description></item><item><title>Yum et le résolveur de depéndances inverses...</title><link>https://www.morot.fr/yum-et-le-resolveur-de-dependances-inverses/</link><pubDate>Tue, 29 Jan 2019 20:31:27 +0000</pubDate><guid isPermaLink="false">http://www.morot.fr/?p=7423</guid><description>&lt;p&gt;Allez, petite blague avec le package libmspack qui n&amp;rsquo;a visiblement pas de dépendances :&lt;/p&gt;
&lt;div class="highlight"&gt;&lt;pre tabindex="0" style="color:#f8f8f2;background-color:#272822;-moz-tab-size:4;-o-tab-size:4;tab-size:4;-webkit-text-size-adjust:none;"&gt;&lt;code class="language-go" data-lang="go"&gt;&lt;span style="display:flex;"&gt;&lt;span&gt;&lt;span style="color:#a6e22e"&gt;rpm&lt;/span&gt; &lt;span style="color:#f92672"&gt;-&lt;/span&gt;&lt;span style="color:#a6e22e"&gt;q&lt;/span&gt; &lt;span style="color:#f92672"&gt;--&lt;/span&gt;&lt;span style="color:#a6e22e"&gt;whatrequires&lt;/span&gt; &lt;span style="color:#a6e22e"&gt;libmspack&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span style="display:flex;"&gt;&lt;span&gt;&lt;span style="color:#a6e22e"&gt;no&lt;/span&gt; &lt;span style="color:#f92672"&gt;package&lt;/span&gt; &lt;span style="color:#a6e22e"&gt;requires&lt;/span&gt; &lt;span style="color:#a6e22e"&gt;libmspack&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;p&gt;On devrait donc pouvoir supprimer ce package!&lt;/p&gt;
&lt;div class="highlight"&gt;&lt;pre tabindex="0" style="color:#f8f8f2;background-color:#272822;-moz-tab-size:4;-o-tab-size:4;tab-size:4;-webkit-text-size-adjust:none;"&gt;&lt;code class="language-gdscript3" data-lang="gdscript3"&gt;&lt;span style="display:flex;"&gt;&lt;span&gt;rpm &lt;span style="color:#f92672"&gt;-&lt;/span&gt;e libmspack
&lt;/span&gt;&lt;/span&gt;&lt;span style="display:flex;"&gt;&lt;span&gt;error: Failed dependencies:
&lt;/span&gt;&lt;/span&gt;&lt;span style="display:flex;"&gt;&lt;span&gt; libmspack&lt;span style="color:#f92672"&gt;.&lt;/span&gt;so&lt;span style="color:#f92672"&gt;.&lt;/span&gt;&lt;span style="color:#ae81ff"&gt;0&lt;/span&gt;()(&lt;span style="color:#ae81ff"&gt;64&lt;/span&gt;bit) is needed by (installed) open&lt;span style="color:#f92672"&gt;-&lt;/span&gt;vm&lt;span style="color:#f92672"&gt;-&lt;/span&gt;tools&lt;span style="color:#f92672"&gt;-&lt;/span&gt;&lt;span style="color:#ae81ff"&gt;10.2&lt;/span&gt;&lt;span style="color:#f92672"&gt;.&lt;/span&gt;&lt;span style="color:#ae81ff"&gt;5&lt;/span&gt;&lt;span style="color:#f92672"&gt;-&lt;/span&gt;&lt;span style="color:#ae81ff"&gt;3.&lt;/span&gt;el7&lt;span style="color:#f92672"&gt;.&lt;/span&gt;x86_64
&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;p&gt;Il y a effectivement une dépendance non pas sur le package mais sur la bibliothèque :&lt;/p&gt;
&lt;div class="highlight"&gt;&lt;pre tabindex="0" style="color:#f8f8f2;background-color:#272822;-moz-tab-size:4;-o-tab-size:4;tab-size:4;-webkit-text-size-adjust:none;"&gt;&lt;code class="language-gdscript3" data-lang="gdscript3"&gt;&lt;span style="display:flex;"&gt;&lt;span&gt;yum deplist open&lt;span style="color:#f92672"&gt;-&lt;/span&gt;vm&lt;span style="color:#f92672"&gt;-&lt;/span&gt;tools&lt;span style="color:#f92672"&gt;|&lt;/span&gt;grep &lt;span style="color:#f92672"&gt;-&lt;/span&gt;i libmspack
&lt;/span&gt;&lt;/span&gt;&lt;span style="display:flex;"&gt;&lt;span&gt; dependency: libmspack&lt;span style="color:#f92672"&gt;.&lt;/span&gt;so&lt;span style="color:#f92672"&gt;.&lt;/span&gt;&lt;span style="color:#ae81ff"&gt;0&lt;/span&gt;()(&lt;span style="color:#ae81ff"&gt;64&lt;/span&gt;bit)
&lt;/span&gt;&lt;/span&gt;&lt;span style="display:flex;"&gt;&lt;span&gt; provider: libmspack&lt;span style="color:#f92672"&gt;.&lt;/span&gt;x86_64 &lt;span style="color:#ae81ff"&gt;0.7&lt;/span&gt;&lt;span style="color:#f92672"&gt;-&lt;/span&gt;&lt;span style="color:#ae81ff"&gt;0.1&lt;/span&gt;&lt;span style="color:#f92672"&gt;.&lt;/span&gt;alpha&lt;span style="color:#f92672"&gt;.&lt;/span&gt;el7
&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;p&gt;Il ne faut donc pas utiliser yum mais repoquery:&lt;/p&gt;
&lt;div class="highlight"&gt;&lt;pre tabindex="0" style="color:#f8f8f2;background-color:#272822;-moz-tab-size:4;-o-tab-size:4;tab-size:4;-webkit-text-size-adjust:none;"&gt;&lt;code class="language-gdscript3" data-lang="gdscript3"&gt;&lt;span style="display:flex;"&gt;&lt;span&gt;repoquery &lt;span style="color:#f92672"&gt;-&lt;/span&gt;q &lt;span style="color:#f92672"&gt;--&lt;/span&gt;installed &lt;span style="color:#f92672"&gt;--&lt;/span&gt;whatrequires libmspack
&lt;/span&gt;&lt;/span&gt;&lt;span style="display:flex;"&gt;&lt;span&gt;libmspack&lt;span style="color:#f92672"&gt;-&lt;/span&gt;&lt;span style="color:#ae81ff"&gt;0&lt;/span&gt;:&lt;span style="color:#ae81ff"&gt;0.7&lt;/span&gt;&lt;span style="color:#f92672"&gt;-&lt;/span&gt;&lt;span style="color:#ae81ff"&gt;0.1&lt;/span&gt;&lt;span style="color:#f92672"&gt;.&lt;/span&gt;alpha&lt;span style="color:#f92672"&gt;.&lt;/span&gt;el7&lt;span style="color:#f92672"&gt;.&lt;/span&gt;x86_64
&lt;/span&gt;&lt;/span&gt;&lt;span style="display:flex;"&gt;&lt;span&gt;open&lt;span style="color:#f92672"&gt;-&lt;/span&gt;vm&lt;span style="color:#f92672"&gt;-&lt;/span&gt;tools&lt;span style="color:#f92672"&gt;-&lt;/span&gt;&lt;span style="color:#ae81ff"&gt;0&lt;/span&gt;:&lt;span style="color:#ae81ff"&gt;10.2&lt;/span&gt;&lt;span style="color:#f92672"&gt;.&lt;/span&gt;&lt;span style="color:#ae81ff"&gt;5&lt;/span&gt;&lt;span style="color:#f92672"&gt;-&lt;/span&gt;&lt;span style="color:#ae81ff"&gt;3.&lt;/span&gt;el7&lt;span style="color:#f92672"&gt;.&lt;/span&gt;x86_64
&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;</description></item><item><title>Yum : lister les paquets installés depuis un repo</title><link>https://www.morot.fr/yum-lister-les-paquets-installes-depuis-un-repo/</link><pubDate>Wed, 23 Jan 2019 18:22:31 +0000</pubDate><guid isPermaLink="false">http://www.morot.fr/?p=7409</guid><description>&lt;p&gt;Besoin du jour, connaitre les paquets installés depuis EPEL, j&amp;rsquo;ai trouvé deux façons de faire, sachant qu&amp;rsquo;avec yumdb il n&amp;rsquo;est pas nécessaire de jongler avec les options d&amp;rsquo;affichage pour avoir un listing lorsque les noms des paquets son trop longs :&lt;/p&gt;
&lt;div class="highlight"&gt;&lt;pre tabindex="0" style="color:#f8f8f2;background-color:#272822;-moz-tab-size:4;-o-tab-size:4;tab-size:4;-webkit-text-size-adjust:none;"&gt;&lt;code class="language-fallback" data-lang="fallback"&gt;&lt;span style="display:flex;"&gt;&lt;span&gt;yum list installed | grep @epel
&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;p&gt;Pour s&amp;rsquo;affranchir des sauts de lignes à 80 colonnes :&lt;/p&gt;
&lt;div class="highlight"&gt;&lt;pre tabindex="0" style="color:#f8f8f2;background-color:#272822;-moz-tab-size:4;-o-tab-size:4;tab-size:4;-webkit-text-size-adjust:none;"&gt;&lt;code class="language-fallback" data-lang="fallback"&gt;&lt;span style="display:flex;"&gt;&lt;span&gt;yum list installed | tr &amp;#34;\n&amp;#34; &amp;#34;#&amp;#34; | sed -e &amp;#39;s/# / /g&amp;#39; | tr &amp;#34;#&amp;#34; &amp;#34;\n&amp;#34; |grep @epel
&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;div class="highlight"&gt;&lt;pre tabindex="0" style="color:#f8f8f2;background-color:#272822;-moz-tab-size:4;-o-tab-size:4;tab-size:4;-webkit-text-size-adjust:none;"&gt;&lt;code class="language-fallback" data-lang="fallback"&gt;&lt;span style="display:flex;"&gt;&lt;span&gt;yumdb search from_repo epel
&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;</description></item><item><title>Mettre en forme du texte sous Bash</title><link>https://www.morot.fr/mettre-en-forme-du-texte-sous-bash/</link><pubDate>Wed, 16 Jan 2019 18:34:47 +0000</pubDate><guid isPermaLink="false">http://www.morot.fr/?p=7406</guid><description>&lt;p&gt;A chaque fois que je cherche à mettre du texte en forme pour mettre en valeur l&amp;rsquo;affichage de mes scripts sous bash je perds du temps retrouver mes petits. J&amp;rsquo;ai donc fini par faire ce petit script qui créé une palette facilitant le choix de la mise en forme.&lt;/p&gt;
&lt;p&gt;Voici la sortie :&lt;/p&gt;
&lt;p&gt;&lt;img src="https://www.morot.fr/mettre-en-forme-du-texte-sous-bash/bash-color-style-picker.png" alt="C:\Users\Julien\Desktop\bash-color-style-picker.png" width="1083" height="481" loading="eager"&gt;&lt;/p&gt;
&lt;p&gt;Et pour le code :&lt;/p&gt;
&lt;div class="highlight"&gt;&lt;pre tabindex="0" style="color:#f8f8f2;background-color:#272822;-moz-tab-size:4;-o-tab-size:4;tab-size:4;-webkit-text-size-adjust:none;"&gt;&lt;code class="language-bash" data-lang="bash"&gt;&lt;span style="display:flex;"&gt;&lt;span&gt;&lt;span style="color:#75715e"&gt;#!/bin/bash#man 4 console_codesecho &amp;#34;### Colorisation ###&amp;#34;
&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span style="display:flex;"&gt;&lt;span&gt;&lt;span style="color:#66d9ef"&gt;for&lt;/span&gt; bg in &lt;span style="color:#f92672"&gt;{&lt;/span&gt;40..47&lt;span style="color:#f92672"&gt;}&lt;/span&gt; &lt;span style="color:#f92672"&gt;{&lt;/span&gt;100..107&lt;span style="color:#f92672"&gt;}&lt;/span&gt; &lt;span style="color:#ae81ff"&gt;49&lt;/span&gt; ; &lt;span style="color:#66d9ef"&gt;do&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span style="display:flex;"&gt;&lt;span&gt;&lt;span style="color:#66d9ef"&gt;for&lt;/span&gt; fg in &lt;span style="color:#f92672"&gt;{&lt;/span&gt;30..37&lt;span style="color:#f92672"&gt;}&lt;/span&gt; &lt;span style="color:#f92672"&gt;{&lt;/span&gt;90..97&lt;span style="color:#f92672"&gt;}&lt;/span&gt; &lt;span style="color:#ae81ff"&gt;39&lt;/span&gt; ; &lt;span style="color:#66d9ef"&gt;do&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span style="display:flex;"&gt;&lt;span&gt;echo -ne &lt;span style="color:#e6db74"&gt;&amp;#34;\e[&lt;/span&gt;&lt;span style="color:#e6db74"&gt;${&lt;/span&gt;bg&lt;span style="color:#e6db74"&gt;}&lt;/span&gt;&lt;span style="color:#e6db74"&gt;;&lt;/span&gt;&lt;span style="color:#e6db74"&gt;${&lt;/span&gt;fg&lt;span style="color:#e6db74"&gt;}&lt;/span&gt;&lt;span style="color:#e6db74"&gt;m &lt;/span&gt;&lt;span style="color:#e6db74"&gt;${&lt;/span&gt;bg&lt;span style="color:#e6db74"&gt;}&lt;/span&gt;&lt;span style="color:#e6db74"&gt;;&lt;/span&gt;&lt;span style="color:#e6db74"&gt;${&lt;/span&gt;fg&lt;span style="color:#e6db74"&gt;}&lt;/span&gt;&lt;span style="color:#e6db74"&gt;\e[&lt;/span&gt;&lt;span style="color:#e6db74"&gt;${&lt;/span&gt;bg&lt;span style="color:#e6db74"&gt;}&lt;/span&gt;&lt;span style="color:#e6db74"&gt;;&lt;/span&gt;&lt;span style="color:#e6db74"&gt;${&lt;/span&gt;fg&lt;span style="color:#e6db74"&gt;}&lt;/span&gt;&lt;span style="color:#e6db74"&gt;m\e[0m\c&amp;#34;&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span style="display:flex;"&gt;&lt;span&gt;&lt;span style="color:#66d9ef"&gt;done&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span style="display:flex;"&gt;&lt;span&gt;echo &lt;span style="color:#e6db74"&gt;&amp;#34;&amp;#34;&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span style="display:flex;"&gt;&lt;span&gt;&lt;span style="color:#66d9ef"&gt;done&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span style="display:flex;"&gt;&lt;span&gt;echo &lt;span style="color:#e6db74"&gt;&amp;#34;&amp;#34;&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span style="display:flex;"&gt;&lt;span&gt;echo &lt;span style="color:#e6db74"&gt;&amp;#34;### Formattage ###&amp;#34;&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span style="display:flex;"&gt;&lt;span&gt;echo &lt;span style="color:#e6db74"&gt;&amp;#34;&amp;#34;&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span style="display:flex;"&gt;&lt;span&gt;echo -e &lt;span style="color:#e6db74"&gt;&amp;#34;\e[0mNormal&amp;#34;&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span style="display:flex;"&gt;&lt;span&gt;echo -e &lt;span style="color:#e6db74"&gt;&amp;#34;\e[1mGras\e[0m&amp;#34;&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span style="display:flex;"&gt;&lt;span&gt;echo -e &lt;span style="color:#e6db74"&gt;&amp;#34;\e[2mFaible\e[0m&amp;#34;&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span style="display:flex;"&gt;&lt;span&gt;echo -e &lt;span style="color:#e6db74"&gt;&amp;#34;\e[4mSouligné\e[0m&amp;#34;&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span style="display:flex;"&gt;&lt;span&gt;echo -e &lt;span style="color:#e6db74"&gt;&amp;#34;\e[5mClignotant\e[0m&amp;#34;&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span style="display:flex;"&gt;&lt;span&gt;echo -e &lt;span style="color:#e6db74"&gt;&amp;#34;\e[7mCouleurs inversées\e[0m&amp;#34;&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span style="display:flex;"&gt;&lt;span&gt;echo -e &lt;span style="color:#e6db74"&gt;&amp;#34;\e[8mMasqué\e[0m&amp;#34;&lt;/span&gt;exit &lt;span style="color:#ae81ff"&gt;0&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;</description></item><item><title>Mémo openssl</title><link>https://www.morot.fr/memo-openssl/</link><pubDate>Fri, 14 Dec 2018 21:45:26 +0000</pubDate><guid isPermaLink="false">http://www.morot.fr/?p=7397</guid><description>&lt;h2 id="création-"&gt;Création :&lt;/h2&gt;
&lt;p&gt;Générer une clé privée :&lt;/p&gt;
&lt;div class="highlight"&gt;&lt;pre tabindex="0" style="color:#f8f8f2;background-color:#272822;-moz-tab-size:4;-o-tab-size:4;tab-size:4;-webkit-text-size-adjust:none;"&gt;&lt;code class="language-fallback" data-lang="fallback"&gt;&lt;span style="display:flex;"&gt;&lt;span&gt;openssl genrsa -out key.pem 2048
&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;p&gt;Générer un CSR à partir d&amp;rsquo;une clé existante :&lt;/p&gt;
&lt;div class="highlight"&gt;&lt;pre tabindex="0" style="color:#f8f8f2;background-color:#272822;-moz-tab-size:4;-o-tab-size:4;tab-size:4;-webkit-text-size-adjust:none;"&gt;&lt;code class="language-fallback" data-lang="fallback"&gt;&lt;span style="display:flex;"&gt;&lt;span&gt;openssl req -out csr.csr -key key.pem -new
&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;p&gt;Générer une nouvelle clé et un CSR :&lt;/p&gt;
&lt;div class="highlight"&gt;&lt;pre tabindex="0" style="color:#f8f8f2;background-color:#272822;-moz-tab-size:4;-o-tab-size:4;tab-size:4;-webkit-text-size-adjust:none;"&gt;&lt;code class="language-fallback" data-lang="fallback"&gt;&lt;span style="display:flex;"&gt;&lt;span&gt;openssl req -out csr.csr -new -newkey rsa:2048 -nodes -keyout key.pem
&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;p&gt;Générer un certificat auto-signé :&lt;/p&gt;
&lt;div class="highlight"&gt;&lt;pre tabindex="0" style="color:#f8f8f2;background-color:#272822;-moz-tab-size:4;-o-tab-size:4;tab-size:4;-webkit-text-size-adjust:none;"&gt;&lt;code class="language-fallback" data-lang="fallback"&gt;&lt;span style="display:flex;"&gt;&lt;span&gt;openssl req -x509 -sha256 -nodes -newkey rsa:2048 -keyout key.pem -out certificate.crt -days 365
&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;p&gt;Générer un CSR sur la base d&amp;rsquo;un certificat et d&amp;rsquo;une clé existants :&lt;/p&gt;</description></item><item><title>Debconf, Preseed et troubleshooting.</title><link>https://www.morot.fr/debconf-preseed-et-troubleshooting/</link><pubDate>Mon, 06 Aug 2018 18:00:28 +0000</pubDate><guid isPermaLink="false">http://www.morot.fr/?p=6573</guid><description>&lt;p&gt;Dernièrement j&amp;rsquo;ai cherché à automatiser l&amp;rsquo;installation d&amp;rsquo;un serveur Openldap avec Puppet et un fichier de préconfiguration d&amp;rsquo;un package Debian.
L&amp;rsquo;installation était bloqué et un ps révélait que l&amp;rsquo;installation était bloquée sur la préconfiguration du package :&lt;/p&gt;
&lt;div class="highlight"&gt;&lt;pre tabindex="0" style="color:#f8f8f2;background-color:#272822;-moz-tab-size:4;-o-tab-size:4;tab-size:4;-webkit-text-size-adjust:none;"&gt;&lt;code class="language-fallback" data-lang="fallback"&gt;&lt;span style="display:flex;"&gt;&lt;span&gt;22165 ? Ss 0:00 /usr/bin/apt-get -q -y -o DPkg::Options::=--force-confold install slapd
&lt;/span&gt;&lt;/span&gt;&lt;span style="display:flex;"&gt;&lt;span&gt;22170 ? S 0:00 /bin/sh -c /usr/sbin/dpkg-preconfigure --apt || true
&lt;/span&gt;&lt;/span&gt;&lt;span style="display:flex;"&gt;&lt;span&gt;22171 ? R 96:21 /usr/bin/perl -w /usr/sbin/dpkg-preconfigure --apt
&lt;/span&gt;&lt;/span&gt;&lt;span style="display:flex;"&gt;&lt;span&gt;22173 ? Z 0:00 [dpkg-preconfigu]
&lt;/span&gt;&lt;/span&gt;&lt;span style="display:flex;"&gt;&lt;span&gt;22178 ? R 26:27 /bin/sh /tmp/slapd.config.JDMbkD configure
&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;p&gt;Pour le debug, première étape, préchargeons notre fichier preseed dans debconf :&lt;/p&gt;</description></item><item><title>Authentification LDAP sous Ubuntu 16.04 LTS</title><link>https://www.morot.fr/authentification-ldap-sous-ubuntu-16-04-lts/</link><pubDate>Fri, 18 May 2018 16:36:53 +0000</pubDate><guid isPermaLink="false">http://www.morot.fr/?p=6536</guid><description>&lt;p&gt;Voici un petit tuto très succint pour mettre en place rapidement une authentification LDAP. Je ne m&amp;rsquo;attarderai pas sur la sécurité, la réplication etc&amp;hellip;&lt;/p&gt;
&lt;p&gt;On part d&amp;rsquo;un serveur vierge, avec le réseau configuré. Si votre domaine DNS c&amp;rsquo;est toto.local, le DIT LDAP sera dc=toto,dc=local. Pour moi ce sera dc=morot,dc=fr C&amp;rsquo;est parti :&lt;/p&gt;
&lt;div class="highlight"&gt;&lt;pre tabindex="0" style="color:#f8f8f2;background-color:#272822;-moz-tab-size:4;-o-tab-size:4;tab-size:4;-webkit-text-size-adjust:none;"&gt;&lt;code class="language-fallback" data-lang="fallback"&gt;&lt;span style="display:flex;"&gt;&lt;span&gt;apt install slapd ldap-utils
&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;p&gt;On met en place nos OU qui contiendront les utilisateurs et les groupes (faire un control+D à la fin de la saisie) :&lt;/p&gt;</description></item><item><title>Logger l'ensemble des commandes shell lancées par les utilisateurs</title><link>https://www.morot.fr/logger-lensemble-des-commandes-shell-lancees-par-les-utilisateurs/</link><pubDate>Tue, 09 Jan 2018 20:24:57 +0000</pubDate><guid isPermaLink="false">http://www.morot.fr/?p=6512</guid><description>&lt;p&gt;Un pré-requis à une bonne politique de sécurité consiste à tracer l&amp;rsquo;ensemble des commandes des utilisateurs. De nombreuses solutions passent par la modification de la variable d&amp;rsquo;environnement &lt;strong&gt;PROMPT_COMMAND&lt;/strong&gt; dans le /etc/bash.bashrc. Problème évident, c&amp;rsquo;est pour bash uniquement entre autres défauts.&lt;/p&gt;
&lt;p&gt;Un meilleur moyen de journaliser les commandes shell lancées par les utilisateurs consiste à procéder à la surveillance au niveau kernel et surveiller les appels systèmes execve. Pour cela, il suffit d&amp;rsquo;installer le package Ubuntu &lt;strong&gt;auditd&lt;/strong&gt; ou &lt;strong&gt;audit&lt;/strong&gt; sous RHEL/CentOS et de définir ces règles attendues dans le fichier &lt;strong&gt;/etc/audit/audit.rules&lt;/strong&gt; :&lt;/p&gt;</description></item><item><title>SSLH : Faire cohabiter un serveur Web et SSH sur le même port</title><link>https://www.morot.fr/sslh-faire-cohabiter-un-serveur-web-et-ssh-sur-le-meme-port/</link><pubDate>Mon, 01 Jan 2018 18:49:11 +0000</pubDate><guid isPermaLink="false">http://www.morot.fr/?p=6500</guid><description>&lt;p&gt;SSLH est un outil qui permet de multiplexer le port 443 afin notamment de contourner certains firewalls qui bloquent le port SSH. Typiquement, en HTTP c&amp;rsquo;est le client qui communique en premier quand pour le protocole SSH c&amp;rsquo;est le serveur qui envoie le premier message. SSLH utilise ces différences de fonctionnement via des sondes (pour XMPP, OpenVPN&amp;hellip;) afin de fournir cette fonctionnalité de multiplexage. Dans mon cas, je veux partager le port 443 avec un serveur Apache.&lt;/p&gt;</description></item><item><title>Cluster multi master pour MariaDB (et MySQL...) avec Galera</title><link>https://www.morot.fr/cluster-multi-master-pour-mariadb-et-mysql-avec-galera/</link><pubDate>Sun, 03 Dec 2017 21:25:02 +0000</pubDate><guid isPermaLink="false">http://www.morot.fr/?p=6480</guid><description>&lt;h2 id="petite-présentation"&gt;Petite présentation&lt;/h2&gt;
&lt;p&gt;Galera est une surcouche de MariaDB permettant de mettre en œuvre un cluster au dessus du moteur de stockage InnoDB pour permettre un environnement hautement disponible :&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;Réplication multi master&lt;/li&gt;
&lt;li&gt;Réplication synchrone&lt;/li&gt;
&lt;li&gt;Chaque nœud du cluster est utilisable pour un accès lecture/écriture&lt;/li&gt;
&lt;li&gt;La réplication est supportée au travers d&amp;rsquo;un lien WAN et de la latence que ce type de lien peut comporter&lt;/li&gt;
&lt;li&gt;Contrôle d&amp;rsquo;admission au cluster intégré&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;Dans une architecture Galera, les clients SQL vont donc attaquer le cluster via un Load Balancer comme HAProxy qui sera lui-même hautement disponible :&lt;/p&gt;</description></item><item><title>Bash : partitionnement automatisé dans un script</title><link>https://www.morot.fr/bash-partitionnement-automatise-dans-un-script/</link><pubDate>Wed, 18 Oct 2017 17:30:39 +0000</pubDate><guid isPermaLink="false">http://www.morot.fr/?p=6454</guid><description>&lt;p&gt;Pour du partitionnement MBR standard :&lt;/p&gt;
&lt;div class="highlight"&gt;&lt;pre tabindex="0" style="color:#f8f8f2;background-color:#272822;-moz-tab-size:4;-o-tab-size:4;tab-size:4;-webkit-text-size-adjust:none;"&gt;&lt;code class="language-fallback" data-lang="fallback"&gt;&lt;span style="display:flex;"&gt;&lt;span&gt;apt-get -y install lvm2
&lt;/span&gt;&lt;/span&gt;&lt;span style="display:flex;"&gt;&lt;span&gt;(echo o; echo n; echo p; echo 1; echo ; echo; echo t; echo 8E; echo w) | fdisk /dev/sdc
&lt;/span&gt;&lt;/span&gt;&lt;span style="display:flex;"&gt;&lt;span&gt;pvcreate /dev/sdc1
&lt;/span&gt;&lt;/span&gt;&lt;span style="display:flex;"&gt;&lt;span&gt;vgcreate VG-BACKUP /dev/sdc1
&lt;/span&gt;&lt;/span&gt;&lt;span style="display:flex;"&gt;&lt;span&gt;lvcreate -l 100%VG -n LV-BACKUP VG-BACKUP
&lt;/span&gt;&lt;/span&gt;&lt;span style="display:flex;"&gt;&lt;span&gt;mkfs.ext4 -m 0 -i 10240 -J size=400 -b 4096 /dev/mapper/VG--BACKUP-LV--BACKUP
&lt;/span&gt;&lt;/span&gt;&lt;span style="display:flex;"&gt;&lt;span&gt;mkdir /backup
&lt;/span&gt;&lt;/span&gt;&lt;span style="display:flex;"&gt;&lt;span&gt;echo &amp;#34;/dev/mapper/VG--BACKUP-LV--BACKUP /backup ext4 defaults 0 0&amp;#34; &amp;gt;&amp;gt; /etc/fstab
&lt;/span&gt;&lt;/span&gt;&lt;span style="display:flex;"&gt;&lt;span&gt;mount /backup
&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;p&gt;Pour du GPT, indispensable pour des partitions de plus de 2To :&lt;/p&gt;</description></item><item><title>OpenLDAP : corriger les ldif_read_file: checksum error</title><link>https://www.morot.fr/openldap-corriger-les-ldif_read_file-checksum-error/</link><pubDate>Wed, 11 Oct 2017 17:29:56 +0000</pubDate><guid isPermaLink="false">http://www.morot.fr/?p=6445</guid><description>&lt;p&gt;Si comme moi il vous arrive de modifier les fichiers de configuration ldif d&amp;rsquo;openldap à la main plutôt que de les modifier en injectant un LDIF, cela génère des jolies erreurs non bloquantes comme ceci :&lt;/p&gt;
&lt;div class="highlight"&gt;&lt;pre tabindex="0" style="color:#f8f8f2;background-color:#272822;-moz-tab-size:4;-o-tab-size:4;tab-size:4;-webkit-text-size-adjust:none;"&gt;&lt;code class="language-fallback" data-lang="fallback"&gt;&lt;span style="display:flex;"&gt;&lt;span&gt;ldif_read_file: checksum error on &amp;#34;/etc/ldap/slapd.d/cn=config/olcDatabase={1}hdb.ldif&amp;#34;
&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;p&gt;Pour corriger, rien de plus simple, on installe un utilitaire et on génère le nouveau CRC :&lt;/p&gt;
&lt;div class="highlight"&gt;&lt;pre tabindex="0" style="color:#f8f8f2;background-color:#272822;-moz-tab-size:4;-o-tab-size:4;tab-size:4;-webkit-text-size-adjust:none;"&gt;&lt;code class="language-fallback" data-lang="fallback"&gt;&lt;span style="display:flex;"&gt;&lt;span&gt;apt-get install libarchive-zip-perl
&lt;/span&gt;&lt;/span&gt;&lt;span style="display:flex;"&gt;&lt;span&gt;crc32 &amp;lt;(cat /etc/ldap/slapd.d/cn=config/olcDatabase={1}hdb.ldif | tail -n +3)
&lt;/span&gt;&lt;/span&gt;&lt;span style="display:flex;"&gt;&lt;span&gt;a93b4163
&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;p&gt;Il ne reste plus qu&amp;rsquo;à modifier l&amp;rsquo;en-tête du fichier en erreur, ici /etc/ldap/slapd.d/cn=config/olcDatabase={1}hdb.ldif avec vim (c&amp;rsquo;est autorisé cette fois!) et à indiquer le checksum obtenu.&lt;/p&gt;</description></item><item><title>HAProxy : gérer la persistance des sessions lorsque l'application n'est pas conçue pour</title><link>https://www.morot.fr/haproxy-gerer-la-persistance-des-sessions-lorsque-lapplication-nest-pas-concue-pour/</link><pubDate>Tue, 18 Apr 2017 20:37:05 +0000</pubDate><guid isPermaLink="false">http://www.morot.fr/?p=4864</guid><description>&lt;p&gt;Le problème avec les sessions HTTP c&amp;rsquo;est qu&amp;rsquo;elles sont complètement décorrélées des sessions TCP. Sans load balancer, ce n&amp;rsquo;est pas un problème, par contre dans une architecture multi serveur, un utilisateur peut être redirigé vers un serveur web qui n&amp;rsquo;est pas au courant de la session HTTP. Ce cas se produit typiquement avec un algorithme de type round robin.&lt;/p&gt;
&lt;p&gt;Ainsi, un utilisateur peut lors de la première connexion être authentifié sur un serveur puis lors de l&amp;rsquo;accès suivant être redirigé vers le second serveur moins chargé.&lt;/p&gt;</description></item><item><title>LibreNMS, quelques notes de mise en oeuvre.</title><link>https://www.morot.fr/librenms-quelques-notes-de-mise-en-oeuvre/</link><pubDate>Mon, 16 Jan 2017 22:05:09 +0000</pubDate><guid isPermaLink="false">http://www.morot.fr/?p=4850</guid><description>&lt;p&gt;Il y a quelques temps, je me suis mis en tête de trouver une alternative à Cacti pour effectuer la métrologie d&amp;rsquo;une plateforme d&amp;rsquo;environ 70 serveurs. Nous utilisions Cacti par habitude d&amp;rsquo;anciens Linuxiens sans jusqu&amp;rsquo;ici s&amp;rsquo;être mis en quête d&amp;rsquo;un outil plus simple pour superviser une plateforme via SNMP. En outre Cacti n&amp;rsquo;est plus que moyennement maintenu et surtout possède l&amp;rsquo;énorme défaut d&amp;rsquo;être horriblement complexe juste pour ajouter un graphique personnalisé dès que le generic OID template ne fait plus le job.&lt;/p&gt;</description></item><item><title>Loadbalancer hautement disponible avec HAProxy et Keepalived</title><link>https://www.morot.fr/loadbalancer-hautement-disponible-avec-haproxy-et-keepalived/</link><pubDate>Sun, 18 Sep 2016 20:44:31 +0000</pubDate><guid isPermaLink="false">http://www.morot.fr/?p=4623</guid><description>&lt;h1 id="introduction"&gt;Introduction&lt;/h1&gt;
&lt;p&gt;Cet article est une version actualisée de ce que j&amp;rsquo;avais publié &lt;a href="https://www.morot.fr/ha-avec-keepalived-glmf-163/"&gt;dans GNU/Linux France Magazine numéro 163&lt;/a&gt;.&lt;/p&gt;
&lt;p&gt;Voici ce que l&amp;rsquo;on souhaite obtenir :&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;Un service utilisateur hautement disponible avec des serveurs de type Postfix, Apache, Zimbra, Dovecot, etc&amp;hellip;&lt;/li&gt;
&lt;li&gt;Les serveurs de ces backends devront être en mode actif/actif afin de pouvoir fournir un système apte à monter en charge&lt;/li&gt;
&lt;li&gt;La haute disponibilité sera gérée par des load balancer qui ne devront pas être eux mêmes un SPOF, ils seront donc également load balancés&lt;/li&gt;
&lt;li&gt;Et pour être en phase avec la législation, les backends devront avoir en visibilité les adresses IP des clients et ce contrairement à un certain nombre d&amp;rsquo;architectures où le load balancer effectue du NAT et donc masque l&amp;rsquo;IP source.&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;Ces fonctionnalités sont disponibles via KeepAlived pour la HA du load balancer et HAProxy pour la HA des backends. Le mode transparent est lui accessible depuis le récent module kernel TPROXY dsponible sous Ubuntu depuis la release LTS 16.04.&lt;/p&gt;</description></item><item><title>Cockpit</title><link>https://www.morot.fr/cockpit/</link><pubDate>Mon, 18 Jan 2016 22:07:02 +0000</pubDate><guid isPermaLink="false">http://www.morot.fr/?p=3696</guid><description>&lt;p&gt;Fedora Cockpit est un petit outil d&amp;rsquo;administration de serveur offrant au travers d&amp;rsquo;une interface web un monitoring des ressources, la possibilité de gérer ses utilisateurs ainsi qu&amp;rsquo;une console JS. C&amp;rsquo;est taillé pour systemd mais ça peut s&amp;rsquo;installer sous Ubuntu 14.04 :&lt;/p&gt;
&lt;div class="highlight"&gt;&lt;pre tabindex="0" style="color:#f8f8f2;background-color:#272822;-moz-tab-size:4;-o-tab-size:4;tab-size:4;-webkit-text-size-adjust:none;"&gt;&lt;code class="language-fallback" data-lang="fallback"&gt;&lt;span style="display:flex;"&gt;&lt;span&gt;add-apt-repository ppa:jpsutton/cockpit
&lt;/span&gt;&lt;/span&gt;&lt;span style="display:flex;"&gt;&lt;span&gt;apt-get update
&lt;/span&gt;&lt;/span&gt;&lt;span style="display:flex;"&gt;&lt;span&gt;apt-get -y install cockpit glib-networking pcp
&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;p&gt;Lancement manuel :&lt;/p&gt;
&lt;div class="highlight"&gt;&lt;pre tabindex="0" style="color:#f8f8f2;background-color:#272822;-moz-tab-size:4;-o-tab-size:4;tab-size:4;-webkit-text-size-adjust:none;"&gt;&lt;code class="language-fallback" data-lang="fallback"&gt;&lt;span style="display:flex;"&gt;&lt;span&gt;/usr/sbin/remotectl certificate --ensure --user=root --group=
&lt;/span&gt;&lt;/span&gt;&lt;span style="display:flex;"&gt;&lt;span&gt;/usr/libexec/cockpit-ws
&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;p&gt;Cockpit est ensuite accessible en https sur le port 9090 par défaut.&lt;/p&gt;</description></item><item><title>HHVM, l'autre interpréteur PHP!</title><link>https://www.morot.fr/hhvm-lautre-interpreteur-php/</link><pubDate>Mon, 11 Jan 2016 21:54:06 +0000</pubDate><guid isPermaLink="false">http://www.morot.fr/?p=3673</guid><description>&lt;p&gt;HHVM est un interpréteur pour le langage PHP créé par Facebook. Il gère actuellement un sous ensemble confortable de PHP5 et le langage de programmation Hack dérivé de PHP. Les différences de fonctionnement entre Hack et PHP &lt;a href="https://docs.hhvm.com/hhvm/inconsistencies/introduction"&gt;sont documentées sur le site officiel.&lt;/a&gt; De même, &lt;a href="https://docs.hhvm.com/hhvm/extensions/introduction"&gt;la plupart des modules PHP sont fonctionnels avec HHVM.&lt;/a&gt;&lt;/p&gt;
&lt;h2 id="installation-"&gt;Installation :&lt;/h2&gt;
&lt;p&gt;Le projet HHVM a le bon goût de proposer des paquets Debian et Ubuntu, par conséquent :&lt;/p&gt;</description></item><item><title>Migrer de Samba3 vers Samba4 (publié dans GLMF 154)</title><link>https://www.morot.fr/migrer-de-samba3-vers-samba4-publie-dans-glmf-154/</link><pubDate>Sun, 13 Dec 2015 20:28:50 +0000</pubDate><guid isPermaLink="false">http://www.morot.fr/?p=2183</guid><description>&lt;h1 id="migrer-un-domaine-samba3-vers-samba4"&gt;Migrer un domaine Samba3 vers Samba4&lt;/h1&gt;
&lt;p&gt;Dans un précédent article, j&amp;rsquo;avais abordé le fonctionnement de l&amp;rsquo;Active Directory et sa mise en place avec Samba4. De nombreux domaines sont en place sous Samba3 mais les limites de cette technologie font qu&amp;rsquo;il devient grand temps pour un certain nombre d&amp;rsquo;administrateurs de migrer vers un domaine de type Active Directory. Nous allons voir dans cet article ce que propose Samba4 actuellement pour ne pas avoir besoin de mettre en œuvre des serveurs sous Windows.&lt;/p&gt;</description></item><item><title>Installation de FusionDirectory depuis les sources sous Ubuntu 14.04</title><link>https://www.morot.fr/installation-de-fusiondirectory-depuis-les-sources-sous-ubuntu-14-04/</link><pubDate>Sun, 15 Nov 2015 16:40:45 +0000</pubDate><guid isPermaLink="false">http://www.morot.fr/?p=3596</guid><description>&lt;p&gt;Après qu&amp;rsquo;un collègue et ami m&amp;rsquo;ait vanté les mérites de fusion directory, j&amp;rsquo;ai eu envie d&amp;rsquo;y jeter un oeil à nouveau. La dernière fois que j&amp;rsquo;avais joué avec, le projet portait encore le nom de Gosa2. Il s&amp;rsquo;avère que FD n&amp;rsquo;est pas packagé pour Ubuntu 14.04 (bien que je soupçonne les paquets Debian d&amp;rsquo;être compatibles), du coup je suis parti des sources. La doc étant un peu imprécise, j&amp;rsquo;ai souhaité en faire une version succincte mais actualisée.&lt;/p&gt;</description></item><item><title>Nginx, VirtualHost, Zarafa et Active Sync</title><link>https://www.morot.fr/nginx-virtualhost-zarafa-et-active-sync/</link><pubDate>Sun, 16 Feb 2014 12:53:35 +0000</pubDate><guid isPermaLink="false">http://www.morot.fr/?p=631</guid><description>&lt;p&gt;Ca pourrait servir à d&amp;rsquo;autres mais comme j&amp;rsquo;ai eu un chouïa du mal à tout faire fonctionner, la documentation et les packages étant exclusivement centrés sur Apache, voici ma configuration du vhost nginx.&lt;/p&gt;
&lt;div class="highlight"&gt;&lt;pre tabindex="0" style="color:#f8f8f2;background-color:#272822;-moz-tab-size:4;-o-tab-size:4;tab-size:4;-webkit-text-size-adjust:none;"&gt;&lt;code class="language-gdscript3" data-lang="gdscript3"&gt;&lt;span style="display:flex;"&gt;&lt;span&gt;server {
&lt;/span&gt;&lt;/span&gt;&lt;span style="display:flex;"&gt;&lt;span&gt; root &lt;span style="color:#f92672"&gt;/&lt;/span&gt;usr&lt;span style="color:#f92672"&gt;/&lt;/span&gt;share&lt;span style="color:#f92672"&gt;/&lt;/span&gt;zarafa&lt;span style="color:#f92672"&gt;-&lt;/span&gt;webapp&lt;span style="color:#f92672"&gt;/&lt;/span&gt;;
&lt;/span&gt;&lt;/span&gt;&lt;span style="display:flex;"&gt;&lt;span&gt; index index&lt;span style="color:#f92672"&gt;.&lt;/span&gt;php index&lt;span style="color:#f92672"&gt;.&lt;/span&gt;html index&lt;span style="color:#f92672"&gt;.&lt;/span&gt;htm;
&lt;/span&gt;&lt;/span&gt;&lt;span style="display:flex;"&gt;&lt;span&gt; server_name mail&lt;span style="color:#f92672"&gt;.&lt;/span&gt;morot&lt;span style="color:#f92672"&gt;.&lt;/span&gt;fr;
&lt;/span&gt;&lt;/span&gt;&lt;span style="display:flex;"&gt;&lt;span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span style="display:flex;"&gt;&lt;span&gt; location &lt;span style="color:#f92672"&gt;/&lt;/span&gt; {
&lt;/span&gt;&lt;/span&gt;&lt;span style="display:flex;"&gt;&lt;span&gt; index index&lt;span style="color:#f92672"&gt;.&lt;/span&gt;php;
&lt;/span&gt;&lt;/span&gt;&lt;span style="display:flex;"&gt;&lt;span&gt; }
&lt;/span&gt;&lt;/span&gt;&lt;span style="display:flex;"&gt;&lt;span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span style="display:flex;"&gt;&lt;span&gt; location &lt;span style="color:#f92672"&gt;/&lt;/span&gt;Microsoft&lt;span style="color:#f92672"&gt;-&lt;/span&gt;Server&lt;span style="color:#f92672"&gt;-&lt;/span&gt;ActiveSync {
&lt;/span&gt;&lt;/span&gt;&lt;span style="display:flex;"&gt;&lt;span&gt; alias &lt;span style="color:#f92672"&gt;/&lt;/span&gt;usr&lt;span style="color:#f92672"&gt;/&lt;/span&gt;share&lt;span style="color:#f92672"&gt;/&lt;/span&gt;zarafa&lt;span style="color:#f92672"&gt;-&lt;/span&gt;webapp&lt;span style="color:#f92672"&gt;/&lt;/span&gt;z&lt;span style="color:#f92672"&gt;-&lt;/span&gt;push&lt;span style="color:#f92672"&gt;/&lt;/span&gt;index&lt;span style="color:#f92672"&gt;.&lt;/span&gt;php;
&lt;/span&gt;&lt;/span&gt;&lt;span style="display:flex;"&gt;&lt;span&gt; fastcgi_pass unix:&lt;span style="color:#f92672"&gt;/&lt;/span&gt;&lt;span style="color:#66d9ef"&gt;var&lt;/span&gt;&lt;span style="color:#f92672"&gt;/&lt;/span&gt;run&lt;span style="color:#f92672"&gt;/&lt;/span&gt;php5&lt;span style="color:#f92672"&gt;-&lt;/span&gt;fpm&lt;span style="color:#f92672"&gt;.&lt;/span&gt;sock;
&lt;/span&gt;&lt;/span&gt;&lt;span style="display:flex;"&gt;&lt;span&gt; fastcgi_param SCRIPT_FILENAME
&lt;/span&gt;&lt;/span&gt;&lt;span style="display:flex;"&gt;&lt;span&gt; &lt;span style="color:#f92672"&gt;$&lt;/span&gt;document_root&lt;span style="color:#f92672"&gt;$&lt;/span&gt;fastcgi_script_name;
&lt;/span&gt;&lt;/span&gt;&lt;span style="display:flex;"&gt;&lt;span&gt; fastcgi_index index&lt;span style="color:#f92672"&gt;.&lt;/span&gt;php;
&lt;/span&gt;&lt;/span&gt;&lt;span style="display:flex;"&gt;&lt;span&gt; include fastcgi_params;
&lt;/span&gt;&lt;/span&gt;&lt;span style="display:flex;"&gt;&lt;span&gt; }
&lt;/span&gt;&lt;/span&gt;&lt;span style="display:flex;"&gt;&lt;span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span style="display:flex;"&gt;&lt;span&gt; &lt;span style="color:#75715e"&gt;# pass the PHP scripts to FastCGI server listening on 127.0.0.1:9000&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span style="display:flex;"&gt;&lt;span&gt; &lt;span style="color:#75715e"&gt;#&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span style="display:flex;"&gt;&lt;span&gt; location &lt;span style="color:#f92672"&gt;~&lt;/span&gt; &lt;span style="color:#f92672"&gt;.&lt;/span&gt;php&lt;span style="color:#f92672"&gt;$&lt;/span&gt; {
&lt;/span&gt;&lt;/span&gt;&lt;span style="display:flex;"&gt;&lt;span&gt; try_files &lt;span style="color:#f92672"&gt;$&lt;/span&gt;uri &lt;span style="color:#f92672"&gt;=&lt;/span&gt;&lt;span style="color:#ae81ff"&gt;404&lt;/span&gt;;
&lt;/span&gt;&lt;/span&gt;&lt;span style="display:flex;"&gt;&lt;span&gt; fastcgi_pass unix:&lt;span style="color:#f92672"&gt;/&lt;/span&gt;&lt;span style="color:#66d9ef"&gt;var&lt;/span&gt;&lt;span style="color:#f92672"&gt;/&lt;/span&gt;run&lt;span style="color:#f92672"&gt;/&lt;/span&gt;php5&lt;span style="color:#f92672"&gt;-&lt;/span&gt;fpm&lt;span style="color:#f92672"&gt;.&lt;/span&gt;sock;
&lt;/span&gt;&lt;/span&gt;&lt;span style="display:flex;"&gt;&lt;span&gt; fastcgi_param SCRIPT_FILENAME
&lt;/span&gt;&lt;/span&gt;&lt;span style="display:flex;"&gt;&lt;span&gt; &lt;span style="color:#f92672"&gt;$&lt;/span&gt;document_root&lt;span style="color:#f92672"&gt;$&lt;/span&gt;fastcgi_script_name;
&lt;/span&gt;&lt;/span&gt;&lt;span style="display:flex;"&gt;&lt;span&gt; fastcgi_index index&lt;span style="color:#f92672"&gt;.&lt;/span&gt;php;
&lt;/span&gt;&lt;/span&gt;&lt;span style="display:flex;"&gt;&lt;span&gt; include fastcgi_params;
&lt;/span&gt;&lt;/span&gt;&lt;span style="display:flex;"&gt;&lt;span&gt; }
&lt;/span&gt;&lt;/span&gt;&lt;span style="display:flex;"&gt;&lt;span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span style="display:flex;"&gt;&lt;span&gt; location &lt;span style="color:#f92672"&gt;~&lt;/span&gt; &lt;span style="color:#f92672"&gt;/.&lt;/span&gt;ht {
&lt;/span&gt;&lt;/span&gt;&lt;span style="display:flex;"&gt;&lt;span&gt; deny all;
&lt;/span&gt;&lt;/span&gt;&lt;span style="display:flex;"&gt;&lt;span&gt; }
&lt;/span&gt;&lt;/span&gt;&lt;span style="display:flex;"&gt;&lt;span&gt;}
&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;</description></item><item><title>Authentification LDAP sous Ubuntu 12.04 LTS</title><link>https://www.morot.fr/authentification-ldap-sous-ubuntu-12-04-lts/</link><pubDate>Sat, 08 Feb 2014 10:59:27 +0000</pubDate><guid isPermaLink="false">http://www.morot.fr/?p=584</guid><description>&lt;p&gt;Voici un petit tuto très succint pour mettre en place rapidement une authentification LDAP. Je ne m&amp;rsquo;attarderai pas sur la sécurité, la réplication etc&amp;hellip;&lt;/p&gt;
&lt;p&gt;On part d&amp;rsquo;un serveur vierge, avec le réseau configuré. Si votre domaine DNS c&amp;rsquo;est toto.local, le DIT LDAP sera dc=toto,dc=local. Pour moi ce sera dc=morot,dc=fr C&amp;rsquo;est parti :&lt;/p&gt;
&lt;div class="highlight"&gt;&lt;pre tabindex="0" style="color:#f8f8f2;background-color:#272822;-moz-tab-size:4;-o-tab-size:4;tab-size:4;-webkit-text-size-adjust:none;"&gt;&lt;code class="language-fallback" data-lang="fallback"&gt;&lt;span style="display:flex;"&gt;&lt;span&gt;apt-get install slapd ldap-utils
&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;p&gt;On met en place nos OU qui contiendront les utilisateurs et les groupes (faire un control+D à la fin de la saisie) :&lt;/p&gt;</description></item><item><title>Tuto Darktable : Effets sélectifs sur les couleurs en noir et le blanc</title><link>https://www.morot.fr/tuto-darktable-effets-selectifs-sur-les-couleurs-en-noir-et-le-blanc/</link><pubDate>Wed, 05 Feb 2014 23:18:01 +0000</pubDate><guid isPermaLink="false">http://www.morot.fr/?p=576</guid><description>&lt;p&gt;Les effets noir et blanc ou sépia, tout le monde connait et sait faire, bon nombre de logiciels ont déjà des filtres pré-existants avec parfois quelques variations possibles.&lt;/p&gt;
&lt;p&gt;Partons d&amp;rsquo;une simple photo de fleur avec un légers bokeh. Celle-ci est plutôt sans intérêt et pas très bien exposée.&lt;/p&gt;
&lt;p&gt;&lt;a href="DSC_0526.jpg"&gt;&lt;img src="https://www.morot.fr/tuto-darktable-effets-selectifs-sur-les-couleurs-en-noir-et-le-blanc/DSC_0526.jpg" alt="DSC_0526" width="1200" height="798" loading="eager"&gt;&lt;/a&gt;&lt;/p&gt;
&lt;p&gt;Importez cette image dans la bibliothèque Darktable, et rendez-vous dans couleur puis zone de couleur. Si le module n&amp;rsquo;est pas disponible, vous le trouverez dans la section plus de modules.&lt;/p&gt;</description></item><item><title>RSyslog centralisé et archivage journalier</title><link>https://www.morot.fr/rsyslog-centralise-et-archivage-journalier/</link><pubDate>Tue, 28 Jan 2014 14:57:37 +0000</pubDate><guid isPermaLink="false">http://www.morot.fr/?p=573</guid><description>&lt;p&gt;Etape 1, on met en place la rotation via /etc/rsyslog.d/70-mail.conf !&lt;/p&gt;
&lt;div class="highlight"&gt;&lt;pre tabindex="0" style="color:#f8f8f2;background-color:#272822;-moz-tab-size:4;-o-tab-size:4;tab-size:4;-webkit-text-size-adjust:none;"&gt;&lt;code class="language-fallback" data-lang="fallback"&gt;&lt;span style="display:flex;"&gt;&lt;span&gt;$template DailyPerTypeLogs,&amp;#34;/srv/log/%$YEAR%-%$MONTH%-%$DAY%/mail.log&amp;#34;
&lt;/span&gt;&lt;/span&gt;&lt;span style="display:flex;"&gt;&lt;span&gt;mail.* -?DailyPerTypeLogs
&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;p&gt;Après un reload, on ajout une tâche cron pour la compression dans /etc/cron.d/compress :
&lt;code&gt;PATH=/usr/sbin:/usr/sbin:/usr/bin:/sbin:/bin DATE=`date --date='1 days ago' +%Y%m%d` 0 1 * * * find /srv/log/$DATE -type f -mtime +1 -name &amp;quot;*.log&amp;quot; -exec gzip '{}' ;&lt;/code&gt;&lt;/p&gt;</description></item><item><title>Synology DS213J et ipkg</title><link>https://www.morot.fr/synology-ds213j-et-ipkg/</link><pubDate>Thu, 23 Jan 2014 22:04:40 +0000</pubDate><guid isPermaLink="false">http://www.morot.fr/?p=568</guid><description>&lt;p&gt;&lt;a href="http://www.debian.org/doc/manuals/apt-howto/ch-apt-get.html"&gt;IPKG&lt;/a&gt;, c&amp;rsquo;est beau propre et frais, mais ça n&amp;rsquo;existe pas pour l&amp;rsquo;architecture Marvel Armada 370.  Mais grace à ces &lt;a href="https://github.com/trepmag/ds213j-optware-bootstrap"&gt;petits gars&lt;/a&gt; on sait maintenant que c&amp;rsquo;est à peu près compatible au niveau des binaires avec l&amp;rsquo;architecture Marvell Kirkwood mv6281 déjà bien supportée. Donc en fait, c&amp;rsquo;est très simple et fermez les yeux quand on dit que ce n&amp;rsquo;est pas compatible car les commandes suivantes suffisent pour installer le nécessaire :&lt;/p&gt;
&lt;p&gt;&lt;code&gt;feed=http://ipkg.nslu2-linux.org/feeds/optware/cs08q1armel/cross/unstable ipk_name=`wget -qO- $feed/Packages | awk '/^Filename: ipkg-opt/ {print $2}'` wget $feed/$ipk_name tar -xOvzf $ipk_name ./data.tar.gz | tar -C / -xzvf - mkdir -p /opt/etc/ipkg echo &amp;quot;src cross $feed&amp;quot; &amp;gt; /opt/etc/ipkg/feeds.conf &lt;/code&gt;&lt;/p&gt;</description></item><item><title>Permettre l'exécution forcée de checks dans Nagios</title><link>https://www.morot.fr/permettre-lexecution-forcee-de-check-dans-nagios/</link><pubDate>Thu, 31 Oct 2013 11:03:31 +0000</pubDate><guid isPermaLink="false">http://www.morot.fr/?p=374</guid><description>&lt;p&gt;Trop souvent (Debian/Ubuntu!) je tombe sur cette erreur dans un Nagios :&lt;/p&gt;
&lt;div class="highlight"&gt;&lt;pre tabindex="0" style="color:#f8f8f2;background-color:#272822;-moz-tab-size:4;-o-tab-size:4;tab-size:4;-webkit-text-size-adjust:none;"&gt;&lt;code class="language-gdscript3" data-lang="gdscript3"&gt;&lt;span style="display:flex;"&gt;&lt;span&gt;Error: Could &lt;span style="color:#f92672"&gt;not&lt;/span&gt; stat() command file &lt;span style="color:#960050;background-color:#1e0010"&gt;‘&lt;/span&gt;&lt;span style="color:#f92672"&gt;/&lt;/span&gt;&lt;span style="color:#66d9ef"&gt;var&lt;/span&gt;&lt;span style="color:#f92672"&gt;/&lt;/span&gt;lib&lt;span style="color:#f92672"&gt;/&lt;/span&gt;nagios3&lt;span style="color:#f92672"&gt;/&lt;/span&gt;rw&lt;span style="color:#f92672"&gt;/&lt;/span&gt;nagios&lt;span style="color:#f92672"&gt;.&lt;/span&gt;cmd&lt;span style="color:#960050;background-color:#1e0010"&gt;’&lt;/span&gt;&lt;span style="color:#f92672"&gt;!&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;p&gt;The external command file may be missing, Nagios may not be running, and/or Nagios may not be checking external commands. An error occurred while attempting to commit your command for processing.&lt;/p&gt;
&lt;p&gt;La solution est pourtant simple, il suffit pourtant dans le fichier &lt;strong&gt;/etc/nagios/nagios.cfg&lt;/strong&gt; de passer à 1 la valeur de la directive &lt;strong&gt;check_external_commands&lt;/strong&gt; puis d&amp;rsquo;exécuter :&lt;/p&gt;</description></item><item><title>Redirection HTTP-HTTPS avec HAProxy en conservant le host</title><link>https://www.morot.fr/redirection-http-https-avec-haproxy-en-conservant-le-host/</link><pubDate>Tue, 29 Oct 2013 10:31:31 +0000</pubDate><guid isPermaLink="false">http://www.morot.fr/?p=372</guid><description>&lt;p&gt;Pour garder la conformité du certificat SSL multi-sites, j&amp;rsquo;avais besoin d&amp;rsquo;avoir une redirection HTTP vers HTTPS conditionnelle avec un fall back. Voila comment j&amp;rsquo;ai procédé :&lt;/p&gt;
&lt;div class="highlight"&gt;&lt;pre tabindex="0" style="color:#f8f8f2;background-color:#272822;-moz-tab-size:4;-o-tab-size:4;tab-size:4;-webkit-text-size-adjust:none;"&gt;&lt;code class="language-fallback" data-lang="fallback"&gt;&lt;span style="display:flex;"&gt;&lt;span&gt;frontend ft_http
&lt;/span&gt;&lt;/span&gt;&lt;span style="display:flex;"&gt;&lt;span&gt; bind *:80
&lt;/span&gt;&lt;/span&gt;&lt;span style="display:flex;"&gt;&lt;span&gt; log global
&lt;/span&gt;&lt;/span&gt;&lt;span style="display:flex;"&gt;&lt;span&gt; mode http
&lt;/span&gt;&lt;/span&gt;&lt;span style="display:flex;"&gt;&lt;span&gt; acl rule_1 hdr_dom(host) -i webmail.foo.fr
&lt;/span&gt;&lt;/span&gt;&lt;span style="display:flex;"&gt;&lt;span&gt; acl rule_2 hdr_dom(host) -i webmail.bar.fr
&lt;/span&gt;&lt;/span&gt;&lt;span style="display:flex;"&gt;&lt;span&gt; redirect location https://webmail.foo.fr if rule_1
&lt;/span&gt;&lt;/span&gt;&lt;span style="display:flex;"&gt;&lt;span&gt; redirect location https://webmail.bar.fr if rule_2
&lt;/span&gt;&lt;/span&gt;&lt;span style="display:flex;"&gt;&lt;span&gt; redirect location https://webmail.toto.fr
&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;</description></item><item><title>Astuce HAProxy</title><link>https://www.morot.fr/astuces-haproxy/</link><pubDate>Tue, 29 Oct 2013 10:02:34 +0000</pubDate><guid isPermaLink="false">http://www.morot.fr/?p=369</guid><description>&lt;p&gt;Petit truc du jour, j&amp;rsquo;ai des serveurs HTTP/HTTPS en backend, je souhaite que le certificat SSL ne soit pas celui déployé sur le HAProxy, mais celui des serveurs load-balancés.&lt;/p&gt;
&lt;p&gt;Dans un premier temps, il faut définir une socket https :&lt;/p&gt;
&lt;div class="highlight"&gt;&lt;pre tabindex="0" style="color:#f8f8f2;background-color:#272822;-moz-tab-size:4;-o-tab-size:4;tab-size:4;-webkit-text-size-adjust:none;"&gt;&lt;code class="language-fallback" data-lang="fallback"&gt;&lt;span style="display:flex;"&gt;&lt;span&gt;frontend ft_https
&lt;/span&gt;&lt;/span&gt;&lt;span style="display:flex;"&gt;&lt;span&gt; bind 0.0.0.0:443
&lt;/span&gt;&lt;/span&gt;&lt;span style="display:flex;"&gt;&lt;span&gt; mode tcp
&lt;/span&gt;&lt;/span&gt;&lt;span style="display:flex;"&gt;&lt;span&gt; default_backend bk_https
&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;p&gt;Enfin, via le mode TCP et non pas HTTP afin que le SSL Connect soit fait par les serveurs désservis et non pas entre le navigateur et le HAProxy :&lt;/p&gt;</description></item><item><title>Line6 Pocket Pod</title><link>https://www.morot.fr/line6-pocket-pod/</link><pubDate>Mon, 20 Feb 2012 22:10:27 +0000</pubDate><guid isPermaLink="false">http://www.morot.fr/?p=331</guid><description>&lt;p&gt;Le pocket Pod est un multi-effet plutôt sympathique qui peut être facilement piloté via des logiciels propriétaires. Ceux-ci s&amp;rsquo;émulent plutôt bien avec wine mais il reste le problème du pilote pour aller parler avec l&amp;rsquo;appareil en USB. Il existe bien un &lt;a href="http://www.tanzband-scream.at/line6/"&gt;pilote&lt;/a&gt; mais celui-ci n&amp;rsquo;est plus maintenu et ne compile donc plus. En particulier le paquet Debian est &lt;a href="http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=651791"&gt;plutôt cahotique&lt;/a&gt;. A force de ne pas profiter pleinenement de mon pocket pod du fait de la contrainte de redémarrer sous un autre OS, je me suis forcé à me fendre d&amp;rsquo;&lt;a href="https://www.morot.fr/wp-content/uploads/2012/02/line6-usb-source.diff_.txt"&gt;un petit patch&lt;/a&gt; qui sera peut être utile à d&amp;rsquo;autres. Il ne restera plus qu&amp;rsquo;à charger le pilote via un modprobe line6usb :&lt;/p&gt;</description></item><item><title>Guitar Pro 6 sous Debian SID</title><link>https://www.morot.fr/guitar-pro-6-sous-debian-sid/</link><pubDate>Sun, 05 Feb 2012 13:00:52 +0000</pubDate><guid isPermaLink="false">http://www.morot.fr/?p=288</guid><description>&lt;p&gt;Guitar Pro est disponible depuis l&amp;rsquo;an dernier en version native Linux depuis qu&amp;rsquo;il a été réécrit en QT. Ce logiciel est, il faut le reconnaitre, à des années lumières de ce qui existe dans le monde libre, je pense notamment à TuxGuitar. Malgré tout, la seule distribution supportée par l&amp;rsquo;éditeur est la Ubuntu ce qui oblige à quelques contorsions pour que tout fonctionne sous Debian ou autre distribution. Je tiens à préciser que pour éviter de me battre, j&amp;rsquo;ai choisi de passer par pulseaudio comme sortie sonore sans utiliser timidity++ comme je le faisais avec tuxguitar.&lt;/p&gt;</description></item><item><title>Convertir un disque KVM/RAW vers le format VDI de Virtualbox</title><link>https://www.morot.fr/convertir-un-disque-kvmraw-vers-le-format-vdi-de-virtualbox/</link><pubDate>Sun, 08 Jan 2012 21:02:44 +0000</pubDate><guid isPermaLink="false">http://www.morot.fr/?p=301</guid><description>&lt;p&gt;Parfois vous préparez des vm Windows sous KVM sans penser à ceux qui sont obligés d&amp;rsquo;utiliser VirtualBox car ils ne disposent pas des instructions de virtualisation matérielles sur leur machine. J&amp;rsquo;ai eu le cas récemment pour une VM sous Windows XP, que j&amp;rsquo;ai donc recréé sans disque dur afin de réutiliser le disque créé au format créé via virt-manager vu que l&amp;rsquo;OS et les softs étaient déjà présent.
En fait comme d&amp;rsquo;habitude sous Linux, c&amp;rsquo;est simple :&lt;/p&gt;</description></item><item><title>Bi-écran avec le driver nouveau et des résolutions d'écran différentes</title><link>https://www.morot.fr/bi-ecran-avec-le-driver-nouveau-et-des-resolutions-decran-differentes/</link><pubDate>Mon, 10 Oct 2011 19:12:03 +0000</pubDate><guid isPermaLink="false">http://www.morot.fr/?p=292</guid><description>&lt;p&gt;Avec le &lt;a href="http://packages.debian.org/sid/nvidia-glx-legacy" title="blob"&gt;blob&lt;/a&gt; et nvidia-xconfig il faut reconnaître que ça fonctionne &amp;ldquo;hors de la boite&amp;rdquo; mais ça manque de &lt;a href="http://packages.debian.org/sid/xserver-xorg-video-nouveau" title="Nouveau"&gt;liberté&lt;/a&gt; et un &lt;a href="http://packages.debian.org/sid/plymouth" title="Plymouth"&gt;joli&lt;/a&gt; &lt;a href="http://www.x.org/wiki/ModeSetting" title="KMS"&gt;boot sexy&lt;/a&gt;. Après avoir quitté archlinux après 5 ans de bons et loyaux services, je suis repassé sous Debian Sid et j&amp;rsquo;ai retenté l&amp;rsquo;aventure nouveau qui n&amp;rsquo;avait pas été glorieuse. Réponse courte : ça marche! Par contre, visiblement le fichier .xprofile est has been et aucun Display Manager ne semble en vouloir, je le lance donc via &lt;a href="http://standards.freedesktop.org/autostart-spec/autostart-spec-latest.html" title="Spécification Autostart"&gt;autostart&lt;/a&gt;.&lt;/p&gt;</description></item><item><title>Dspam, Debian Squeeze, l'univers et le reste</title><link>https://www.morot.fr/dspam-debian-squeeze-lunivers-et-le-reste/</link><pubDate>Sun, 24 Apr 2011 17:18:11 +0000</pubDate><guid isPermaLink="false">http://www.morot.fr/?p=213</guid><description>&lt;h1 id="backport-du-paquet-sid-"&gt;Backport du paquet Sid :&lt;/h1&gt;
&lt;p&gt;Activer les dépôts SID :&lt;/p&gt;
&lt;div class="highlight"&gt;&lt;pre tabindex="0" style="color:#f8f8f2;background-color:#272822;-moz-tab-size:4;-o-tab-size:4;tab-size:4;-webkit-text-size-adjust:none;"&gt;&lt;code class="language-fallback" data-lang="fallback"&gt;&lt;span style="display:flex;"&gt;&lt;span&gt;deb-src http://ftp.fr.debian.org/debian/ sid main contrib non-free
&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;p&gt;Créer le paquet et l&amp;rsquo;installer :&lt;/p&gt;
&lt;div class="highlight"&gt;&lt;pre tabindex="0" style="color:#f8f8f2;background-color:#272822;-moz-tab-size:4;-o-tab-size:4;tab-size:4;-webkit-text-size-adjust:none;"&gt;&lt;code class="language-go" data-lang="go"&gt;&lt;span style="display:flex;"&gt;&lt;span&gt;&lt;span style="color:#a6e22e"&gt;mkdir&lt;/span&gt; &lt;span style="color:#f92672"&gt;/&lt;/span&gt;&lt;span style="color:#a6e22e"&gt;tmp&lt;/span&gt;&lt;span style="color:#f92672"&gt;/&lt;/span&gt;&lt;span style="color:#a6e22e"&gt;dspam&lt;/span&gt; &lt;span style="color:#f92672"&gt;&amp;amp;&amp;amp;&lt;/span&gt; &lt;span style="color:#a6e22e"&gt;cd&lt;/span&gt; &lt;span style="color:#f92672"&gt;/&lt;/span&gt;&lt;span style="color:#a6e22e"&gt;tmp&lt;/span&gt;&lt;span style="color:#f92672"&gt;/&lt;/span&gt;&lt;span style="color:#a6e22e"&gt;dspam&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span style="display:flex;"&gt;&lt;span&gt;&lt;span style="color:#a6e22e"&gt;apt&lt;/span&gt;&lt;span style="color:#f92672"&gt;-&lt;/span&gt;&lt;span style="color:#a6e22e"&gt;get&lt;/span&gt; &lt;span style="color:#a6e22e"&gt;source&lt;/span&gt; &lt;span style="color:#a6e22e"&gt;dspam&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span style="display:flex;"&gt;&lt;span&gt;&lt;span style="color:#a6e22e"&gt;cd&lt;/span&gt; &lt;span style="color:#a6e22e"&gt;dspam&lt;/span&gt;&lt;span style="color:#f92672"&gt;-&lt;/span&gt;&lt;span style="color:#ae81ff"&gt;3.6.8&lt;/span&gt; &lt;span style="color:#f92672"&gt;&amp;amp;&amp;amp;&lt;/span&gt; &lt;span style="color:#a6e22e"&gt;dpkg&lt;/span&gt;&lt;span style="color:#f92672"&gt;-&lt;/span&gt;&lt;span style="color:#a6e22e"&gt;buildpackage&lt;/span&gt; &lt;span style="color:#f92672"&gt;&amp;amp;&amp;amp;&lt;/span&gt; &lt;span style="color:#a6e22e"&gt;cd&lt;/span&gt; ..
&lt;/span&gt;&lt;/span&gt;&lt;span style="display:flex;"&gt;&lt;span&gt;&lt;span style="color:#a6e22e"&gt;dpkg&lt;/span&gt; &lt;span style="color:#f92672"&gt;-&lt;/span&gt;&lt;span style="color:#a6e22e"&gt;i&lt;/span&gt; &lt;span style="color:#a6e22e"&gt;dspam_3&lt;/span&gt;&lt;span style="color:#ae81ff"&gt;.6.8&lt;/span&gt;&lt;span style="color:#f92672"&gt;-&lt;/span&gt;&lt;span style="color:#ae81ff"&gt;9.3&lt;/span&gt;&lt;span style="color:#a6e22e"&gt;_amd64&lt;/span&gt;.&lt;span style="color:#a6e22e"&gt;deb&lt;/span&gt; &lt;span style="color:#a6e22e"&gt;dspam&lt;/span&gt;&lt;span style="color:#f92672"&gt;-&lt;/span&gt;&lt;span style="color:#a6e22e"&gt;webfrontend_3&lt;/span&gt;&lt;span style="color:#ae81ff"&gt;.6.8&lt;/span&gt;&lt;span style="color:#f92672"&gt;-&lt;/span&gt;&lt;span style="color:#ae81ff"&gt;9.3&lt;/span&gt;&lt;span style="color:#a6e22e"&gt;_all&lt;/span&gt;.&lt;span style="color:#a6e22e"&gt;deb&lt;/span&gt; &lt;span style="color:#a6e22e"&gt;libdspam7_3&lt;/span&gt;&lt;span style="color:#ae81ff"&gt;.6.8&lt;/span&gt;&lt;span style="color:#f92672"&gt;-&lt;/span&gt;&lt;span style="color:#ae81ff"&gt;9.3&lt;/span&gt;&lt;span style="color:#a6e22e"&gt;_amd64&lt;/span&gt;.&lt;span style="color:#a6e22e"&gt;deb&lt;/span&gt; &lt;span style="color:#a6e22e"&gt;libdspam7&lt;/span&gt;&lt;span style="color:#f92672"&gt;-&lt;/span&gt;&lt;span style="color:#a6e22e"&gt;drv&lt;/span&gt;&lt;span style="color:#f92672"&gt;-&lt;/span&gt;&lt;span style="color:#a6e22e"&gt;sqlite3_3&lt;/span&gt;&lt;span style="color:#ae81ff"&gt;.6.8&lt;/span&gt;&lt;span style="color:#f92672"&gt;-&lt;/span&gt;&lt;span style="color:#ae81ff"&gt;9.3&lt;/span&gt;&lt;span style="color:#a6e22e"&gt;_amd64&lt;/span&gt;.&lt;span style="color:#a6e22e"&gt;deb&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span style="display:flex;"&gt;&lt;span&gt;&lt;span style="color:#a6e22e"&gt;ln&lt;/span&gt; &lt;span style="color:#f92672"&gt;-&lt;/span&gt;&lt;span style="color:#a6e22e"&gt;s&lt;/span&gt; &lt;span style="color:#f92672"&gt;/&lt;/span&gt;&lt;span style="color:#a6e22e"&gt;usr&lt;/span&gt;&lt;span style="color:#f92672"&gt;/&lt;/span&gt;&lt;span style="color:#a6e22e"&gt;lib&lt;/span&gt;&lt;span style="color:#f92672"&gt;/&lt;/span&gt;&lt;span style="color:#a6e22e"&gt;dspam&lt;/span&gt;&lt;span style="color:#f92672"&gt;/&lt;/span&gt;&lt;span style="color:#a6e22e"&gt;libsqlite3_drv&lt;/span&gt;.&lt;span style="color:#a6e22e"&gt;so&lt;/span&gt; &lt;span style="color:#f92672"&gt;/&lt;/span&gt;&lt;span style="color:#a6e22e"&gt;usr&lt;/span&gt;&lt;span style="color:#f92672"&gt;/&lt;/span&gt;&lt;span style="color:#a6e22e"&gt;lib&lt;/span&gt;&lt;span style="color:#f92672"&gt;/&lt;/span&gt;&lt;span style="color:#a6e22e"&gt;dspam&lt;/span&gt;&lt;span style="color:#f92672"&gt;/&lt;/span&gt;&lt;span style="color:#a6e22e"&gt;libsqlite_drv&lt;/span&gt;.&lt;span style="color:#a6e22e"&gt;so&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;h1 id="configuration-"&gt;Configuration :&lt;/h1&gt;
&lt;p&gt;Fichier /etc/dspam/dspam.conf :&lt;/p&gt;
&lt;div class="highlight"&gt;&lt;pre tabindex="0" style="color:#f8f8f2;background-color:#272822;-moz-tab-size:4;-o-tab-size:4;tab-size:4;-webkit-text-size-adjust:none;"&gt;&lt;code class="language-gdscript3" data-lang="gdscript3"&gt;&lt;span style="display:flex;"&gt;&lt;span&gt;&lt;span style="color:#75715e"&gt;# J&amp;#39;utilise dovecot comme MDA :&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span style="display:flex;"&gt;&lt;span&gt;TrustedDeliveryAgent &lt;span style="color:#e6db74"&gt;&amp;#34;/usr/lib/dovecot/deliver&amp;#34;&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span style="display:flex;"&gt;&lt;span&gt;&lt;span style="color:#75715e"&gt;# Postfix soumet les mails en lmtp (ServerMode) à dspam :&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span style="display:flex;"&gt;&lt;span&gt;ServerPort &lt;span style="color:#ae81ff"&gt;10124&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span style="display:flex;"&gt;&lt;span&gt;ServerQueueSize &lt;span style="color:#ae81ff"&gt;32&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span style="display:flex;"&gt;&lt;span&gt;ServerPID &lt;span style="color:#f92672"&gt;/&lt;/span&gt;&lt;span style="color:#66d9ef"&gt;var&lt;/span&gt;&lt;span style="color:#f92672"&gt;/&lt;/span&gt;run&lt;span style="color:#f92672"&gt;/&lt;/span&gt;dspam&lt;span style="color:#f92672"&gt;/&lt;/span&gt;dspam&lt;span style="color:#f92672"&gt;.&lt;/span&gt;pid
&lt;/span&gt;&lt;/span&gt;&lt;span style="display:flex;"&gt;&lt;span&gt;ServerMode standard
&lt;/span&gt;&lt;/span&gt;&lt;span style="display:flex;"&gt;&lt;span&gt;&lt;span style="color:#75715e"&gt;# On définit comment dspam re-soumettra les mails à postfix&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span style="display:flex;"&gt;&lt;span&gt;DeliveryHost &lt;span style="color:#ae81ff"&gt;127.0&lt;/span&gt;&lt;span style="color:#f92672"&gt;.&lt;/span&gt;&lt;span style="color:#ae81ff"&gt;0.1&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span style="display:flex;"&gt;&lt;span&gt;DeliveryPort &lt;span style="color:#ae81ff"&gt;10124&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span style="display:flex;"&gt;&lt;span&gt;DeliveryIdent localhost
&lt;/span&gt;&lt;/span&gt;&lt;span style="display:flex;"&gt;&lt;span&gt;DeliveryProto SMTP
&lt;/span&gt;&lt;/span&gt;&lt;span style="display:flex;"&gt;&lt;span&gt;&lt;span style="color:#75715e"&gt;# On réinjecte les mails légitimes ET les spams&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span style="display:flex;"&gt;&lt;span&gt;ServerParameters &lt;span style="color:#e6db74"&gt;&amp;#34;--deliver=innocent,spam -d &lt;/span&gt;&lt;span style="color:#e6db74"&gt;%u&lt;/span&gt;&lt;span style="color:#e6db74"&gt;&amp;#34;&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span style="display:flex;"&gt;&lt;span&gt;ServerIdent &lt;span style="color:#e6db74"&gt;&amp;#34;localhost.localdomain&amp;#34;&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span style="display:flex;"&gt;&lt;span&gt;&lt;span style="color:#75715e"&gt;# Mode d&amp;#39;apprentissage&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span style="display:flex;"&gt;&lt;span&gt;TrainingMode teft
&lt;/span&gt;&lt;/span&gt;&lt;span style="display:flex;"&gt;&lt;span&gt;&lt;span style="color:#75715e"&gt;# Algorithme d&amp;#39;apprentissage des tokets :&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span style="display:flex;"&gt;&lt;span&gt;Algorithm graham burton
&lt;/span&gt;&lt;/span&gt;&lt;span style="display:flex;"&gt;&lt;span&gt;&lt;span style="color:#75715e"&gt;# Faut-il excpliquer ce que cela permet?&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span style="display:flex;"&gt;&lt;span&gt;Feature whitelist
&lt;/span&gt;&lt;/span&gt;&lt;span style="display:flex;"&gt;&lt;span&gt;&lt;span style="color:#75715e"&gt;# Paramétrages de la base de tokens par utilisateur&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span style="display:flex;"&gt;&lt;span&gt;&lt;span style="color:#75715e"&gt;# A ajuster en fonction de l&amp;#39;espace disque&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span style="display:flex;"&gt;&lt;span&gt;&lt;span style="color:#75715e"&gt;# 100 000 enregistrements nécessitent 1.6 Mo de place&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span style="display:flex;"&gt;&lt;span&gt;&lt;span style="color:#75715e"&gt;# La taille de la base est fonctions de paliers pré-définis&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span style="display:flex;"&gt;&lt;span&gt;&lt;span style="color:#75715e"&gt;# La valeur ci-dessous représente une base par utilisateur d&amp;#39;environ 200 Mo&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span style="display:flex;"&gt;&lt;span&gt;HashRecMax &lt;span style="color:#ae81ff"&gt;12582917&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span style="display:flex;"&gt;&lt;span&gt;&lt;span style="color:#75715e"&gt;# La base peut croitre jusqu&amp;#39;à 2 000 000 d&amp;#39;enregistrements par parliers de 49 157&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span style="display:flex;"&gt;&lt;span&gt;HashAutoExtend on
&lt;/span&gt;&lt;/span&gt;&lt;span style="display:flex;"&gt;&lt;span&gt;HashMaxExtents &lt;span style="color:#ae81ff"&gt;20000000&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span style="display:flex;"&gt;&lt;span&gt;HashExtentSize &lt;span style="color:#ae81ff"&gt;49157&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span style="display:flex;"&gt;&lt;span&gt;&lt;span style="color:#75715e"&gt;# Activation de l&amp;#39;apprentissage automatique lorsqu&amp;#39;un mail est forwardé à&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span style="display:flex;"&gt;&lt;span&gt;&lt;span style="color:#75715e"&gt;# notspam-utilisateur@domaine.tld ou spam-utilisateur@domaine.tld&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span style="display:flex;"&gt;&lt;span&gt;&lt;span style="color:#75715e"&gt;# Bien entendu, les alias doivent être présents dans la configuration de Postfix&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span style="display:flex;"&gt;&lt;span&gt;ParseToHeaders on
&lt;/span&gt;&lt;/span&gt;&lt;span style="display:flex;"&gt;&lt;span&gt;ChangeModeOnParse on
&lt;/span&gt;&lt;/span&gt;&lt;span style="display:flex;"&gt;&lt;span&gt;ChangeUserOnParse full
&lt;/span&gt;&lt;/span&gt;&lt;span style="display:flex;"&gt;&lt;span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span style="display:flex;"&gt;&lt;span&gt;Preference &lt;span style="color:#e6db74"&gt;&amp;#34;spamAction=tag&amp;#34;&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span style="display:flex;"&gt;&lt;span&gt;Preference &lt;span style="color:#e6db74"&gt;&amp;#34;signatureLocation=message&amp;#34;&lt;/span&gt; &lt;span style="color:#75715e"&gt;# &amp;#39;message&amp;#39; or &amp;#39;headers&amp;#39;&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span style="display:flex;"&gt;&lt;span&gt;Preference &lt;span style="color:#e6db74"&gt;&amp;#34;showFactors=on&amp;#34;&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span style="display:flex;"&gt;&lt;span&gt;Preference &lt;span style="color:#e6db74"&gt;&amp;#34;spamSubject=[SPAM] &amp;#34;&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;h1 id="postfix-"&gt;Postfix :&lt;/h1&gt;
&lt;p&gt;Fichier master.cf :&lt;/p&gt;</description></item><item><title>Localebuntu!</title><link>https://www.morot.fr/localebuntu/</link><pubDate>Sun, 25 Jul 2010 16:28:54 +0000</pubDate><guid isPermaLink="false">http://www.morot.fr/?p=200</guid><description>&lt;p&gt;Chez Ubuntu GNU/Linux, &lt;a href="http://ubuntuforums.org/showthread.php?t=241254"&gt;on aime faire les choses différemment&lt;/a&gt; et je viens de passer 5 minutes à bêtement ajouter le support de la locale ISO-8859-15 car visiblement ils ne souhaitent pas reprendre les bonnes idées de Debian comme le menu de dpkg-reconfigure locales. Donc voici la manip&amp;rsquo; :&lt;/p&gt;
&lt;div class="highlight"&gt;&lt;pre tabindex="0" style="color:#f8f8f2;background-color:#272822;-moz-tab-size:4;-o-tab-size:4;tab-size:4;-webkit-text-size-adjust:none;"&gt;&lt;code class="language-gdscript3" data-lang="gdscript3"&gt;&lt;span style="display:flex;"&gt;&lt;span&gt;&lt;span style="color:#75715e"&gt;# grep fr_FR /usr/share/i18n/SUPPORTED |grep -i fr_FR |grep -iv utf-8 &amp;gt;&amp;gt;/var/lib/locales/supported.d/fr&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span style="display:flex;"&gt;&lt;span&gt;&lt;span style="color:#75715e"&gt;# locale-gen&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;</description></item><item><title>Des retours à la ligne propres dans ton émulateur de terminal?</title><link>https://www.morot.fr/des-retours-a-la-ligne-propres-dans-ton-emulateur-de-terminal/</link><pubDate>Wed, 30 Jun 2010 21:41:54 +0000</pubDate><guid isPermaLink="false">http://www.morot.fr/?p=193</guid><description>&lt;p&gt;Ben protèges bien ton PS1!&lt;/p&gt;
&lt;div class="highlight"&gt;&lt;pre tabindex="0" style="color:#f8f8f2;background-color:#272822;-moz-tab-size:4;-o-tab-size:4;tab-size:4;-webkit-text-size-adjust:none;"&gt;&lt;code class="language-gdscript3" data-lang="gdscript3"&gt;&lt;span style="display:flex;"&gt;&lt;span&gt;&lt;span style="color:#66d9ef"&gt;export&lt;/span&gt; PS1&lt;span style="color:#f92672"&gt;=&lt;/span&gt;&lt;span style="color:#e6db74"&gt;&amp;#39;[t] u@[e[1;31m]h[e[0m]:w $ &amp;#39;&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;p&gt;À la tienne Etienne!&lt;/p&gt;</description></item><item><title>Un plugin Collectd/Exec pour la 8!</title><link>https://www.morot.fr/un-plugin-collectdexec-pour-la-8/</link><pubDate>Wed, 30 Jun 2010 20:47:02 +0000</pubDate><guid isPermaLink="false">http://www.morot.fr/?p=178</guid><description>&lt;p&gt;Pour la postérité de mes graphs collectd, je souhaitais avoir un graph CPU de mon serveur. Collectd prend en charge la liblmsensors2 correctement, mais très mal la version 3 packagée dans Debian. Par conséquent je me suis mis en tête de faire un petit script via le plugin Exec qui parsera la sortie de la commande sensors (le tout paramétré comme il faut avant).&lt;/p&gt;
&lt;p&gt;En avant pour le script :&lt;/p&gt;
&lt;div class="highlight"&gt;&lt;pre tabindex="0" style="color:#f8f8f2;background-color:#272822;-moz-tab-size:4;-o-tab-size:4;tab-size:4;-webkit-text-size-adjust:none;"&gt;&lt;code class="language-bash" data-lang="bash"&gt;&lt;span style="display:flex;"&gt;&lt;span&gt;&lt;span style="color:#75715e"&gt;#!/bin/bash
&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span style="display:flex;"&gt;&lt;span&gt;INTERVAL&lt;span style="color:#f92672"&gt;=&lt;/span&gt;&lt;span style="color:#ae81ff"&gt;60&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span style="display:flex;"&gt;&lt;span&gt;HOST&lt;span style="color:#f92672"&gt;=&lt;/span&gt;&lt;span style="color:#e6db74"&gt;&amp;#34;galadriel.morot.fr&amp;#34;&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span style="display:flex;"&gt;&lt;span&gt;&lt;span style="color:#66d9ef"&gt;while&lt;/span&gt; true
&lt;/span&gt;&lt;/span&gt;&lt;span style="display:flex;"&gt;&lt;span&gt;&lt;span style="color:#66d9ef"&gt;do&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span style="display:flex;"&gt;&lt;span&gt; TEMP&lt;span style="color:#f92672"&gt;=&lt;/span&gt;&lt;span style="color:#e6db74"&gt;`&lt;/span&gt;sensors |grep -i temp1 | awk &lt;span style="color:#e6db74"&gt;&amp;#39; { print $2; } &amp;#39;&lt;/span&gt; | cut -c 2,3&lt;span style="color:#e6db74"&gt;`&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span style="display:flex;"&gt;&lt;span&gt; echo &lt;span style="color:#e6db74"&gt;&amp;#34;PUTVAL &lt;/span&gt;$HOST&lt;span style="color:#e6db74"&gt;/exec-temperature/gauge-temperature interval=&lt;/span&gt;$INTERVAL&lt;span style="color:#e6db74"&gt; N:&lt;/span&gt;$TEMP&lt;span style="color:#e6db74"&gt;&amp;#34;&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span style="display:flex;"&gt;&lt;span&gt; sleep $INTERVAL
&lt;/span&gt;&lt;/span&gt;&lt;span style="display:flex;"&gt;&lt;span&gt;&lt;span style="color:#66d9ef"&gt;done&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;p&gt;Le plus important dans tout ça, c&amp;rsquo;est le PUTVAL mais heureusement, &lt;a href="http://collectd.org/documentation/manpages/collectd-exec.5.shtml"&gt;la doc est notre amie&lt;/a&gt;. Donc en gros voila le format :&lt;/p&gt;</description></item><item><title>My laptop is rich !</title><link>https://www.morot.fr/my-laptop-is-rich/</link><pubDate>Mon, 18 Jan 2010 19:26:12 +0000</pubDate><guid isPermaLink="false">http://www.morot.fr/?p=160</guid><description>&lt;p&gt;Noël étant l&amp;rsquo;occasion de se faire plaisir je me suis acheté un nouvel ordinateur portable. Je cherchais un portable 13&amp;quot;, avec un lecteur optique, dont le processeur gérait la virtualisation et le tout pour moins de 650 €. Au final, le seul qui remplissait ces conditions était un HP 4310s avec le CPU T6670 chez avenueducommerce. Mais bon, il est bô! La première étape a été de supprimer le système d&amp;rsquo;exploitation nouvelle version 7 livré avec pour y coller une Debian. Pour résumer, à part le lecteur d&amp;rsquo;empreintes (dont j&amp;rsquo;attends toujours une réponse par mail du fabricant pour qu&amp;rsquo;il se bouge à libérer les spécs) tout marche !!!&lt;/p&gt;</description></item><item><title>RAID Réseau multi-maîtres avec DRBD 0.8</title><link>https://www.morot.fr/raid-reseau-multi-maitres-avec-drbd-0-8/</link><pubDate>Mon, 07 Sep 2009 19:57:52 +0000</pubDate><guid isPermaLink="false">http://www.morot.fr/?p=158</guid><description>&lt;p&gt;DRBD est un système permettant en quelques sortes de faire du RAID de partitions au travers du réseau en vue de faire un système en haute disponibilité. J&amp;rsquo;avais déjà joué avec DRBD 0.7 pour faire des serveurs Web et Mails redondants en maitre-esclave, mais dans ce cas, un seul serveur est réellement actif. Depuis la 0.8, il est possible d&amp;rsquo;avoir une configuration multi-maîtres dans le but de pouvoir faire en plus de l&amp;rsquo;équilibrage de charge. Voyons comment ça se passe sous Debian!&lt;/p&gt;</description></item><item><title>Carte 3G Huwaei E160 sous Linux</title><link>https://www.morot.fr/carte-3g-huwaei-e160-sous-linux/</link><pubDate>Fri, 28 Aug 2009 17:56:34 +0000</pubDate><guid isPermaLink="false">http://www.morot.fr/?p=151</guid><description>&lt;p&gt;Les cartes Huwaei E160 sont actuellement livrées en pack avec les Livebox Orange. Et la où c&amp;rsquo;est beau, c&amp;rsquo;est qu&amp;rsquo;elles fonctionnent de base sous Linux avec le module noyau &lt;strong&gt;option&lt;/strong&gt; et les paquets &lt;strong&gt;ppp&lt;/strong&gt; et &lt;strong&gt;wvdial&lt;/strong&gt; installés.&lt;/p&gt;
&lt;p&gt;dmesg :&lt;/p&gt;
&lt;div class="highlight"&gt;&lt;pre tabindex="0" style="color:#f8f8f2;background-color:#272822;-moz-tab-size:4;-o-tab-size:4;tab-size:4;-webkit-text-size-adjust:none;"&gt;&lt;code class="language-fallback" data-lang="fallback"&gt;&lt;span style="display:flex;"&gt;&lt;span&gt;usbcore: registered new interface driver usbserial
&lt;/span&gt;&lt;/span&gt;&lt;span style="display:flex;"&gt;&lt;span&gt;USB Serial support registered for generic
&lt;/span&gt;&lt;/span&gt;&lt;span style="display:flex;"&gt;&lt;span&gt;usbcore: registered new interface driver usbserial_generic
&lt;/span&gt;&lt;/span&gt;&lt;span style="display:flex;"&gt;&lt;span&gt;usbserial: USB Serial Driver core
&lt;/span&gt;&lt;/span&gt;&lt;span style="display:flex;"&gt;&lt;span&gt;USB Serial support registered for GSM modem (1-port)
&lt;/span&gt;&lt;/span&gt;&lt;span style="display:flex;"&gt;&lt;span&gt;option 1-10:1.0: GSM modem (1-port) converter detected
&lt;/span&gt;&lt;/span&gt;&lt;span style="display:flex;"&gt;&lt;span&gt;usb 1-10: GSM modem (1-port) converter now attached to ttyUSB0
&lt;/span&gt;&lt;/span&gt;&lt;span style="display:flex;"&gt;&lt;span&gt;option 1-10:1.1: GSM modem (1-port) converter detected
&lt;/span&gt;&lt;/span&gt;&lt;span style="display:flex;"&gt;&lt;span&gt;usb 1-10: GSM modem (1-port) converter now attached to ttyUSB1
&lt;/span&gt;&lt;/span&gt;&lt;span style="display:flex;"&gt;&lt;span&gt;usbcore: registered new interface driver option
&lt;/span&gt;&lt;/span&gt;&lt;span style="display:flex;"&gt;&lt;span&gt;option: v0.7.2:USB Driver for GSM modems
&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;p&gt;lsusb :&lt;/p&gt;</description></item><item><title>Bloquer MSN avec Squid</title><link>https://www.morot.fr/bloquer-msn-avec-squid/</link><pubDate>Wed, 05 Aug 2009 22:27:01 +0000</pubDate><guid isPermaLink="false">http://www.morot.fr/?p=55</guid><description>&lt;p&gt;MSN se connecte par défaut sur le port 1863 et s&amp;rsquo;il est bloqué par un firewall, il se rabat sur le port 80. Il faut donc passer par un filtrage de contenu pour ce débarasser de cette saleté. Pour cela, il faut ajouter dans le squid.conf il filtrage sur le domaine ainsi que sur le type MIME :&lt;/p&gt;
&lt;div class="highlight"&gt;&lt;pre tabindex="0" style="color:#f8f8f2;background-color:#272822;-moz-tab-size:4;-o-tab-size:4;tab-size:4;-webkit-text-size-adjust:none;"&gt;&lt;code class="language-fallback" data-lang="fallback"&gt;&lt;span style="display:flex;"&gt;&lt;span&gt;acl msn_domains dstdomain messenger.msn.com gateway.messenger.hotmail.com
&lt;/span&gt;&lt;/span&gt;&lt;span style="display:flex;"&gt;&lt;span&gt;acl msn_mime_type req_mime_type application/x-msn-messenger
&lt;/span&gt;&lt;/span&gt;&lt;span style="display:flex;"&gt;&lt;span&gt;http_access deny msn_domains
&lt;/span&gt;&lt;/span&gt;&lt;span style="display:flex;"&gt;&lt;span&gt;http_access deny msn_mime_type
&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;p&gt;Et le tour est joué, bye bye à un protocole fermé de plus!&lt;/p&gt;</description></item><item><title>Postfix : utiliser un relai SMTP authentifié</title><link>https://www.morot.fr/postfix-utiliser-un-relai-smtp-authentifie/</link><pubDate>Tue, 02 Jun 2009 22:19:43 +0000</pubDate><guid isPermaLink="false">http://www.morot.fr/?p=53</guid><description>&lt;p&gt;Personnellement j&amp;rsquo;aime bien que l&amp;rsquo;envoi des mails se fasse via un SMTP local qui se charge d&amp;rsquo;acheminer le message à la place de KMail. Par contre je passe par le relai SMTP Authentifié de mon hébergeur et non celui de mon FAI ce qui nécessite de mettre en place une authentification SASL.&lt;/p&gt;
&lt;p&gt;Donc dans un premier temps, il faut installer Postfix, sous une Archlinux cela donne :&lt;/p&gt;
&lt;div class="highlight"&gt;&lt;pre tabindex="0" style="color:#f8f8f2;background-color:#272822;-moz-tab-size:4;-o-tab-size:4;tab-size:4;-webkit-text-size-adjust:none;"&gt;&lt;code class="language-fallback" data-lang="fallback"&gt;&lt;span style="display:flex;"&gt;&lt;span&gt;pacman -Sy postfix
&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;p&gt;Ensuite dans le &lt;strong&gt;/etc/postfix/main.cf&lt;/strong&gt;, on définit le relai SMTP et le fichier stockant le mot de passe SASL pour la connexion avec le relai SMTP :&lt;/p&gt;</description></item><item><title>Serveur SSH sous Archlinux</title><link>https://www.morot.fr/serveur-ssh-sous-archlinux/</link><pubDate>Sun, 31 May 2009 17:45:55 +0000</pubDate><guid isPermaLink="false">http://www.morot.fr/?p=51</guid><description>&lt;p&gt;Par défaut sous ArchLinux, une fois SSHD installé, la connexion est recalée par une erreur de ce type :&lt;/p&gt;
&lt;div class="highlight"&gt;&lt;pre tabindex="0" style="color:#f8f8f2;background-color:#272822;-moz-tab-size:4;-o-tab-size:4;tab-size:4;-webkit-text-size-adjust:none;"&gt;&lt;code class="language-fallback" data-lang="fallback"&gt;&lt;span style="display:flex;"&gt;&lt;span&gt;ssh_exchange_identification: Connection closed by remote host
&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;p&gt;L&amp;rsquo;erreur vient du fait que la stratégie par défaut du fichier &lt;strong&gt;/etc/hosts.deny&lt;/strong&gt; est de tout refuser via la ligne suivante qu&amp;rsquo;il faut commenter ou ajuster selon ses paramètres de sécurité, de façon brutale celà donne :&lt;/p&gt;
&lt;div class="highlight"&gt;&lt;pre tabindex="0" style="color:#f8f8f2;background-color:#272822;-moz-tab-size:4;-o-tab-size:4;tab-size:4;-webkit-text-size-adjust:none;"&gt;&lt;code class="language-fallback" data-lang="fallback"&gt;&lt;span style="display:flex;"&gt;&lt;span&gt;ALL: ALL: DENY
&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;</description></item><item><title>Astuce Bash : avoir la date de la veille via le shell</title><link>https://www.morot.fr/astuce-bash-avoir-la-date-de-la-veille-via-le-shell/</link><pubDate>Mon, 01 Dec 2008 21:38:25 +0000</pubDate><guid isPermaLink="false">http://www.morot.fr/?p=50</guid><description>&lt;p&gt;Une petite astuce qui m&amp;rsquo;a servit dans un script de statistiques pour récupérer les logs de la veille et donc où il fallait connaitre cette même date :&lt;/p&gt;
&lt;div class="highlight"&gt;&lt;pre tabindex="0" style="color:#f8f8f2;background-color:#272822;-moz-tab-size:4;-o-tab-size:4;tab-size:4;-webkit-text-size-adjust:none;"&gt;&lt;code class="language-fallback" data-lang="fallback"&gt;&lt;span style="display:flex;"&gt;&lt;span&gt;date --date=&amp;#39;1 days ago&amp;#39; +%Y%m%d
&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;</description></item><item><title>Xorg 1.5 et erreur de keymap sous ArchLinux</title><link>https://www.morot.fr/xorg-1-5-et-erreur-de-keymap-sous-archlinux/</link><pubDate>Sat, 20 Sep 2008 17:03:39 +0000</pubDate><guid isPermaLink="false">http://www.morot.fr/?p=49</guid><description>&lt;p&gt;Si comme moi vous utilisez les paquets de testing pour achlinux, vous avez du remarquer que Xorg refuse obstinément de reconnaitre la topologie de clavier que vous avez défini dans le xorg.conf et vous vous retrouvez avec une définition de clavier us. Ceci vient du fait que Xorg-server 1.5 apporte le branchement à chaud (hotplug) des périphériques d&amp;rsquo;entrée et c&amp;rsquo;est désormais le boulot de HAL de gérer la keymap. Pour remettre un clavier en français voici ce que vous devez faire :&lt;/p&gt;</description></item><item><title>Mise en place d'un pont (bridge)</title><link>https://www.morot.fr/mise-en-place-dun-pont-bridge/</link><pubDate>Mon, 30 Jun 2008 16:16:14 +0000</pubDate><guid isPermaLink="false">http://www.morot.fr/?p=46</guid><description>&lt;h2 id="introduction"&gt;Introduction&lt;/h2&gt;
&lt;p&gt;Un pont est un équipement réseau permettant généralement d&amp;rsquo;interconnecter deux technologies de réseau local, par exemple Ethernet et Wifi de façon transparente, c&amp;rsquo;est à dire qu&amp;rsquo;il rassemble les deux réseaux au sein d&amp;rsquo;un même domaine de broadcast. Note : un paquet IP traversant un pont ne voit pas son TTL décrémenté.&lt;/p&gt;
&lt;p&gt;Du point de vue de l&amp;rsquo;administration réseau, un pont permet deux choses :&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;Mettre en place un firewall transparent car aucun routage n&amp;rsquo;est effectué&lt;/li&gt;
&lt;li&gt;Mettre en place une sonde réseau de type bandwidthd, cacti ou ntop pour analyser le trafic.&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;La mise en place d&amp;rsquo;un pont sous GNU/Linux impose d&amp;rsquo;avoir le paquet &lt;strong&gt;bridge-utils&lt;/strong&gt; installé.&lt;/p&gt;</description></item><item><title>Openwrt : configurer le firewall pour une freebox</title><link>https://www.morot.fr/openwrt-configurer-le-firewall-pour-une-freebox/</link><pubDate>Sun, 25 May 2008 17:56:28 +0000</pubDate><guid isPermaLink="false">http://www.morot.fr/?p=44</guid><description>&lt;p&gt;Voici ma configuration pour me permettre d&amp;rsquo;utiliser les fonctionnalités multimédia de la freebox ainsi qu&amp;rsquo;exposer certains services sur internet avec un firmware openwrt Kamikaze 7.07 sur un netgear WGT634U.&lt;/p&gt;
&lt;p&gt;Installation des paquets nécessaires :&lt;/p&gt;
&lt;div class="highlight"&gt;&lt;pre tabindex="0" style="color:#f8f8f2;background-color:#272822;-moz-tab-size:4;-o-tab-size:4;tab-size:4;-webkit-text-size-adjust:none;"&gt;&lt;code class="language-fallback" data-lang="fallback"&gt;&lt;span style="display:flex;"&gt;&lt;span&gt;# ipkg install kmod-ipt-extra kmod-ipt-conntrack iptables-mod-conntrack iptables-mod-extra
&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;p&gt;Paramétrage du firewall dans &lt;strong&gt;/etc/firewall.user&lt;/strong&gt; :&lt;/p&gt;
&lt;div class="highlight"&gt;&lt;pre tabindex="0" style="color:#f8f8f2;background-color:#272822;-moz-tab-size:4;-o-tab-size:4;tab-size:4;-webkit-text-size-adjust:none;"&gt;&lt;code class="language-fallback" data-lang="fallback"&gt;&lt;span style="display:flex;"&gt;&lt;span&gt;# Mon cacti est autorisé à surveiller mon routeur en SNMP :
&lt;/span&gt;&lt;/span&gt;&lt;span style="display:flex;"&gt;&lt;span&gt;iptables -A input_wan -s 87.98.142.36 -p udp --dport 161 -j ACCEPT
&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;div class="highlight"&gt;&lt;pre tabindex="0" style="color:#f8f8f2;background-color:#272822;-moz-tab-size:4;-o-tab-size:4;tab-size:4;-webkit-text-size-adjust:none;"&gt;&lt;code class="language-fallback" data-lang="fallback"&gt;&lt;span style="display:flex;"&gt;&lt;span&gt;# J&amp;#39;ai besoin d&amp;#39;accéder en ssh sur mon pc à distance :
&lt;/span&gt;&lt;/span&gt;&lt;span style="display:flex;"&gt;&lt;span&gt;iptables -A forwarding_wan -p tcp --dport 22 -d 192.168.69.10 -j ACCEPT
&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;p&gt;# Pour le freeplayer&lt;/p&gt;</description></item><item><title>Haute disponibilité et agrégation de cartes réseau sous Linux</title><link>https://www.morot.fr/haute-disponibilite-et-agregation-de-cartes-reseau-sous-linux/</link><pubDate>Fri, 23 May 2008 23:07:29 +0000</pubDate><guid isPermaLink="false">http://www.morot.fr/?p=43</guid><description>&lt;p&gt;L&amp;rsquo;ip bonding est une technique permettant d&amp;rsquo;agréger plusieurs interfaces réseau sous la forme d&amp;rsquo;une interface réseau virtuelle permettant d&amp;rsquo;augmenter la bande passante offerte ainsi que de fournir une solution de haute disponibilité.&lt;/p&gt;
&lt;p&gt;On fait le nécessaire pour charger le module comme il faut. Pour cela on fait un fichier &lt;strong&gt;/etc/modprobe.d/bonding&lt;/strong&gt; contenant :&lt;/p&gt;
&lt;div class="highlight"&gt;&lt;pre tabindex="0" style="color:#f8f8f2;background-color:#272822;-moz-tab-size:4;-o-tab-size:4;tab-size:4;-webkit-text-size-adjust:none;"&gt;&lt;code class="language-fallback" data-lang="fallback"&gt;&lt;span style="display:flex;"&gt;&lt;span&gt;alias bond0 bonding
&lt;/span&gt;&lt;/span&gt;&lt;span style="display:flex;"&gt;&lt;span&gt;options bonding mode=active-backup miimon=100 downdelay=200 updelay=200
&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;p&gt;Pour des explications sur les différents paramètres, un simple &lt;strong&gt;modinfo bonding&lt;/strong&gt; fera l&amp;rsquo;affaire.&lt;/p&gt;</description></item><item><title>Netgear WGT634U</title><link>https://www.morot.fr/netgear-wgt634u/</link><pubDate>Thu, 08 May 2008 11:40:15 +0000</pubDate><guid isPermaLink="false">http://www.morot.fr/?p=40</guid><description>&lt;p&gt;Ça y est! Ce matin j&amp;rsquo;ai finalement reçu mon routeur Netgear WGT634U sur lequel je comptais bien installer OpenWRT. Un routeur d&amp;rsquo;occasion évidemment vu que les derniers modèles mettent du temps à être compatibles. Je cherchais surtout un routeur équipé d&amp;rsquo;un port USB pour facilement partager un disque en réseau et ce modèle est particulièrement bien supporté (&lt;a href="http://wiki.openwrt.org/OpenWrtDocs/Hardware/Netgear/WGT634U"&gt;Voir page Openwrt).&lt;/a&gt;&lt;/p&gt;
&lt;p&gt;De base le routeur que je reçois possède le firmware 1.4.1.5 et la procédure openwrt exige la version 1.4.1.10. C&amp;rsquo;est la que le drame commence, impossible de mettre à jour le firmware. Ni via l&amp;rsquo;interface web, ni via l&amp;rsquo;utilitaire de mise à jour du DG834G. Après maints tâtonnements, je finis par upgrader en 1.4.1.9 ce qui me permet au final d&amp;rsquo;avoir un 1.4.1.10. Youpi! L&amp;rsquo;installation du firmware OpenWrt prendra quelques minutes et ho miracle, tout fonctionne du premier coup.&lt;/p&gt;</description></item><item><title>Mysql : modifier le champs AUTO_INCREMENT d'une table</title><link>https://www.morot.fr/mysql-modifier-le-champs-auto_increment-dune-table/</link><pubDate>Thu, 08 May 2008 11:32:20 +0000</pubDate><guid isPermaLink="false">http://www.morot.fr/?p=41</guid><description>&lt;p&gt;Après plusieurs bidouilles sur une table mysql, la clé primaire de type auto_increment ne reflétait plus du tout le nombre d&amp;rsquo;éléments de la table et je trouvais ça dommage. J&amp;rsquo;ai donc cherché un moyen de modifier ce comportement. En fait, une simple requête SQL fait l&amp;rsquo;affaire :&lt;/p&gt;
&lt;div class="highlight"&gt;&lt;pre tabindex="0" style="color:#f8f8f2;background-color:#272822;-moz-tab-size:4;-o-tab-size:4;tab-size:4;-webkit-text-size-adjust:none;"&gt;&lt;code class="language-fallback" data-lang="fallback"&gt;&lt;span style="display:flex;"&gt;&lt;span&gt;ALTER TABLE nom_table AUTO_INCREMENT =42
&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;</description></item><item><title>Hébergement virtuel multi domaine basé sur Mysql</title><link>https://www.morot.fr/hebergement-virtuel-multi-domaine-base-sur-mysql/</link><pubDate>Sat, 03 May 2008 18:03:44 +0000</pubDate><guid isPermaLink="false">http://www.morot.fr/?p=38</guid><description>&lt;h2 id="1-introduction"&gt;1. Introduction&lt;/h2&gt;
&lt;p&gt;Après avoir déja rédigé une documentation sur la réalisation d&amp;rsquo;un serveur pour gérer au niveau dns, mail et ftp plusieurs domaines virtuels stockés dans une base LDAP, voici la même chose mais en se basant cette fois sur une base de données MySQL.&lt;/p&gt;
&lt;p&gt;Prérequis :
Une Debian proprement installée avec juste ce qu&amp;rsquo;il faut (c&amp;rsquo;est à dire vim et ssh :)&lt;/p&gt;
&lt;p&gt;Un serveur Mysql, personnellement je me base sur la version 5 qui sera éventuellement installée sur le même serveur. Je n&amp;rsquo;entrerai absolument pas dans le paramétrage du serveur Mysql ni dans la sécurisation des accès à celui-ci. Pour des raisons de performances dans la montée en charge, les tables seront toutes au format InnoDB, il faudra donc veiller à ce que le support InnoDB soit présent.&lt;/p&gt;</description></item><item><title>Postfix : éliminer le spam dès l'arrivée des messages</title><link>https://www.morot.fr/postfix-eliminer-le-spam-des-larrivee-des-messages/</link><pubDate>Fri, 02 May 2008 17:45:59 +0000</pubDate><guid isPermaLink="false">http://www.morot.fr/?p=39</guid><description>&lt;p&gt;Premièrement on met en place du greylisting :&lt;/p&gt;
&lt;div class="highlight"&gt;&lt;pre tabindex="0" style="color:#f8f8f2;background-color:#272822;-moz-tab-size:4;-o-tab-size:4;tab-size:4;-webkit-text-size-adjust:none;"&gt;&lt;code class="language-fallback" data-lang="fallback"&gt;&lt;span style="display:flex;"&gt;&lt;span&gt;# apt-get install postgrey
&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;p&gt;Et on ajoute cette ligne dans le fichier de configuration de postfix main.cf :&lt;/p&gt;
&lt;div class="highlight"&gt;&lt;pre tabindex="0" style="color:#f8f8f2;background-color:#272822;-moz-tab-size:4;-o-tab-size:4;tab-size:4;-webkit-text-size-adjust:none;"&gt;&lt;code class="language-fallback" data-lang="fallback"&gt;&lt;span style="display:flex;"&gt;&lt;span&gt;smtpd_recipient_restrictions = reject_unauth_destination
&lt;/span&gt;&lt;/span&gt;&lt;span style="display:flex;"&gt;&lt;span&gt; check_policy_service inet:127.0.0.1:2525
&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;p&gt;Dans un deuxième temps, on met en place un contrôle plus strict de ce que Postfix acceptera et on met en place des listes noires de type DNSRBL :&lt;/p&gt;
&lt;div class="highlight"&gt;&lt;pre tabindex="0" style="color:#f8f8f2;background-color:#272822;-moz-tab-size:4;-o-tab-size:4;tab-size:4;-webkit-text-size-adjust:none;"&gt;&lt;code class="language-fallback" data-lang="fallback"&gt;&lt;span style="display:flex;"&gt;&lt;span&gt;smtpd_helo_restrictions = reject_invalid_hostname
&lt;/span&gt;&lt;/span&gt;&lt;span style="display:flex;"&gt;&lt;span&gt;disable_vrfy_command = yes
&lt;/span&gt;&lt;/span&gt;&lt;span style="display:flex;"&gt;&lt;span&gt;smtpd_client_restrictions = permit_mynetworks, reject_unknown_client,
&lt;/span&gt;&lt;/span&gt;&lt;span style="display:flex;"&gt;&lt;span&gt; reject_rbl_client dsn.rfc-ignorant.org,
&lt;/span&gt;&lt;/span&gt;&lt;span style="display:flex;"&gt;&lt;span&gt; reject_rbl_client dul.dnsbl.sorbs.net,
&lt;/span&gt;&lt;/span&gt;&lt;span style="display:flex;"&gt;&lt;span&gt; reject_rbl_client sbl-xbl.spamhaus.org,
&lt;/span&gt;&lt;/span&gt;&lt;span style="display:flex;"&gt;&lt;span&gt; reject_rbl_client bl.spamcop.net,
&lt;/span&gt;&lt;/span&gt;&lt;span style="display:flex;"&gt;&lt;span&gt; reject_rbl_client dnsbl.sorbs.net
&lt;/span&gt;&lt;/span&gt;&lt;span style="display:flex;"&gt;&lt;span&gt;smtpd_sender_restrictions = permit_mynetworks, reject_unknown_client, reject_unknown_sender_domain,
&lt;/span&gt;&lt;/span&gt;&lt;span style="display:flex;"&gt;&lt;span&gt; reject_rbl_client dsn.rfc-ignorant.org,
&lt;/span&gt;&lt;/span&gt;&lt;span style="display:flex;"&gt;&lt;span&gt; reject_rbl_client dul.dnsbl.sorbs.net,
&lt;/span&gt;&lt;/span&gt;&lt;span style="display:flex;"&gt;&lt;span&gt; reject_rbl_client sbl-xbl.spamhaus.org,
&lt;/span&gt;&lt;/span&gt;&lt;span style="display:flex;"&gt;&lt;span&gt; reject_rbl_client bl.spamcop.net,
&lt;/span&gt;&lt;/span&gt;&lt;span style="display:flex;"&gt;&lt;span&gt; reject_rbl_client dnsbl.sorbs.net
&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;p&gt;Avec ces simples paramètres, je suis passé de 60 spams/jours à environ 3-4 et depuis Spamassassin a tendance à s&amp;rsquo;ennuyer ferme&amp;hellip;&lt;/p&gt;</description></item><item><title>Hébergement virtuel multi domaine basé sur LDAP</title><link>https://www.morot.fr/hebergement-virtuel-multi-domaine-base-sur-ldap/</link><pubDate>Sat, 24 Nov 2007 20:12:12 +0000</pubDate><guid isPermaLink="false">http://www.morot.fr/?p=37</guid><description>&lt;h2 id="1-introduction"&gt;1. Introduction&lt;/h2&gt;
&lt;p&gt;Nous étudierons dans cette documentation succinte comment mettre en place un serveur DNS, FTP et mail qui gèrera plusieurs domaines indépendant en centralisant l&amp;rsquo;authentification dans un annuaire LDAP.
De plus, ces domaines seront virtuels. C&amp;rsquo;est à dire qu&amp;rsquo;on ne créera pas un compte UNIX dédié pour chaque compte. En route!&lt;/p&gt;
&lt;h2 id="2-le-serveur-ldap"&gt;2. Le serveur LDAP&lt;/h2&gt;
&lt;h3 id="21-installation-et-configuration"&gt;2.1 Installation et configuration&lt;/h3&gt;
&lt;div class="highlight"&gt;&lt;pre tabindex="0" style="color:#f8f8f2;background-color:#272822;-moz-tab-size:4;-o-tab-size:4;tab-size:4;-webkit-text-size-adjust:none;"&gt;&lt;code class="language-fallback" data-lang="fallback"&gt;&lt;span style="display:flex;"&gt;&lt;span&gt;debian:~# apt-get install slapd ldap-utils
&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;p&gt;Mot de passe administrateur : xxxx&lt;/p&gt;</description></item><item><title>Gestion des disques avancée : LVM et RAID Soft</title><link>https://www.morot.fr/gestion-des-disques-avancee-lvm-et-raid-soft/</link><pubDate>Tue, 25 Sep 2007 22:42:48 +0000</pubDate><guid isPermaLink="false">http://www.morot.fr/?p=35</guid><description>&lt;h2 id="1-lvm2--le-gestionnaire-de-volumes-logiques"&gt;1 LVM2 : Le gestionnaire de volumes logiques&lt;/h2&gt;
&lt;h3 id="11-introduction-à-lvm-"&gt;1.1 Introduction à LVM :&lt;/h3&gt;
&lt;h4 id="111-pourquoi-aurais-je-besoin-de-lvm-"&gt;1.1.1 Pourquoi aurais-je besoin de LVM ?&lt;/h4&gt;
&lt;p&gt;LVM est un mécanisme permettant de gérer l&amp;rsquo;allocation de l&amp;rsquo;espace disque aux applications et au utilisateurs à un niveau d&amp;rsquo;abstraction plus élevé que la conception habituelle des disques et partitions. Cette abstraction permet ainsi de s&amp;rsquo;affranchir des limitations de la gestion du stockage par partitions.&lt;/p&gt;
&lt;p&gt;Les volumes logiques peuvent êtres redimensionnés, étendus sur un autre disques ou déplacés sur le système de stockage sous jacent sans les risques du redimmensionnement des partitions. Ils sont également nommés par des labels définis par l&amp;rsquo;utilisateurs sans recourir à la notation habituelle des disques (sda, sdb etc&amp;hellip;).&lt;/p&gt;</description></item><item><title>Serveur Linux haute disponibilité</title><link>https://www.morot.fr/serveur-linux-haute-disponibilite/</link><pubDate>Wed, 19 Sep 2007 21:40:50 +0000</pubDate><guid isPermaLink="false">http://www.morot.fr/?p=34</guid><description>&lt;h2 id="1-introduction-"&gt;1. Introduction :&lt;/h2&gt;
&lt;h3 id="11-principe-de-fonctionnement-"&gt;1.1 Principe de fonctionnement :&lt;/h3&gt;
&lt;p&gt;Contrairement à un certain nombres de systèmes comme les annuaires LDAP et les serveurs de base de données, les serveurs de fichiers ne possèdent pas de mécanisme natif de réplication. Nous allons voir ici commentre mettre en place un serveur avec réplication de données sur un deuxième serveur qui prendra le relais en cas de panne sur le serveur principal. Ce mécanisme attribuera l&amp;rsquo;IP virtuelle utilisée par les clients et basculera les données et les services réseaux sur le second serveur. Nous mettrons en évidence le fonctionnement en réalisant un serveur Web haute dispo.&lt;/p&gt;</description></item><item><title>Création d'un bridge pour VirtualBox</title><link>https://www.morot.fr/creation-dun-bridge-pour-virtualbox/</link><pubDate>Tue, 11 Sep 2007 21:28:44 +0000</pubDate><guid isPermaLink="false">http://www.morot.fr/?p=32</guid><description>&lt;p&gt;On commence par installer le package nécessaire : bridge-utils et uml_utilities&lt;/p&gt;
&lt;p&gt;Ensuite, on libère l&amp;rsquo;ip de la carte réseau qui sera &amp;ldquo;pontée&amp;rdquo; : ifconfig eth0 0.0.0.0&lt;/p&gt;
&lt;p&gt;On créé le pont en y attachant notre carte réseau eth0. Cette carte peut désormais recevoir une adresse, ici en DHCP :&lt;/p&gt;
&lt;div class="highlight"&gt;&lt;pre tabindex="0" style="color:#f8f8f2;background-color:#272822;-moz-tab-size:4;-o-tab-size:4;tab-size:4;-webkit-text-size-adjust:none;"&gt;&lt;code class="language-fallback" data-lang="fallback"&gt;&lt;span style="display:flex;"&gt;&lt;span&gt;# brctl addbr br0
&lt;/span&gt;&lt;/span&gt;&lt;span style="display:flex;"&gt;&lt;span&gt;# brctl addif br0 eth0
&lt;/span&gt;&lt;/span&gt;&lt;span style="display:flex;"&gt;&lt;span&gt;# dhcpcd br0
&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;p&gt;Ensuite, il ne reste plus qu&amp;rsquo;à créer notre interface virtuelle qui sera pontée avec les droits de l&amp;rsquo;utilisateurs spécifié. Il est impératif d&amp;rsquo;activer la carte pour qu&amp;rsquo;elle soit utilisable.&lt;/p&gt;</description></item><item><title>Squid 2.6 en proxy transparent</title><link>https://www.morot.fr/squid-2-6-en-proxy-transparent/</link><pubDate>Fri, 22 Dec 2006 21:24:37 +0000</pubDate><guid isPermaLink="false">http://www.morot.fr/?p=30</guid><description>&lt;p&gt;Quand on administre un réseau suffisament grand, on peut ne pas avoir envie de changer la configuration de tous les clients du réseau pour leur adjoindre un proxy. De plus, un petit malin pourrait désactiver la configuration du proxy. La solution est ici de passer par un proxy rendu transparent grace au firewall. La configuration ayant changé sous squid 2.6 voici le nécessaire avec la version 2.6. Partons du principe que le proxy tourne sur le port 8080 et que le serveur fait aussi routeur vers internet et son IP est la 192.168.10.254. On doit avoir dans le squid.conf :&lt;/p&gt;</description></item><item><title>Enregistrer les flux vidéos de France 2 avec mplayer</title><link>https://www.morot.fr/enregistrer-les-flux-videos-de-france-2-avec-mplayer/</link><pubDate>Wed, 18 Oct 2006 21:19:35 +0000</pubDate><guid isPermaLink="false">http://www.morot.fr/?p=28</guid><description>&lt;p&gt;Il suffit de trouver dans le code source de la page l&amp;rsquo;adresse du flux.
Ensuite :&lt;/p&gt;
&lt;div class="highlight"&gt;&lt;pre tabindex="0" style="color:#f8f8f2;background-color:#272822;-moz-tab-size:4;-o-tab-size:4;tab-size:4;-webkit-text-size-adjust:none;"&gt;&lt;code class="language-fallback" data-lang="fallback"&gt;&lt;span style="display:flex;"&gt;&lt;span&gt;mplayer mms://.wmv -dumpstream -dumpfile video.wmv
&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;</description></item><item><title>Redondance de serveurs sous Linux</title><link>https://www.morot.fr/redondance-de-serveurs-sous-linux/</link><pubDate>Tue, 10 Oct 2006 21:12:41 +0000</pubDate><guid isPermaLink="false">http://www.morot.fr/?p=26</guid><description>&lt;p&gt;Je suis en train de réarchitecturer un réseau en haut disponibilité. Pour cela les serveurs vont par paire. Lorsque le maitre lâche, il faut qu&amp;rsquo;une bascule s&amp;rsquo;opère vers le second serveur. Pour cela Heartbeat est un outils formidable. Il permet de basculer une ou plusieurs adresses IP d&amp;rsquo;un serveur à un autre si le premier serveur tombe. Dans le fichier /etc/ha.d/ha.cf, on commence par décrire les noeuds présents dans la grappe. Ce doit être des noms résolvables. On définit également la méthode de communication. Dans mon cas il s&amp;rsquo;agit du premier port série.&lt;/p&gt;</description></item><item><title>Configuration d'un serveur DNS avec Bind</title><link>https://www.morot.fr/configuration-dun-serveur-dns-avec-bind/</link><pubDate>Sat, 07 Oct 2006 18:56:25 +0000</pubDate><guid isPermaLink="false">http://www.morot.fr/?p=1360</guid><description>&lt;p&gt;Le DNS, Domain Name System (Système de Noms de Domaines) constitue l&amp;rsquo;épine dorsale d&amp;rsquo;un réseau comme internet. Le DNS permet la résolution des noms alphanumériques que les humains manipulent, &lt;a href="https://www.google.fr"&gt;www.google.fr&lt;/a&gt; par exemple, en adresses IP manipulables par les ordinateurs. Le Reverse DNS constitue le procédé inverse. Nous verrons dans un premier temps comment
le système DNS fonctionne. Ensuite nous aborderons ce mécanisme par l&amp;rsquo;installation et la configuration de BIND, le serveur DNS le plus répandu sous UNIX.&lt;/p&gt;</description></item><item><title>Installation d'un KDC Kerberos</title><link>https://www.morot.fr/installation-dun-kdc-kerberos/</link><pubDate>Thu, 21 Oct 2004 08:20:22 +0000</pubDate><guid isPermaLink="false">http://www.morot.fr/?p=1361</guid><description>&lt;h2 id="i-introduction-"&gt;I) Introduction :&lt;/h2&gt;
&lt;p&gt;Dans le mécanisme traditonnel d&amp;rsquo;authentification, les utilisateurs prouvent leur identité au moyen d&amp;rsquo;un mot de passe. Ce système ne sait pas vérifier si l&amp;rsquo;utilisateur distant a volé le mot de passe ni même si le système distant est un système criminel masqué derrière une adresse dérobée.&lt;/p&gt;
&lt;p&gt;Dans le système d&amp;rsquo;authentification Kerberos, lorsque un utilisateur tente de se connecter à un système, un hôte, le Key Distribution Center (centre de distribution des clés ou KDC) va vérifier les identités des deux parties avant de valider une authentification et en cas de succès, il va avertir chacune des deux parties que l&amp;rsquo;autre est bien celui qu&amp;rsquo;il prétend être.&lt;/p&gt;</description></item><item><title>Postfix : lutte contre les virus et les spams</title><link>https://www.morot.fr/postfix-lutte-contre-les-virus-et-les-spams/</link><pubDate>Sat, 11 Sep 2004 22:16:10 +0000</pubDate><guid isPermaLink="false">http://www.morot.fr/?p=1362</guid><description>&lt;h2 id="i-introduction-"&gt;I) Introduction :&lt;/h2&gt;
&lt;p&gt;Dans cette documentation nous allons apprendre
à mettre en place un antivirus et un antispam directement sur le serveur MTA. Ceci permet d&amp;rsquo;une part de traiter le plus tôt possible les messages incriminés et d&amp;rsquo;autre part, cela permet à tous les clients du système de messagerie d&amp;rsquo;être protégés.&lt;/p&gt;
&lt;p&gt;L&amp;rsquo;installation de ces services se fera sur
une distribution Debian Sarge (Debian 3.1) avec les logiciels suivants :&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;Postfix 2.1.3&lt;/li&gt;
&lt;li&gt;Clamav 0.75.1&lt;/li&gt;
&lt;li&gt;Spamassassin 2.64&lt;/li&gt;
&lt;li&gt;Pyzor 0.4.0.0&lt;/li&gt;
&lt;li&gt;Amavisd-new 20030616p10-3&lt;/li&gt;
&lt;li&gt;Procmail 3.22&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;Sous Debian Sarge, les noms des paquets à installer une fois Postfix configuré sont :&lt;/p&gt;</description></item><item><title>Configuration de Proftpd</title><link>https://www.morot.fr/configuration-de-proftpd/</link><pubDate>Sat, 06 Dec 2003 16:36:53 +0000</pubDate><guid isPermaLink="false">http://www.morot.fr/?p=1363</guid><description>&lt;h2 id="i-introduction-"&gt;I) Introduction :&lt;/h2&gt;
&lt;p&gt;Proftpd est un serveur FTP particulièrement apprécié. C&amp;rsquo;est l&amp;rsquo;une des meilleurs solutions disponibles actuellement. Il est distribué sous licence GPL, supportes les Hôtes Virtuels et est particulièrement simple à configurer. La syntaxe de son fichier de configuration est particulièrement proche de celle de Apache. Il supporte également l&amp;rsquo;utilisation d&amp;rsquo;une base de données SQL MySQL ou PostgreSQL ou d&amp;rsquo;un annuaire LDAP pour authentifier les utilisateurs&lt;/p&gt;
&lt;p&gt;Il s&amp;rsquo;installe sous Debian de la manière suivante :&lt;/p&gt;</description></item><item><title>Mise en place d'un NIDS avec Snort</title><link>https://www.morot.fr/mise-en-place-dun-nids-avec-snort/</link><pubDate>Tue, 07 Oct 2003 22:19:16 +0000</pubDate><guid isPermaLink="false">http://www.morot.fr/?p=1365</guid><description>&lt;h2 id="i-introduction-"&gt;I) Introduction :&lt;/h2&gt;
&lt;p&gt;Le terme NIDS signifie Network Intrusion Detection System, soit Système de détection d&amp;rsquo;intrusions réseaux en français. Inutile de s&amp;rsquo;attarder la dessus, je pense que le terme est suffisament parlant pour comprendre le rôle d&amp;rsquo;un NIDS.&lt;/p&gt;
&lt;p&gt;L&amp;rsquo;installation au cours de la documentation se fera sur un serveur en Debian Woody avec le paquet Debian des logiciels. Pour ceux partant des sources de snort, pensez à mettre &amp;ndash;with-mysql=/usr/lib/mysql en paramètre du configure. Le report des alertes sera fait dans une base de données MySQL et nous mettrons en place une interface de visualisations des alertes générées par snort en PHP. Il faudra donc pour la suite de l&amp;rsquo;article un système Apache/PHP/Mysql fonctionnel pour la suite de cet article.&lt;/p&gt;</description></item><item><title>Xinetd</title><link>https://www.morot.fr/xinetd/</link><pubDate>Sun, 13 Jul 2003 14:31:13 +0000</pubDate><guid isPermaLink="false">http://www.morot.fr/?p=24</guid><description>&lt;h2 id="i-introduction-"&gt;I) Introduction :&lt;/h2&gt;
&lt;p&gt;Xinetd est le remplaçant de Inetd. Inetd est ce qu&amp;rsquo;on appele un serveur de démons. Il permet de lancer un service lorsqu&amp;rsquo;une connexion sur le port correspondant se fait jour. Imaginons que vous ne receviez que 3 connexions quotidiennes sur votre serveur POP3. Il serait peut être plus rentable de ne lancer le serveur que lorsque c&amp;rsquo;est nécessaire. Cela évite de gaspiller du temps CPU et de la mémoire.&lt;/p&gt;</description></item><item><title>Configuration d'Apache</title><link>https://www.morot.fr/configuration-dapache/</link><pubDate>Mon, 10 Mar 2003 12:03:06 +0000</pubDate><guid isPermaLink="false">http://www.morot.fr/?p=1366</guid><description>&lt;h2 id="i-introduction-"&gt;I) Introduction :&lt;/h2&gt;
&lt;p&gt;Apache est le serveur Web le plus utilisé au monde, environ 65% de taux d&amp;rsquo;utilisation d&amp;rsquo;après les statisques Netcraft. Il est disponibles en version GNU/Linux, *BSD, Windows ainsi que pour d&amp;rsquo;autres Unix. C&amp;rsquo;est un logiciel fiable, performant et possédant de nombreuses fonctionnalités via l&amp;rsquo;utilisation de modules.
Nous verrons ici la mise en place d&amp;rsquo;Apache conjointement avec l&amp;rsquo;installation de PHP4, language très répandu pour son domaine de prédilection, les pages dynamiques, grâce à son excellent support des bases de données.&lt;/p&gt;</description></item><item><title>La planification de tâches : AT et CRON</title><link>https://www.morot.fr/la-planification-de-taches-at-et-cron/</link><pubDate>Thu, 16 Jan 2003 21:42:01 +0000</pubDate><guid isPermaLink="false">http://www.morot.fr/?p=1367</guid><description>&lt;h2 id="i-tâche-récurrente--cron"&gt;I) Tâche récurrente : Cron&lt;/h2&gt;
&lt;p&gt;Cron est un démon utilisé pour planifier des tâches qui devront être exécutées manière répétées dans le temps, par exemple une sauvegarde toutes les nuits à 4H. Cron est régit par le démon crond, par conséquent il doit être lancé pour que vous puissiez l&amp;rsquo;utiliser. Il existe deux fichiers pour limiter les utilisateurs ayant le droit de se servir de cron, /etc/cron.allow pour permettre et /etc/cron.deny pour refuser. Il suffit dans ces fichiers de lister un utilisateur par ligne, les utilisateurs autorisés ou refusés.&lt;/p&gt;</description></item><item><title>Gestion des comptes utilisateurs</title><link>https://www.morot.fr/gestion-des-comptes-utilisateurs/</link><pubDate>Tue, 07 Jan 2003 19:03:56 +0000</pubDate><guid isPermaLink="false">http://www.morot.fr/?p=1368</guid><description>&lt;h2 id="i-ajouter-et-supprimer-un-utilisateur-"&gt;I) Ajouter et Supprimer un utilisateur :&lt;/h2&gt;
&lt;p&gt;La commande classique pour ajouter un utilisateur est&lt;/p&gt;
&lt;div class="highlight"&gt;&lt;pre tabindex="0" style="color:#f8f8f2;background-color:#272822;-moz-tab-size:4;-o-tab-size:4;tab-size:4;-webkit-text-size-adjust:none;"&gt;&lt;code class="language-fallback" data-lang="fallback"&gt;&lt;span style="display:flex;"&gt;&lt;span&gt;useradd
&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;p&gt;. Cependant, il est plus facile d&amp;rsquo;utiliser adduser, une interface à useradd. Utiliser adduser vous dispense d&amp;rsquo;appeler manuellement passwd pour choisir un mot de passe à l&amp;rsquo;utilisateur et à lui créer un répertoire utilisateur. Les paramètres que vous avez à votre disposition sont les suivantes :&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;Paramètres de adduser :&lt;/strong&gt;-d chemin
Emplacement du répertoire
utilisateur si différent de /home/$utilisateur.
-g groupe
Groupe principal de l&amp;rsquo;utilisateur.
-G groupe 1,&amp;hellip;,groupe n
Groupes supplémentaires
auxquels l&amp;rsquo;utilisateur appartiendra.
-c commentaire
Champ cmmentaire du fichier
/etc/password.
-k répertoire
Répertoire des
fichiers de configuration par défaut si différent de /etc/skel.
-s shell
Shell de l&amp;rsquo;utilisateur,
en général /bin/bash est spécifié par défaut.
-p mot de passe
Mot de passe.
-u uid
User Identifiant (UID) pour
cet utilisateur.
-e date
Date d&amp;rsquo;expiration, au
format AAAA-MM-JJ.
-f nombre de jours
Nombre de jours après
l&amp;rsquo;expiration d&amp;rsquo;un mot de passe avant que le compte ne soit désactivé.&lt;/p&gt;</description></item><item><title>Monter un VPN avec pppd et ssh</title><link>https://www.morot.fr/monter-un-vpn-avec-pppd-et-ssh/</link><pubDate>Sat, 21 Dec 2002 14:55:17 +0000</pubDate><guid isPermaLink="false">http://www.morot.fr/?p=25</guid><description>&lt;h2 id="i-introduction-"&gt;I) Introduction /:&lt;/h2&gt;
&lt;p&gt;Cet article a pour but de vous expliquer comment monter un lien VPN avec l&amp;rsquo;outil pppd et ssh.&lt;/p&gt;
&lt;h2 id="ii-ce-quest-un-vpn-"&gt;II) Ce qu&amp;rsquo;est un VPN :&lt;/h2&gt;
&lt;p&gt;Un VPN permet de relier deux sites qui sont loins physiquement afin de donner l&amp;rsquo;illusion que les sites se retrouvent dans le même réseau local. Donc pour communiquer entre les deux sites on peut très bien utiliser des classes IP non routables sur internet : ça permet de sécuriser les émissions et réceptions. VPN veut dire Virtual Private Network.&lt;/p&gt;</description></item><item><title>Configurer LILO</title><link>https://www.morot.fr/configurer-lilo/</link><pubDate>Fri, 29 Nov 2002 21:25:00 +0000</pubDate><guid isPermaLink="false">http://www.morot.fr/?p=1348</guid><description>&lt;h2 id="i-introduction-"&gt;I) Introduction :&lt;/h2&gt;
&lt;p&gt;LILO, LInux LOader est le chargeur de boot historique du système GNU/Linux. C&amp;rsquo;est pour cette raison que c&amp;rsquo;est celui-ci qui est choisi par défaut par la plupart des distributions. Cependant Lilo ne permet pas seulement de charger un noyau Linux. Il permet aussi d&amp;rsquo;amorcer d&amp;rsquo;autres Unix, et les sytèmes Windows par enchaînement de chargeurs de boot. Un autre chargeur devient de plus en plus populaire, il s&amp;rsquo;agit de GRUB. Il est plus puissant que Lilo, sa syntaxe de configuration est presque aussi simple et claire mais je ne l&amp;rsquo;aborderais nullement ici.&lt;/p&gt;</description></item><item><title>Les droits sous Unix</title><link>https://www.morot.fr/les-droits-sous-unix/</link><pubDate>Sun, 01 Sep 2002 21:29:28 +0000</pubDate><guid isPermaLink="false">http://www.morot.fr/?p=1349</guid><description>&lt;h2 id="i-introduction-"&gt;I) Introduction :&lt;/h2&gt;
&lt;p&gt;Le système d&amp;rsquo;exploitation Linux et de manière générale tout système d&amp;rsquo;exploitation multi utilisateurs doit savoir gérer différents droits selon différents utilisateurs. Cette gestion est très importante car elle permet de restreindre ou bien de donner des droits à des personnes précises ou bien à des groupes.&lt;/p&gt;
&lt;h2 id="ii-affichons-les-droits-"&gt;II) Affichons les droits :&lt;/h2&gt;
&lt;p&gt;Nous allons dans un premier temps créer un fichier nommé toto par la commande &lt;em&gt;touch toto&lt;/em&gt;.
Pour afficher les droits sur ce fichier, la commande ls nous y aide grandement. Ainsi ls -l toto va vous les afficher.&lt;/p&gt;</description></item><item><title>La gestion des packages debian</title><link>https://www.morot.fr/la-gestion-des-packages-debian/</link><pubDate>Sun, 01 Sep 2002 21:13:52 +0000</pubDate><guid isPermaLink="false">http://www.morot.fr/?p=1351</guid><description>&lt;h2 id="i-introduction-"&gt;I) Introduction :&lt;/h2&gt;
&lt;p&gt;Le but de cette courte documentation est de vous apprendre à utiliser les packages debian, les .deb pour les intimes. Ainsi vous apprendrez à installer, désinstaller, chercher, voir des informations sur les packages.&lt;/p&gt;
&lt;h2 id="ii-la-commande-apt-"&gt;II) La commande apt :&lt;/h2&gt;
&lt;p&gt;Depuis la sortie de la version 2.2 de Debian la commande apt est utilisée pour toutes les manipulations des packages (en frontend, car en backend c&amp;rsquo;est toujours dselect qui est utilisé).
Avant tout il faut avoir un fichier /etc/apt/sources.list de correct. Pour cela je vous conseille très fortement de lire la page de manuel s&amp;rsquo;y rapportant (man 5 sources.list), il existe aussi une petite interface sympathique pour gérer ce fichier c&amp;rsquo;est de lancer la commande apt-setup.
Ainsi pour les personnes disposants d&amp;rsquo;une connexion haut débit il est plus intéressant de choisir une sources http ou bien ftp. Mais pour les personnes possédant une connexion rtc voire même pas de connexion du tout il est bien plus judicieux de choisir la méthode par cdrom.
Et pour les plus courageux il reste encore une solution de prendre son éditeur de texte favori et d&amp;rsquo;éditer le fichier /etc/apt/sources.list.&lt;/p&gt;</description></item><item><title>Monter un domaine NIS</title><link>https://www.morot.fr/monter-un-domaine-nis/</link><pubDate>Thu, 15 Aug 2002 11:57:33 +0000</pubDate><guid isPermaLink="false">http://www.morot.fr/?p=1355</guid><description>&lt;h2 id="i-introduction-"&gt;I) Introduction :&lt;/h2&gt;
&lt;p&gt;Un domaine NIS sert à centraliser des informations sur un réseau Unix. Par exemple, vous possédez un réseau de 30 postes et sur chaque poste vous avez autant d&amp;rsquo;utilisateurs déclarés car vos utilisateurs n&amp;rsquo;utilisent pas toujours le même poste. De même vous avez souvent à modifier votre fichiers /etc/hosts pour ajouter ou supprimer une machine. Si vous devez effectuer des opérations sur ces fichiers sur chacun des postes de votre réseau, vous allez y passer la journée. Alors pourquoi ne pas créer simplement un domaine NIS qui partagera ces informations sans que vous n&amp;rsquo;ayez à intervenir sur les clients par la suite?&lt;/p&gt;</description></item><item><title>Partage de fichiers avec NFS</title><link>https://www.morot.fr/partage-de-fichiers-avec-nfs/</link><pubDate>Wed, 14 Aug 2002 12:05:43 +0000</pubDate><guid isPermaLink="false">http://www.morot.fr/?p=1357</guid><description>&lt;h2 id="i-introduction-"&gt;I) Introduction :&lt;/h2&gt;
&lt;p&gt;NFS est le protocole standard sous Unix pour partager des fichiers. Pour ce faire, vous devrez compiler la partie concernant NFS dans votre kernel en built-in ou bien en modules dans la section File systems / Network File Systems et sélectionner :&lt;/p&gt;
&lt;p&gt;NFS file system support&lt;/p&gt;
&lt;p&gt;Provide NFSv3 client support&lt;/p&gt;
&lt;p&gt;NFS server support&lt;/p&gt;
&lt;p&gt;Provide NFS server support&lt;/p&gt;
&lt;p&gt;Ensuite vous devrez installer certains paquetages :&lt;/p&gt;
&lt;p&gt;Sous Debian : apt-get install portmap nfs-common nfs-kernel-server&lt;/p&gt;</description></item><item><title>Franciser une Debian Woody</title><link>https://www.morot.fr/franciser-une-debian-woody/</link><pubDate>Tue, 16 Jul 2002 23:13:25 +0000</pubDate><guid isPermaLink="false">http://www.morot.fr/?p=1350</guid><description>&lt;h2 id="i-introduction-"&gt;I) Introduction :&lt;/h2&gt;
&lt;p&gt;Lorsque j&amp;rsquo;ai souhaité franciser ma woody, je me suis fortement appuyé sur le how-to debian french et donc je continuerais à m&amp;rsquo;appuyer dessus ici. Par contre ici je n&amp;rsquo;appliquerais mes propos qu&amp;rsquo;à la Woody mais pas la Potatoe malgré la sortie avant hier d&amp;rsquo;une nouvelle release elle demeure en fin de vie. Enfin, mes propos devraient aussi s&amp;rsquo;appliquer à ceux ayant plutot choisis d&amp;rsquo;adopter la version testing (sid).&lt;/p&gt;</description></item><item><title>Gnu Make où comment se simplifier la vie avec les commandes longues et fastidieuses</title><link>https://www.morot.fr/gnu-make-ou-comment-se-simplifier-la-vie-avec-les-commandes-longues-et-fastidieuses/</link><pubDate>Wed, 03 Jul 2002 19:01:30 +0000</pubDate><guid isPermaLink="false">http://www.morot.fr/?p=1347</guid><description>&lt;p&gt;Par Hindy Soliman, le 3 juillet 2002.&lt;/p&gt;
&lt;p&gt;    Dans cette courte documentation nous n&amp;rsquo;utiliserons que Gnu make. Petit rappel sur d&amp;rsquo;autres Unix il se peut que les implantations de la commande make soit en fait celle de BSD. Et la sémantique change quelque peu entre ces deux implantations.&lt;/p&gt;
&lt;p&gt;    Vous avez du remarquer que dans 90% des cas pour compiler un logiciel sous Linux nous utilisons les commandes : configure, make puis make install. Ce qu&amp;rsquo;il est important de prendre en compte c&amp;rsquo;est qu&amp;rsquo;on peut utiliser la commande make sans pour autant compiler des programmes sources. Par exemple lors de la génération des tables NIS on utilise la commande make pour créer celles-ci.&lt;/p&gt;</description></item><item><title>Monter un serveur proxy avec Squid</title><link>https://www.morot.fr/monter-un-serveur-proxy-avec-squid/</link><pubDate>Thu, 30 May 2002 13:58:48 +0000</pubDate><guid isPermaLink="false">http://www.morot.fr/?p=1358</guid><description>&lt;h2 id="i-introduction-"&gt;I) Introduction :&lt;/h2&gt;
&lt;p&gt;Le serveur proxy que nous allons apprendre à configurer s&amp;rsquo;appelle squid. C&amp;rsquo;est un logiciel largement répandu sous Linux pour les proxy et tout naturellement c&amp;rsquo;est un logiciel sous licence GPL. Pour rappel, un serveur proxy sert à mettre en cache les pages que vous avez déjà visitées pour éviter de les télécharger à nouveau si vous allez une nouvelle fois les consulter. Cette fonction est donc équivalente au cache de votre navigateur mais le grand avantage est qu&amp;rsquo;elle permet d&amp;rsquo;en faire profiter l&amp;rsquo;ensemble de votre réseau. Pour l&amp;rsquo;installer, rien de plus simple si vous utilisez une distribution qui gère les dépendances entre paquets comme apt-get sous Debian, sinon utilisez les sources.&lt;/p&gt;</description></item><item><title>Firewall avec Netfilter</title><link>https://www.morot.fr/firewall-avec-netfilter/</link><pubDate>Tue, 28 May 2002 14:08:00 +0000</pubDate><guid isPermaLink="false">http://www.morot.fr/?p=1359</guid><description>&lt;h2 id="i-introduction-"&gt;I) Introduction :&lt;/h2&gt;
&lt;p&gt;Dans cette article, nous verrons la mise en place d&amp;rsquo;un firewall sous Linux (kernel 2.4) au travers de trois exemples. Le premier correspondra à une machine isolée ayant accès à Internet, le deuxième sera celui d&amp;rsquo;une machine faisant office de routeur/firewall pour un petit réseau domestique, enfin nous verrons la configuration de netfilter dans un réseau comprenant une zone démilitarisée (DMZ) en ajoutant une troisième patte à notre routeur.&lt;/p&gt;</description></item><item><title>Mise en place d'un serveur DHCP</title><link>https://www.morot.fr/mise-en-place-dun-serveur-dhcp/</link><pubDate>Tue, 26 Mar 2002 21:26:23 +0000</pubDate><guid isPermaLink="false">http://www.morot.fr/?p=1353</guid><description>&lt;h2 id="i-introduction-"&gt;I) Introduction :&lt;/h2&gt;
&lt;p&gt;DHCP signifie Dynamic Host Control Protol soit protocole de contrôle des hôtes dynamique. L&amp;rsquo;interet de DHCP repose en fait sur 2 principes. Pour le premier, imaginez une situation ou vous possédez une adresse réseau publique de classe A, ce qui permet donc d&amp;rsquo;avoir jusqu&amp;rsquo;à 254 hôtes sur le résau et que 300 machines y sont connectées de façon intermittente. Comment permettre leur cohabitation? Et bien il suffit de leur allouer une adresse IP de façon dynamique qu&amp;rsquo;elle conserveront durant un certain laps de temps définit qui s&amp;rsquo;appelle le bail. Pas encore convaincu? C&amp;rsquo;est normal c&amp;rsquo;est un cas d&amp;rsquo;utilisation un peu limite&lt;/p&gt;</description></item><item><title>Samba en contrôleur de domaine</title><link>https://www.morot.fr/samba-en-controleur-de-domaine/</link><pubDate>Tue, 19 Mar 2002 11:32:09 +0000</pubDate><guid isPermaLink="false">http://www.morot.fr/?p=1356</guid><description>&lt;h2 id="i-introduction-"&gt;I) Introduction :&lt;/h2&gt;
&lt;p&gt;Nous allons voir au travers de cette courte documentation comment faire pour que Samba agisse comme un PDC (Primary Domain Controleur) ou bien CPD si vous préférez le français. En plus de permettre de partager des fichiers et des imprimantes, Samba est capable d&amp;rsquo;agir comme un émulateur de Serveur Windows NT avec l&amp;rsquo;avantage tous les avantages des logiciels libre. À titre d&amp;rsquo;information, la seule chose qu&amp;rsquo;un serveur NT sait faire et que Samba ne sait pas faire, c&amp;rsquo;est la mise en place de serveur Wins de secours.
Pour les personnes cherchantde plus amples informations sur le paramétrage de samba, je vous suggère de lire les pages de man (en particulier le man smb.conf) et surtout de lire la documentation complète disponible sur le site de samba, bien que celle-ci soit en anglais.&lt;/p&gt;</description></item><item><title>Partager une connexion Internet</title><link>https://www.morot.fr/partager-une-connexion-internet/</link><pubDate>Thu, 21 Feb 2002 21:39:06 +0000</pubDate><guid isPermaLink="false">http://www.morot.fr/?p=1354</guid><description>&lt;h2 id="i-introduction-"&gt;I) Introduction :&lt;/h2&gt;
&lt;p&gt;Nous verrons ici la mise en place d&amp;rsquo;une passerelle (en anglais gateway) sous Linux afin de permettre le partage d&amp;rsquo;une connexion internet entre plusieurs ordinateurs. On utilise pour cela le principe de l&amp;quot;IP Masquerading&amp;quot; ou masquage d&amp;rsquo;IP. L&amp;rsquo;ordinateur qui sert de passerelle n&amp;rsquo;est pas nécessairement une bête de course mais il doit par contre posséder 2 interfaçes réseau comme un modem rtc analogique classique et une carte réseau Ethernet.&lt;/p&gt;</description></item><item><title>Gestion des archives TAR et RPM</title><link>https://www.morot.fr/gestion-des-archives-tar-et-rpm/</link><pubDate>Wed, 17 Oct 2001 21:14:02 +0000</pubDate><guid isPermaLink="false">http://www.morot.fr/?p=1352</guid><description>&lt;h2 id="i-les-archives-tar-"&gt;I) Les archives tar :&lt;/h2&gt;
&lt;p&gt;Le mot &amp;ldquo;tar&amp;rdquo; est le résultat de la contraction de &amp;ldquo;tape archiver&amp;rdquo; programme utilisé sous Unix pour la création de sauvegardes. Pratiquement tous les paquetages que vous pourrez trouver sur le net ou ailleurs sont distribués archivés avec l&amp;rsquo;utilitaire tar. Mais tar ne fait que de l&amp;rsquo;archivage, il est en général couplé avec les outils gzip ou bzip2. C&amp;rsquo;est pour cela que vous rencontrerez la plupart du temps des archives tar sous la forme archive.tar.gz ou archive.tar.bz2. Gzip et Bzip2 sont des utilitaires de compressions libres mais Bzip2 devient de plus en plus le standard sous Linux du fait de meilleurs taux de compression. En revanche il demande plus de ressources.&lt;/p&gt;</description></item></channel></rss>