<?xml version="1.0" encoding="UTF-8"?><rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	xmlns:wfw="http://wellformedweb.org/CommentAPI/"
	xmlns:dc="http://purl.org/dc/elements/1.1/"
	xmlns:atom="http://www.w3.org/2005/Atom"
	xmlns:sy="http://purl.org/rss/1.0/modules/syndication/"
	xmlns:slash="http://purl.org/rss/1.0/modules/slash/"
	
	xmlns:georss="http://www.georss.org/georss"
	xmlns:geo="http://www.w3.org/2003/01/geo/wgs84_pos#"
	>

<channel>
	<title>Javier Bahillo</title>
	<atom:link href="https://www.jbahillo.com/feed/" rel="self" type="application/rss+xml" />
	<link>https://www.jbahillo.com</link>
	<description>Blog de un Administrador de Sistemas</description>
	<lastBuildDate>Thu, 18 Aug 2016 08:09:50 +0000</lastBuildDate>
	<language>es</language>
	<sy:updatePeriod>
	hourly	</sy:updatePeriod>
	<sy:updateFrequency>
	1	</sy:updateFrequency>
	<generator>https://wordpress.org/?v=5.7.1</generator>
<site xmlns="com-wordpress:feed-additions:1">104599648</site>	<item>
		<title>Inflamable significa flamable</title>
		<link>https://www.jbahillo.com/inflamable-significa-flamable/</link>
					<comments>https://www.jbahillo.com/inflamable-significa-flamable/#respond</comments>
		
		<dc:creator><![CDATA[Javier Bahillo]]></dc:creator>
		<pubDate>Tue, 05 Apr 2016 12:18:09 +0000</pubDate>
				<category><![CDATA[GNU/Linux]]></category>
		<category><![CDATA[JFS]]></category>
		<category><![CDATA[nfs]]></category>
		<guid isPermaLink="false">http://www.jbahillo.com/?p=801</guid>

					<description><![CDATA[<p>Solución al error de JFS:</p>
<p>(116)Stale NFS file handle: Error retrieving pid file /var/run/apache2.pid</p>
<p class="more-link-p"><a class="more-link" href="https://www.jbahillo.com/inflamable-significa-flamable/">Read more &#8594;</a></p>
<p>The post <a href="https://www.jbahillo.com/inflamable-significa-flamable/">Inflamable significa flamable</a> first appeared on <a href="https://www.jbahillo.com">Javier Bahillo</a>.</p>]]></description>
										<content:encoded><![CDATA[<p>Hoy, tratando una incidencia en un cluster un tanto bizarro (cluster de DRBD con OCFS2, NFS y JFS) me encontré con una incidencia que aún me hizo perder algo de tiempo, y que se resume perfectamente en la frase del título del post, conocido por el siguiente capítulo de los Simpsons:</p>
<p><iframe class='youtube-player' width='560' height='315' src='https://www.youtube.com/embed/NfJdL583-UA?version=3&#038;rel=1&#038;showsearch=0&#038;showinfo=1&#038;iv_load_policy=1&#038;fs=1&#038;hl=es-ES&#038;autohide=2&#038;wmode=transparent' allowfullscreen='true' style='border:0;' sandbox='allow-scripts allow-same-origin allow-popups allow-presentation'></iframe></p>
<p>Básicamente, lanzando un sencillo apache enjaulado me topé con el siguiente error:</p>
<p>(116)Stale NFS file handle: Error retrieving pid file /var/run/apache2.pid</p>
<p>Muy bien, dije yo, vamos a que ver que punto de montaje está sobre NFS. Pero resulta que el punto de montaje de NFS era /var/apache/foobar y no en la ubicación que reclamaba el error.</p>
<p>Revisando los puntos de montaje, parecía que dicho path estuviese sobre el JFS, pero, ¿entonces, qué sentido tenía el error?</p>
<p>La solución, tras un buen rato, la encontré en esta lista de correos:<br />
http://marc.info/?l=jfs-discussion&#038;m=128707085832398&#038;w=2</p>
<p>Básicamente, JFS puede arrojar este error en un sistema de archivos que no esté limpio (pudiendo darse incluso en sistemas que no hacen uso de NFS para nada). Para más INRI, fsck.jfs, si no se lanza con la opción -f, reporta el sistema de archivos como limpio.</p>
<p>Por tanto si llegas aquí buscando entender este error, la solución es tan sencilla como lanzar un fsck.jfs -f punto/de/montaje</p>
<p>Dejemos a un lado lo bizarro que pueda resultar que un sistema de archivos arroje mensajes de error sobre otro sistema de archivos que puede ni siquiera estar presente en la máquina&#8230;</p><p>The post <a href="https://www.jbahillo.com/inflamable-significa-flamable/">Inflamable significa flamable</a> first appeared on <a href="https://www.jbahillo.com">Javier Bahillo</a>.</p>]]></content:encoded>
					
					<wfw:commentRss>https://www.jbahillo.com/inflamable-significa-flamable/feed/</wfw:commentRss>
			<slash:comments>0</slash:comments>
		
		
		<post-id xmlns="com-wordpress:feed-additions:1">801</post-id>	</item>
		<item>
		<title>Fin de año</title>
		<link>https://www.jbahillo.com/fin-de-ano/</link>
					<comments>https://www.jbahillo.com/fin-de-ano/#respond</comments>
		
		<dc:creator><![CDATA[Javier Bahillo]]></dc:creator>
		<pubDate>Wed, 30 Dec 2015 10:12:22 +0000</pubDate>
				<category><![CDATA[GNU/Linux]]></category>
		<guid isPermaLink="false">http://www.jbahillo.com/?p=794</guid>

					<description><![CDATA[<p>Llegamos al fin de un año, y toca el consabido repaso de todo lo que ha pasado, las cosas buenas yu malas. La verdad es que creo que este año ha colmado con creces las expectativas, dado que ha estado&#8230;</p>
<p class="more-link-p"><a class="more-link" href="https://www.jbahillo.com/fin-de-ano/">Read more &#8594;</a></p>
<p>The post <a href="https://www.jbahillo.com/fin-de-ano/">Fin de año</a> first appeared on <a href="https://www.jbahillo.com">Javier Bahillo</a>.</p>]]></description>
										<content:encoded><![CDATA[<p>Llegamos al fin de un año, y toca el consabido repaso de todo lo que ha pasado, las cosas buenas yu malas.</p>
<p>La verdad es que creo que este año ha colmado con creces las expectativas, dado que ha estado cargado de buenas noticias, tanto en lo personal, como en lo profesional.</p>
<p>Empezando por lo personal, como no, el nacimiento de mis dos peques lo dice todo. Han cambiado nuestra vida, y solo yo mi mi pareja sabemos cuán deseadas eran. Por otro lado también esta el compromiso con mi pareja. cómo no&#8230;</p>
<p>En lo laboral, por un lado el check de haber completado la adquisición de un título «oficial» a parte de las certificaciones que había  adquirido ya el año anterior. Realmente ha sido duro por tener que compaginarlo con el trabajo, por un lado, y con la época del embarazo, por otro. Sólo agradecerle a mi futura mujer el esfuerzo que hizo para que yo pudiese dedicarle el tiempo suficiente.<br />
Por otra parte, el «ascenso» pasando a ser definitivamente Administrador de sistemas de la empresa es una noticia que me llenó de sinsabores, puesto que el puesto era más que deseado, pero llegó a partir de la marcha de la empresa de un compañero con el que compartí muchos momentos tanto profesionales (esas migraciones nocturnas..) como personales.</p>
<p>En cualquier caso creo que solo podemos decir que este año ha sido más que completo y más que intenso&#8230; ¿qué nos deparará el año que viene&#8230;?</p><p>The post <a href="https://www.jbahillo.com/fin-de-ano/">Fin de año</a> first appeared on <a href="https://www.jbahillo.com">Javier Bahillo</a>.</p>]]></content:encoded>
					
					<wfw:commentRss>https://www.jbahillo.com/fin-de-ano/feed/</wfw:commentRss>
			<slash:comments>0</slash:comments>
		
		
		<post-id xmlns="com-wordpress:feed-additions:1">794</post-id>	</item>
		<item>
		<title>We&#8217;ve moved</title>
		<link>https://www.jbahillo.com/weve-moved/</link>
					<comments>https://www.jbahillo.com/weve-moved/#respond</comments>
		
		<dc:creator><![CDATA[Javier Bahillo]]></dc:creator>
		<pubDate>Mon, 14 Sep 2015 10:09:58 +0000</pubDate>
				<category><![CDATA[GNU/Linux]]></category>
		<guid isPermaLink="false">http://www.jbahillo.com/?p=792</guid>

					<description><![CDATA[<p>We haved just migrated to a new hosting, SiteGround, taking profit of their special offer which covers 1 FREE year of hosting!!.</p>
<p class="more-link-p"><a class="more-link" href="https://www.jbahillo.com/weve-moved/">Read more &#8594;</a></p>
<p>The post <a href="https://www.jbahillo.com/weve-moved/">We’ve moved</a> first appeared on <a href="https://www.jbahillo.com">Javier Bahillo</a>.</p>]]></description>
										<content:encoded><![CDATA[<p>We haved just migrated to a new hosting, SiteGround, taking profit of their special offer which covers 1 FREE year of hosting!!.</p><p>The post <a href="https://www.jbahillo.com/weve-moved/">We’ve moved</a> first appeared on <a href="https://www.jbahillo.com">Javier Bahillo</a>.</p>]]></content:encoded>
					
					<wfw:commentRss>https://www.jbahillo.com/weve-moved/feed/</wfw:commentRss>
			<slash:comments>0</slash:comments>
		
		
		<post-id xmlns="com-wordpress:feed-additions:1">792</post-id>	</item>
		<item>
		<title>New script &gt;set sysvol perm</title>
		<link>https://www.jbahillo.com/new-script-set-sysvol-perm/</link>
					<comments>https://www.jbahillo.com/new-script-set-sysvol-perm/#respond</comments>
		
		<dc:creator><![CDATA[Javier Bahillo]]></dc:creator>
		<pubDate>Fri, 29 Aug 2014 14:00:08 +0000</pubDate>
				<category><![CDATA[GNU/Linux]]></category>
		<category><![CDATA[Zentyal]]></category>
		<category><![CDATA[bash]]></category>
		<category><![CDATA[python]]></category>
		<category><![CDATA[samba]]></category>
		<category><![CDATA[script]]></category>
		<guid isPermaLink="false">http://www.jbahillo.com/?p=782</guid>

					<description><![CDATA[<p>Today I have had to deal with an environment where I had to fix a lot of sysvol permissions, with a lot of different policies with different permissions. I had begun doing it by hand using samba-tool ntacl set sddl-ACL&#8230;</p>
<p class="more-link-p"><a class="more-link" href="https://www.jbahillo.com/new-script-set-sysvol-perm/">Read more &#8594;</a></p>
<p>The post <a href="https://www.jbahillo.com/new-script-set-sysvol-perm/">New script >set sysvol perm</a> first appeared on <a href="https://www.jbahillo.com">Javier Bahillo</a>.</p>]]></description>
										<content:encoded><![CDATA[<p>Today I have had to deal with an environment where I had to fix a lot of sysvol permissions, with a lot of different policies with different permissions.</p>
<p>I had begun doing it by hand using samba-tool ntacl set sddl-ACL patg, but I soon realized this was a nightmare . Thus I invested some time in creating a small script on python that at least did part of this for me:</p>
<pre class="brush: python; gutter: true">import os
import sys
arg = sys.argv[1]
command = &quot;samba-tool ntacl set &quot;
wp = os.getcwd()
for dirname, dirnames, filenames in os.walk(wp):
 os.system(command + &quot;\&quot;&quot; + arg + &quot;\&quot; &quot; + &quot;\&quot;&quot; + dirname + &quot;\&quot;&quot;)
 files = [f for f in os.listdir(dirname) if os.path.isfile(os.path.join(dirname,f))]
    for f in files:
 os.system(command + &quot;\&quot;&quot; + arg + &quot;\&quot; &quot; + &quot;\&quot;&quot; + dirname + &quot;/&quot; + f + &quot;\&quot;&quot;)
</pre>
<p>With this at least I had to do it once per policy. Once done, I just created a bash script that got the path and the sddl from samba-tool ntacl sysvolcheck (and run the script above until this command were ok:</p>
<pre class="brush: bash; gutter: true">#!/bin/bash
until samba-tool ntacl sysvolcheck 2&gt;/dev/null
do

DIR=$(samba-tool ntacl sysvolcheck 2&gt;&amp;1 | grep ERROR | cut -d&quot; &quot; -f12)
PERM=$(samba-tool ntacl sysvolcheck 2&gt;&amp;1 | grep ERROR | cut -d&quot; &quot; -f19)


cd &quot;$DIR&quot;

python script.py $PERM
done
</pre>
<p>Hope this is useful if you were looking for this. </p>
<p>P.S. You can find the code in <a href="https://github.com/jbahillo/xavy"> my github</a> under GPLv2 as ever</p><p>The post <a href="https://www.jbahillo.com/new-script-set-sysvol-perm/">New script >set sysvol perm</a> first appeared on <a href="https://www.jbahillo.com">Javier Bahillo</a>.</p>]]></content:encoded>
					
					<wfw:commentRss>https://www.jbahillo.com/new-script-set-sysvol-perm/feed/</wfw:commentRss>
			<slash:comments>0</slash:comments>
		
		
		<post-id xmlns="com-wordpress:feed-additions:1">782</post-id>	</item>
		<item>
		<title>HTTPS Transparent proxy in Zentyal</title>
		<link>https://www.jbahillo.com/https-transparent-proxy-in-zentyal/</link>
					<comments>https://www.jbahillo.com/https-transparent-proxy-in-zentyal/#respond</comments>
		
		<dc:creator><![CDATA[Javier Bahillo]]></dc:creator>
		<pubDate>Mon, 05 May 2014 08:54:49 +0000</pubDate>
				<category><![CDATA[GNU/Linux]]></category>
		<category><![CDATA[Zentyal]]></category>
		<guid isPermaLink="false">http://www.jbahillo.com/?p=768</guid>

					<description><![CDATA[<p>Just wrote a small article on how to deploy a HTTPS transparent proxy with Zentyal. Please note that this is a POC only, so not intended for production…. Take a look here Hope it may be interesting for all of&#8230;</p>
<p class="more-link-p"><a class="more-link" href="https://www.jbahillo.com/https-transparent-proxy-in-zentyal/">Read more &#8594;</a></p>
<p>The post <a href="https://www.jbahillo.com/https-transparent-proxy-in-zentyal/">HTTPS Transparent proxy in Zentyal</a> first appeared on <a href="https://www.jbahillo.com">Javier Bahillo</a>.</p>]]></description>
										<content:encoded><![CDATA[<p>Just wrote a small article on how to deploy a HTTPS transparent proxy with Zentyal. Please note that this is a POC only, so not intended for production….</p>
<p>Take a look <a href="http://labs.zentyal.org/https-transparent-proxy-in-zentyal/"> here </a></p>
<p>Hope it may be interesting for all of you!</p><p>The post <a href="https://www.jbahillo.com/https-transparent-proxy-in-zentyal/">HTTPS Transparent proxy in Zentyal</a> first appeared on <a href="https://www.jbahillo.com">Javier Bahillo</a>.</p>]]></content:encoded>
					
					<wfw:commentRss>https://www.jbahillo.com/https-transparent-proxy-in-zentyal/feed/</wfw:commentRss>
			<slash:comments>0</slash:comments>
		
		
		<post-id xmlns="com-wordpress:feed-additions:1">768</post-id>	</item>
		<item>
		<title>ROM SMS installer&#8230;really?</title>
		<link>https://www.jbahillo.com/rom-sms-installer-really/</link>
					<comments>https://www.jbahillo.com/rom-sms-installer-really/#respond</comments>
		
		<dc:creator><![CDATA[Javier Bahillo]]></dc:creator>
		<pubDate>Tue, 22 Apr 2014 09:25:30 +0000</pubDate>
				<category><![CDATA[Android]]></category>
		<category><![CDATA[Seguridad]]></category>
		<guid isPermaLink="false">http://www.jbahillo.com/?p=761</guid>

					<description><![CDATA[<p>While reading my twitter follows this morning I have found this: http://www.xatakandroid.com/aplicaciones-android/flashear-una-nueva-rom-via-sms-ya-es-posible It happened no more than few secons until I begun to though about the possible security implications this system may led to. As far as I could see&#8230;</p>
<p class="more-link-p"><a class="more-link" href="https://www.jbahillo.com/rom-sms-installer-really/">Read more &#8594;</a></p>
<p>The post <a href="https://www.jbahillo.com/rom-sms-installer-really/">ROM SMS installer…really?</a> first appeared on <a href="https://www.jbahillo.com">Javier Bahillo</a>.</p>]]></description>
										<content:encoded><![CDATA[<p>While reading my twitter follows this morning I have found this: http://www.xatakandroid.com/aplicaciones-android/flashear-una-nueva-rom-via-sms-ya-es-posible</p>
<p>It happened no more than few secons until I begun to though about the possible security implications this system may led to. As far as I could see here: http://forum.xda-developers.com/showthread.php?t=2720677 , the app just allows your mobile to perform a download and installation of lastest rom in case  a particular formatted SMS were received.</p>
<p>Now let us think how we restrict this. Will it use mobile phone sender to restrict when this will be done? Well, it does not really matter, as long as SMS sender has been from some time ago easily faked.</p>
<p>Will it be using a particular keyword inside the specific format of this SMS. Well this shall be a password and all we know that passwords can be broken. The easiest case would be by brute-forcing, but we can not dismiss things like GSM-faking and even in the near future UMTS faking as I have recently read an article where it was stated that UMTS might be faked in a similar way that the GSM is, despite the network having to authenticate agains the device (http://www.hojaderouter.com/seguridad/redes-3g-seguridad-ataques/12437)</p>
<p>This being said, it seems this system is restricted to Cyanogen ROMS, so you cannot tell the mobile from where to download the ROM to install, you can just tell it, &#8216;hey download and install the lastest stable. This in a way relieves the impact this might have (somebody could build a hiacked ROM, and then send lots of sms to everywhere telling the mobile to apply that particular ROm, which- for instance- could be sending a summary of any of the rest of your passowrds (mail,bank accounts, whatever you can imagine)</p>
<p>Being discarded this (at first) we still are under the possibility of a DOS attack where an attacker could be once and over again sending formatted sms telling our mobile to download and install a ROM, so you could not even use your mobiles, as it would be continuously rebooting&#8230;.</p><p>The post <a href="https://www.jbahillo.com/rom-sms-installer-really/">ROM SMS installer…really?</a> first appeared on <a href="https://www.jbahillo.com">Javier Bahillo</a>.</p>]]></content:encoded>
					
					<wfw:commentRss>https://www.jbahillo.com/rom-sms-installer-really/feed/</wfw:commentRss>
			<slash:comments>0</slash:comments>
		
		
		<post-id xmlns="com-wordpress:feed-additions:1">761</post-id>	</item>
		<item>
		<title>Syncing Zentyal CA between two Zentyal servers</title>
		<link>https://www.jbahillo.com/syncing-zentyal-ca-between-two-zentyal-servers/</link>
					<comments>https://www.jbahillo.com/syncing-zentyal-ca-between-two-zentyal-servers/#respond</comments>
		
		<dc:creator><![CDATA[Javier Bahillo]]></dc:creator>
		<pubDate>Fri, 21 Feb 2014 18:54:02 +0000</pubDate>
				<category><![CDATA[GNU/Linux]]></category>
		<category><![CDATA[Zentyal]]></category>
		<category><![CDATA[Zentyal-World]]></category>
		<guid isPermaLink="false">http://www.jbahillo.com/?p=747</guid>

					<description><![CDATA[<p>This document describes the procedure to set up CA sync between two Zentyal servers. We will use for this rsync being run in a cron job. We will use root in the side that starts the connection (provided script will&#8230;</p>
<p class="more-link-p"><a class="more-link" href="https://www.jbahillo.com/syncing-zentyal-ca-between-two-zentyal-servers/">Read more &#8594;</a></p>
<p>The post <a href="https://www.jbahillo.com/syncing-zentyal-ca-between-two-zentyal-servers/">Syncing Zentyal CA between two Zentyal servers</a> first appeared on <a href="https://www.jbahillo.com">Javier Bahillo</a>.</p>]]></description>
										<content:encoded><![CDATA[<p>This document describes the procedure to set up CA sync between two Zentyal servers. We will use for this rsync being run in a cron job.<br />
We will use root in the side that starts the connection (provided script will be run by cron) and ebox for the side that receives it. We could use any other user, but using user ebox avoid having to create extra unneeded configurations. For the sake of the example we&#8217;ll be referring to two servers here:</p>
<ol>
<li>(Server A) The server on which the CA existed previously, and from which the files for the CA will be taken.</li>
<li>(Server B). The secondary server to which we want to export the CA which exists on Server A.</li>
</ol>
<p>In order to better understand the procedure we must keep in mind that:<br />
Zentyal CA files are stored on /var/lib/zentyal/CA<br />
This folder has these permissions:</p>
<pre class="brush: bash; gutter: true">drwx r-x --x 9 ebox ebox</pre>
<p>ebox user has as his home the folder /var/lib/zentyal/</p>
<ul>
<li>With this information, we&#8217;ll proceed to follow these steps:Check that rsync is installed in server B, and if not install it.</li>
</ul>
<pre class="brush: bash; gutter: true"> sudo apt-get install rsync</pre>
<ul>
<li>Check if root has a rsa key in server B. If it did not have, create if with ssh-keygen</li>
</ul>
<pre class="brush: bash; gutter: true"> if [ ! -f /root/.ssh/id_rsa.pub ] ; then /usr/bin/ssh-keygen&quot; ; else echo &quot;Key Already exists&quot; ; fi</pre>
<p>&nbsp;</p>
<ul>
<li>Create folder /var/lib/zentyal/.ssh/ and create file authorized_keys</li>
</ul>
<pre class="brush: bash; gutter: true">sudo mkdir -p /var/lib/zentyal/.ssh/
sudo touch /var/lib/zentyal/.ssh/authorized_keys</pre>
<ul>
<li>Chown both to ebox.ebox:</li>
</ul>
<pre class="brush: bash; gutter: true">sudo chown -R ebox.ebox /var/lib/zentyal/.ssh/</pre>
<ul>
<li>Copy the root public key to /var/lib/zentyal/.ssh/authorized_keys of server A. Given ebox user has no password you will have to do it by hand, as long as you won&#8217;t be able to do it with ssh-copy-id . Thus, open /root/.ssh/id_rsa.pub and paste its contents into /var/lib/zentyal/.ssh/authorized_keys of server A.</li>
</ul>
<ul>
<li>Test that you can ssh without using password from root as ebox user:</li>
</ul>
<pre class="brush: actionscript3; gutter: true">sudo ssh ebox@SERVER-A-IP</pre>
<ul>
<li>Now you can:</li>
</ul>
<p style="padding-left: 60px;">1. Limit connections from IP:</p>
<p style="padding-left: 90px;">To do so edit in SERVER A /var/lib/zentyal/.ssh/authorized_keys, and add prior to the ssh-rsa this:</p>
<pre class="brush: bash; gutter: true">from=&quot;SERVER-B-IP&quot; ssh-rsa dasghgdgh+RqUVx5wzgnaMxH2Km5KRx0Wzvsa5YvxjwERVVXs2mUEes5mDpoDMX9pUAwKqPCS5C
LyDwI+t0xNmVzPzeZjhypIfvBmgaG7pBNx7Zted7C+fha1X3SUmT4TguLzy7pfWbG7CKr2XkkFUYUOdUniYc99NsIxY1/51+/jjhfg
jhfg/Pr5jqH+jhfjfgj/jhfgjh+9kErROS1z root@hostname</pre>
<p style="padding-left: 60px;">2.  Ensuring that only rsync is used for this ssh connection:<br />
To do so edit in SERVER A /var/lib/zentyal/.ssh/authorized_keys, and add prior to the ssh-rsa this:</p>
<pre class="brush: bash; gutter: true">command=&quot;/usr/share/bin/check_command.sh” ssh-rsa fdasghgdgh+RqUVx5wzgnaMxH2Km5KRx0Wzvsa5YvxjwERV
VXs2mUEes5mDpoDMX9pUAwKqPCS5CLyDwI+t0xNmVzPzeZjhypIfvBmgaG7pBNx7Zted7C+fha1X3SUmT4TguLzy7pfWbG7CKr
2XkkFUYUOdUniYc99NsIxY1/51+/jjhfgjhfg/Pr5jqH+jhfjfgj/jhfgjh+9kErROS1z root@hostname</pre>
<p style="padding-left: 60px;">Now, you must add the script it mentions this line (script taken from http://troy.jdmz.net/rsync/index.html)</p>
<pre class="brush: bash; gutter: true">#!/bin/sh

case &quot;$SSH_ORIGINAL_COMMAND&quot; in
*\&amp;*)
echo &quot;Rejected&quot;
;;
*\(*)
echo &quot;Rejected&quot;
;;
*\{*)
echo &quot;Rejected&quot;
;;
*\;*)
echo &quot;Rejected&quot;
;;
*\&lt;*)
echo &quot;Rejected&quot;
;;
*\`*)
echo &quot;Rejected&quot;
;;
*\|*)
echo &quot;Rejected&quot;
;;
rsync\ --server*)
$SSH_ORIGINAL_COMMAND
;;
*)
echo &quot;Rejected&quot;
;;
esac</pre>
<p style="padding-left: 60px;">If you use both, separate them with a “,”:</p>
<pre class="brush: bash; gutter: true">from=&quot;SERVER-B-IP&quot;,command=&quot;/usr/share/bin/check_command.sh” ssh-rsa fdasghgdgh+RqUVx5wzgnaMxH2Km5KRx0Wzvsa5Y
vxjwERVVXs2mUEes5mDpoDMX9pUAwKqPCS5CLyDwI+t0xNmVzPzeZjhypIfvBmgaG7pBNx7Zted7C+fha1X3SUmT4TguLzy7pfWbG7CKr2Xkk
FUYUOdUniYc99NsIxY1/51+/jjhfgjhfg/Pr5jqH+jhfjfgj/jhfgjh+9kErROS1z root@hostname</pre>
<p>&nbsp;</p>
<ul>
<li>Create the folder where you&#8217;re going to store the script that will do the sync and give it appropriate permissions:</li>
</ul>
<pre class="brush: bash; gutter: true">mkdir /var/local/rsync-ca
chmod 754 /var/local/rsync-ca</pre>
<p>&nbsp;</p>
<ul>
<li>Create the script file and give it proper permissions:</li>
</ul>
<pre class="brush: bash; gutter: true"> chmod 740 /var/local/sync-ca/rsync-ca</pre>
<p>&nbsp;</p>
<ul>
<li>Place the following content on the script (change variables as needed)</li>
</ul>
<pre class="brush: bash; gutter: true">#!/bin/bash
RSYNC=/usr/bin/rsync
SSH=/usr/bin/ssh
KEY=/root/.ssh/id_rsa
RUSER=ebox
RHOST=SERVER-A-IP
RPATH=/var/lib/zentyal/CA
LPATH=/var/lib/zentyal/
$RSYNC -az -e &quot;$SSH -i $KEY&quot; $RUSER@$RHOST:$RPATH $LPATH</pre>
<p>&nbsp;</p>
<ul>
<li>Test the script and confirm that it works as expected</li>
</ul>
<p>&nbsp;</p>
<ul>
<li>Create the cron job for the script we have just created. For instance, to run this daily write under /etc/cron.d/rsync-ca :</li>
</ul>
<pre class="brush: bash; gutter: true"> # /etc/cron.d/rsync-ca - Runs the script that syncs CA with SERVERA daily

SHELL=/bin/sh
PATH=/usr/bin:/bin

# Log data for report hourly
@daily root /var/local/rsync-ca/rsync-ca</pre><p>The post <a href="https://www.jbahillo.com/syncing-zentyal-ca-between-two-zentyal-servers/">Syncing Zentyal CA between two Zentyal servers</a> first appeared on <a href="https://www.jbahillo.com">Javier Bahillo</a>.</p>]]></content:encoded>
					
					<wfw:commentRss>https://www.jbahillo.com/syncing-zentyal-ca-between-two-zentyal-servers/feed/</wfw:commentRss>
			<slash:comments>0</slash:comments>
		
		
		<post-id xmlns="com-wordpress:feed-additions:1">747</post-id>	</item>
		<item>
		<title>First Certification step done</title>
		<link>https://www.jbahillo.com/first-certification-step-done/</link>
					<comments>https://www.jbahillo.com/first-certification-step-done/#respond</comments>
		
		<dc:creator><![CDATA[Javier Bahillo]]></dc:creator>
		<pubDate>Wed, 06 Nov 2013 22:19:30 +0000</pubDate>
				<category><![CDATA[GNU/Linux]]></category>
		<category><![CDATA[Comptia]]></category>
		<category><![CDATA[linux]]></category>
		<category><![CDATA[LPIC]]></category>
		<guid isPermaLink="false">http://www.jbahillo.com/?p=733</guid>

					<description><![CDATA[<p>Today when I arrived home I had in my mailbox the COMPTIA Linux certification pack. Doing this certification exams has been my forst step towards receiving a certification that can prove my actual knowledge about Linux. Selecting Comptia, has been&#8230;</p>
<p class="more-link-p"><a class="more-link" href="https://www.jbahillo.com/first-certification-step-done/">Read more &#8594;</a></p>
<p>The post <a href="https://www.jbahillo.com/first-certification-step-done/">First Certification step done</a> first appeared on <a href="https://www.jbahillo.com">Javier Bahillo</a>.</p>]]></description>
										<content:encoded><![CDATA[<p>Today when I arrived home I had in my mailbox the COMPTIA Linux certification pack. Doing this certification exams has been my forst step towards receiving a certification that can prove my actual knowledge about Linux.</p>
<p>Selecting Comptia, has been moreover a really good choice as it has provided me with 5 certifications in a shot:</p>
<p>COMPTIA Linux +<br />
<a href="https://i0.wp.com/www.jbahillo.com/wp-content/uploads/2013/11/IMG_20131106_230120.jpg"><img src="https://i1.wp.com/www.jbahillo.com/wp-content/uploads/2013/11/IMG_20131106_230120-150x150.jpg?resize=150%2C150" data-recalc-dims="1"></a><br />
LPIC 1<br />
<a href="https://i2.wp.com/www.jbahillo.com/wp-content/uploads/2013/11/IMG-20131030-WA0000.jpg"><img src="https://i1.wp.com/www.jbahillo.com/wp-content/uploads/2013/11/IMG-20131030-WA0000-150x150.jpg?resize=150%2C150" data-recalc-dims="1"></a><br />
Novell Certified Linux Admininstrator</p>
<p>Data Center Technical Specialist</p>
<p>SUSE 11 Technical Specialist</p>
<p><a href="https://i1.wp.com/www.jbahillo.com/wp-content/uploads/2013/11/suse.jpg"><img src="https://i0.wp.com/www.jbahillo.com/wp-content/uploads/2013/11/suse-150x150.jpg?resize=150%2C150" data-recalc-dims="1"></a></p>
<p>I cannot finish this without thanking my employer, Zentyal for providing the time and economic support in reaching this certification!</p><p>The post <a href="https://www.jbahillo.com/first-certification-step-done/">First Certification step done</a> first appeared on <a href="https://www.jbahillo.com">Javier Bahillo</a>.</p>]]></content:encoded>
					
					<wfw:commentRss>https://www.jbahillo.com/first-certification-step-done/feed/</wfw:commentRss>
			<slash:comments>0</slash:comments>
		
		
		<post-id xmlns="com-wordpress:feed-additions:1">733</post-id>	</item>
		<item>
		<title>Testing reboots</title>
		<link>https://www.jbahillo.com/testing-reboots/</link>
					<comments>https://www.jbahillo.com/testing-reboots/#respond</comments>
		
		<dc:creator><![CDATA[Javier Bahillo]]></dc:creator>
		<pubDate>Mon, 12 Aug 2013 14:31:39 +0000</pubDate>
				<category><![CDATA[GNU/Linux]]></category>
		<category><![CDATA[bash]]></category>
		<category><![CDATA[reboot]]></category>
		<guid isPermaLink="false">http://www.jbahillo.com/?p=703</guid>

					<description><![CDATA[<p>Today, I had to do a lot of reboots just to check one issue with ACPI that could prevent a machine to correctly boot up. I begun doing up to ten reboots, but in the end, I could not bare&#8230;</p>
<p class="more-link-p"><a class="more-link" href="https://www.jbahillo.com/testing-reboots/">Read more &#8594;</a></p>
<p>The post <a href="https://www.jbahillo.com/testing-reboots/">Testing reboots</a> first appeared on <a href="https://www.jbahillo.com">Javier Bahillo</a>.</p>]]></description>
										<content:encoded><![CDATA[<p>Today, I had to do a lot of reboots just to check one issue with ACPI that could prevent a machine to correctly boot up. I begun doing up to ten reboots, but in the end, I could not bare with that, and did this small script to check it( just needed to put my public ssh key on the machine:</p>
<pre class="brush: bash; gutter: true">#!/bin/bash
for i in {1..50}
do
sleep 90
echo &quot;Reboot $i &quot;
ssh root@192.168.1.57 init 6
done</pre><p>The post <a href="https://www.jbahillo.com/testing-reboots/">Testing reboots</a> first appeared on <a href="https://www.jbahillo.com">Javier Bahillo</a>.</p>]]></content:encoded>
					
					<wfw:commentRss>https://www.jbahillo.com/testing-reboots/feed/</wfw:commentRss>
			<slash:comments>0</slash:comments>
		
		
		<post-id xmlns="com-wordpress:feed-additions:1">703</post-id>	</item>
		<item>
		<title>Mail server in Zentyal &#8211; Understanding differences between Mail and Groupware modules</title>
		<link>https://www.jbahillo.com/mail-server-in-zentyal-understanding-differences-between-mail-and-groupware-modules/</link>
					<comments>https://www.jbahillo.com/mail-server-in-zentyal-understanding-differences-between-mail-and-groupware-modules/#respond</comments>
		
		<dc:creator><![CDATA[Javier Bahillo]]></dc:creator>
		<pubDate>Fri, 28 Jun 2013 07:09:04 +0000</pubDate>
				<category><![CDATA[GNU/Linux]]></category>
		<category><![CDATA[Zentyal]]></category>
		<category><![CDATA[Zentyal-World]]></category>
		<category><![CDATA[dovecot]]></category>
		<category><![CDATA[mail]]></category>
		<category><![CDATA[postfix]]></category>
		<category><![CDATA[zarafa]]></category>
		<category><![CDATA[zentyal]]></category>
		<guid isPermaLink="false">http://www.jbahillo.com/?p=632</guid>

					<description><![CDATA[<p>Many people get confused when installed Zentyal about the differences between Zentyal Mail and Zentyal Groupware modules. Zentyal provides mail functionality through Zentyal Mail module. It uses Postfix as the daemon to provide smtp functionality, and Dovecot as the daemon&#8230;</p>
<p class="more-link-p"><a class="more-link" href="https://www.jbahillo.com/mail-server-in-zentyal-understanding-differences-between-mail-and-groupware-modules/">Read more &#8594;</a></p>
<p>The post <a href="https://www.jbahillo.com/mail-server-in-zentyal-understanding-differences-between-mail-and-groupware-modules/">Mail server in Zentyal – Understanding differences between Mail and Groupware modules</a> first appeared on <a href="https://www.jbahillo.com">Javier Bahillo</a>.</p>]]></description>
										<content:encoded><![CDATA[<p>Many people get confused when installed Zentyal about the differences between Zentyal Mail and Zentyal Groupware modules.</p>
<p>Zentyal provides mail functionality through Zentyal Mail module. It uses Postfix as the daemon to provide smtp functionality, and Dovecot as the daemon for POP3(s) and IMAP(s) functionalities. Where are mails stored? It stores mail files in /var/vmail/. You can enable which services (POP/IMAP) you want to have enabled in the Zentyal GUI:</p>
<p><center><a href="https://i1.wp.com/www.jbahillo.com/wp-content/uploads/2013/07/pop31.png"><img data-attachment-id="685" data-permalink="https://www.jbahillo.com/mail-server-in-zentyal-understanding-differences-between-mail-and-groupware-modules/pop31/" data-orig-file="https://i1.wp.com/www.jbahillo.com/wp-content/uploads/2013/07/pop31.png?fit=778%2C320&amp;ssl=1" data-orig-size="778,320" data-comments-opened="1" data-image-meta="{&quot;aperture&quot;:&quot;0&quot;,&quot;credit&quot;:&quot;&quot;,&quot;camera&quot;:&quot;&quot;,&quot;caption&quot;:&quot;&quot;,&quot;created_timestamp&quot;:&quot;0&quot;,&quot;copyright&quot;:&quot;&quot;,&quot;focal_length&quot;:&quot;0&quot;,&quot;iso&quot;:&quot;0&quot;,&quot;shutter_speed&quot;:&quot;0&quot;,&quot;title&quot;:&quot;&quot;}" data-image-title="pop31" data-image-description="" data-medium-file="https://i1.wp.com/www.jbahillo.com/wp-content/uploads/2013/07/pop31.png?fit=300%2C123&amp;ssl=1" data-large-file="https://i1.wp.com/www.jbahillo.com/wp-content/uploads/2013/07/pop31.png?fit=560%2C230&amp;ssl=1" loading="lazy" class="aligncenter size-medium wp-image-685" alt="pop31" src="https://i0.wp.com/www.jbahillo.com/wp-content/uploads/2013/07/pop31-300x123.png?resize=300%2C123" width="300" height="123" srcset="https://i1.wp.com/www.jbahillo.com/wp-content/uploads/2013/07/pop31.png?resize=300%2C123&amp;ssl=1 300w, https://i1.wp.com/www.jbahillo.com/wp-content/uploads/2013/07/pop31.png?resize=500%2C205&amp;ssl=1 500w, https://i1.wp.com/www.jbahillo.com/wp-content/uploads/2013/07/pop31.png?w=778&amp;ssl=1 778w" sizes="(max-width: 300px) 100vw, 300px" data-recalc-dims="1" /></a></center><br />
Finally, you can use Zentyal Webmail module in order for your users to be able to check email using a browser. Zentyal uses Roundcube for this.</p>
<p>Zentyal Groupware (zarafa)provides as well mail functionality. Zarafa will store mail on its database (Zarafa MySQL database when using Zentyal 3.0),and provides Webaccess as the interface for webmail. So What&#8217;s the difference with them?</p>
<ul>
<li>Zarafa provides you an address book with your LDAP users, so they don&#8217;t need to include their collegues by hand.</li>
<li>Zarafa allows you to use (collaborative) calendar where you can write and share your day-by-day events.</li>
<li>And the main one: Zarafa provides you with the possibility of allowing your users to use Exchange accounts for your domain (using the so-called Outlook Connectors) and to use their mobiles for Exchange accounts (using z-push).</li>
</ul>
<p>So far so easy isn&#8217;t it? But many people get confused when configuring these. In order to clarify these, we&#8217;ll try to make clearer how Zarafa works, so configuration should be easier.<br />
We&#8217;ll take for this a simple environment, with no Mailfilter module involved (as it will be transparent for this), and Zentyal Mail, Webmail, Zentyal Zarafa and Zentyal Webaccess (which is installed when installed zentyal-zarafa module)</p>
<p>For the first step, let&#8217;s take an environment with Zentyal Mail with POP3, Secure POP3, IMAP, and IMAPS configured and Zentyal Webmail modules. In this environment we have a single domain, say zentyal-domain.loc, and three users:</p>
<ul>
<li>john@zentyal-domain.loc</li>
<li>doe@zentyal-domain.loc</li>
<li>foo@zentyal-domain.loc</li>
</ul>
<p>User john retrieves his mail through a Thunderbird/Outlook client with IMAP  and when he&#8217;s abroad, he checks it using it IMAPS on its mobile)</p>
<p>User doe retrieves his mail through POP3, and when he is abroad he checks it using IMAPS on its mobile)</p>
<p>User foo check his mail using webmail.</p>
<p>So, in this state-of-things any user can check his email using any method he might prefer (POP3, POP3S, IMAP, IMAPS or Webmail). But now we install the Zarafa module, and a new user bar@zentyal-domain.loc , and we define this user as a Zarafa user:</p>
<p><center><a href="https://i0.wp.com/www.jbahillo.com/wp-content/uploads/2013/07/user-zarafa.png"><img data-attachment-id="686" data-permalink="https://www.jbahillo.com/mail-server-in-zentyal-understanding-differences-between-mail-and-groupware-modules/user-zarafa/" data-orig-file="https://i0.wp.com/www.jbahillo.com/wp-content/uploads/2013/07/user-zarafa.png?fit=820%2C277&amp;ssl=1" data-orig-size="820,277" data-comments-opened="1" data-image-meta="{&quot;aperture&quot;:&quot;0&quot;,&quot;credit&quot;:&quot;&quot;,&quot;camera&quot;:&quot;&quot;,&quot;caption&quot;:&quot;&quot;,&quot;created_timestamp&quot;:&quot;0&quot;,&quot;copyright&quot;:&quot;&quot;,&quot;focal_length&quot;:&quot;0&quot;,&quot;iso&quot;:&quot;0&quot;,&quot;shutter_speed&quot;:&quot;0&quot;,&quot;title&quot;:&quot;&quot;}" data-image-title="user-zarafa" data-image-description="" data-medium-file="https://i0.wp.com/www.jbahillo.com/wp-content/uploads/2013/07/user-zarafa.png?fit=300%2C101&amp;ssl=1" data-large-file="https://i0.wp.com/www.jbahillo.com/wp-content/uploads/2013/07/user-zarafa.png?fit=560%2C189&amp;ssl=1" loading="lazy" class="aligncenter size-medium wp-image-686" alt="user-zarafa" src="https://i2.wp.com/www.jbahillo.com/wp-content/uploads/2013/07/user-zarafa-300x101.png?resize=300%2C101" width="300" height="101" srcset="https://i0.wp.com/www.jbahillo.com/wp-content/uploads/2013/07/user-zarafa.png?resize=300%2C101&amp;ssl=1 300w, https://i0.wp.com/www.jbahillo.com/wp-content/uploads/2013/07/user-zarafa.png?resize=500%2C168&amp;ssl=1 500w, https://i0.wp.com/www.jbahillo.com/wp-content/uploads/2013/07/user-zarafa.png?w=820&amp;ssl=1 820w" sizes="(max-width: 300px) 100vw, 300px" data-recalc-dims="1" /></a></center></p>
<p>&nbsp;</p>
<p>So, our user goes straight away to its Thunderbird mail client, and configures it but&#8230;gets nothing. We know that the should at least have received the welcome to the company email, so&#8230; what might have happened? He also checks webmail&#8230; and he finds the same result.</p>
<p>As we had told standard mail stores mail in /var/vmail while Zarafa does in MySQL. When a user is marked as non-Zarafa user its mail is sent to the filesystem, and if it is a Zarafa user mail is sent to MySQL. Now let us have a look to the first screenshot of this article. Yes, we still have enabled POP3, POP3S, IMAP and IMAPS. So meanwhile  we keep this configuration, no client can be used to check a zarafa account (unless using a Exchange account with an Outlook connector<strong>) as every method is still reserved for standard mail.  </strong>About the webmail, well you might have guessed, you user should point his browser to /webaccess (or /webapp, if webapp has been installed)  in order to check Zarafa mail, as <strong>Webmail module only checks standard mail</strong>.</p>
<p>So, in order for our user bar to be able to use Thunderbird, we have to disable in mail configuration some service. For our example we&#8217;ll leave the secure protocols for mail.<br />
<center><br />
<a href="https://i2.wp.com/www.jbahillo.com/wp-content/uploads/2013/07/configuring-mail.png"><img data-attachment-id="688" data-permalink="https://www.jbahillo.com/mail-server-in-zentyal-understanding-differences-between-mail-and-groupware-modules/configuring-mail/" data-orig-file="https://i2.wp.com/www.jbahillo.com/wp-content/uploads/2013/07/configuring-mail.png?fit=774%2C310&amp;ssl=1" data-orig-size="774,310" data-comments-opened="1" data-image-meta="{&quot;aperture&quot;:&quot;0&quot;,&quot;credit&quot;:&quot;&quot;,&quot;camera&quot;:&quot;&quot;,&quot;caption&quot;:&quot;&quot;,&quot;created_timestamp&quot;:&quot;0&quot;,&quot;copyright&quot;:&quot;&quot;,&quot;focal_length&quot;:&quot;0&quot;,&quot;iso&quot;:&quot;0&quot;,&quot;shutter_speed&quot;:&quot;0&quot;,&quot;title&quot;:&quot;&quot;}" data-image-title="configuring-mail" data-image-description="" data-medium-file="https://i2.wp.com/www.jbahillo.com/wp-content/uploads/2013/07/configuring-mail.png?fit=300%2C120&amp;ssl=1" data-large-file="https://i2.wp.com/www.jbahillo.com/wp-content/uploads/2013/07/configuring-mail.png?fit=560%2C224&amp;ssl=1" loading="lazy" class="aligncenter size-medium wp-image-688" alt="configuring-mail" src="https://i2.wp.com/www.jbahillo.com/wp-content/uploads/2013/07/configuring-mail-300x120.png?resize=300%2C120" width="300" height="120" srcset="https://i2.wp.com/www.jbahillo.com/wp-content/uploads/2013/07/configuring-mail.png?resize=300%2C120&amp;ssl=1 300w, https://i2.wp.com/www.jbahillo.com/wp-content/uploads/2013/07/configuring-mail.png?resize=500%2C200&amp;ssl=1 500w, https://i2.wp.com/www.jbahillo.com/wp-content/uploads/2013/07/configuring-mail.png?w=774&amp;ssl=1 774w" sizes="(max-width: 300px) 100vw, 300px" data-recalc-dims="1" /></a></center></p>
<p>After saving changes, you&#8217;ll be able to enable the POP3 and IMAP gateways for Zarafa, and our user will be able to check Zarafa mail using these protocols. Don&#8217;t try enabling any gateway without disabling first on mail module config, as it will logically complain, as  the same port cannot be bind by two services:</p>
<p><center><a href="https://i2.wp.com/www.jbahillo.com/wp-content/uploads/2013/07/zarafa-config.png"><img data-attachment-id="687" data-permalink="https://www.jbahillo.com/mail-server-in-zentyal-understanding-differences-between-mail-and-groupware-modules/zarafa-config/" data-orig-file="https://i2.wp.com/www.jbahillo.com/wp-content/uploads/2013/07/zarafa-config.png?fit=827%2C263&amp;ssl=1" data-orig-size="827,263" data-comments-opened="1" data-image-meta="{&quot;aperture&quot;:&quot;0&quot;,&quot;credit&quot;:&quot;&quot;,&quot;camera&quot;:&quot;&quot;,&quot;caption&quot;:&quot;&quot;,&quot;created_timestamp&quot;:&quot;0&quot;,&quot;copyright&quot;:&quot;&quot;,&quot;focal_length&quot;:&quot;0&quot;,&quot;iso&quot;:&quot;0&quot;,&quot;shutter_speed&quot;:&quot;0&quot;,&quot;title&quot;:&quot;&quot;}" data-image-title="zarafa-config" data-image-description="" data-medium-file="https://i2.wp.com/www.jbahillo.com/wp-content/uploads/2013/07/zarafa-config.png?fit=300%2C95&amp;ssl=1" data-large-file="https://i2.wp.com/www.jbahillo.com/wp-content/uploads/2013/07/zarafa-config.png?fit=560%2C178&amp;ssl=1" loading="lazy" class="aligncenter size-medium wp-image-687" alt="zarafa-config" src="https://i1.wp.com/www.jbahillo.com/wp-content/uploads/2013/07/zarafa-config-300x95.png?resize=300%2C95" width="300" height="95" srcset="https://i2.wp.com/www.jbahillo.com/wp-content/uploads/2013/07/zarafa-config.png?resize=300%2C95&amp;ssl=1 300w, https://i2.wp.com/www.jbahillo.com/wp-content/uploads/2013/07/zarafa-config.png?resize=500%2C159&amp;ssl=1 500w, https://i2.wp.com/www.jbahillo.com/wp-content/uploads/2013/07/zarafa-config.png?w=827&amp;ssl=1 827w" sizes="(max-width: 300px) 100vw, 300px" data-recalc-dims="1" /></a></center></p><p>The post <a href="https://www.jbahillo.com/mail-server-in-zentyal-understanding-differences-between-mail-and-groupware-modules/">Mail server in Zentyal – Understanding differences between Mail and Groupware modules</a> first appeared on <a href="https://www.jbahillo.com">Javier Bahillo</a>.</p>]]></content:encoded>
					
					<wfw:commentRss>https://www.jbahillo.com/mail-server-in-zentyal-understanding-differences-between-mail-and-groupware-modules/feed/</wfw:commentRss>
			<slash:comments>0</slash:comments>
		
		
		<post-id xmlns="com-wordpress:feed-additions:1">632</post-id>	</item>
	</channel>
</rss>
