<?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/"
	>

<channel>
	<title>Administrateur Système freelance qui fait de l&#039;infogérance sous Linux &#124; Administrateur Système freelance qui fait de l&#039;infogérance sous Linux</title>
	<atom:link href="http://www.kogitae.fr/feed" rel="self" type="application/rss+xml" />
	<link>http://www.kogitae.fr</link>
	<description></description>
	<lastBuildDate>Wed, 16 May 2012 12:46:12 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.3.2</generator>
		<item>
		<title>Running a Jabber server under Debian with eJabberd &#8211; movieos</title>
		<link>http://www.kogitae.fr/running-a-jabber-server-under-debian-with-ejabberd-movieos.html</link>
		<comments>http://www.kogitae.fr/running-a-jabber-server-under-debian-with-ejabberd-movieos.html#comments</comments>
		<pubDate>Wed, 16 May 2012 12:46:12 +0000</pubDate>
		<dc:creator>PJ Michel</dc:creator>
				<category><![CDATA[Debian]]></category>
		<category><![CDATA[debian]]></category>
		<category><![CDATA[jabber]]></category>
		<category><![CDATA[lamp-or-linux-or-developpement-web-and-apache-or-php-or-mysql-or-adobe-or-eclipse-or-zend-or-mozilla-or-firefox]]></category>

		<guid isPermaLink="false">http://www.kogitae.fr/?p=557</guid>
		<description><![CDATA[DNS SRV records If the A record for example.com doesn’t resolve to your server you can still run a server for example.com by pointing DNS SRV records to your server. In fact, you should do this anyway, in the same way that your email will arrive if the A record &#8230;]]></description>
			<content:encoded><![CDATA[<p>DNS SRV records</p>
<p>If the A record for example.com doesn’t resolve to your server you can still run a server for example.com by pointing DNS SRV records to your server. In fact, you should do this anyway, in the same way that your email will arrive if the A record for your domain points to the mail server, but MX records are still a good idea.</p>
<p>Assuming your Jabber server runs on a machine called jabber.example.com, you’ll want the following scary DNS records:</p>
<p>_xmpp-client._tcp 900 IN SRV 5 0 5222 jabber.example.com.<br />
_xmpp-server._tcp 900 IN SRV 5 0 5269 jabber.example.com.<br />
_jabber._tcp      900 IN SRV 5 0 5269 jabber.example.com.</p>
<p>You can check that they’re been set properly using this excellent tool, but it’ll probably take a while for the DNS updates to propagate. If you have the dig command line tool, you can also try</p>
<p>dig -t srv _xmpp-client._tcp.example.com</p>
<p>to ask your local DNS server for one of the SRV records. </p>
]]></content:encoded>
			<wfw:commentRss>http://www.kogitae.fr/running-a-jabber-server-under-debian-with-ejabberd-movieos.html/feed</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Being Nice on a Linux Box &#8211; Process priority with &#8216;nice&#8217; &amp; &#8216;renice&#8217; &#8211; Nimal&#8217;s Weblog</title>
		<link>http://www.kogitae.fr/being-nice-on-a-linux-box-process-priority-with-nice-renice-nimals-weblog.html</link>
		<comments>http://www.kogitae.fr/being-nice-on-a-linux-box-process-priority-with-nice-renice-nimals-weblog.html#comments</comments>
		<pubDate>Mon, 14 May 2012 16:09:23 +0000</pubDate>
		<dc:creator>PJ Michel</dc:creator>
				<category><![CDATA[bash]]></category>
		<category><![CDATA[Centos]]></category>
		<category><![CDATA[Debian]]></category>
		<category><![CDATA[nice]]></category>
		<category><![CDATA[virtualbox]]></category>

		<guid isPermaLink="false">http://www.kogitae.fr/?p=555</guid>
		<description><![CDATA[Being Nice on a Linux Box &#8211; Process priority with &#039;nice&#039; &#38; &#039;renice&#039; &#8211; Nimal&#039;s Weblog. Problem (I had): Wanted to run a VirtualBox on a RHEL 4.7 Linux server which is shared by someothers. But as some other processes took more CPU, the VirtualBox performance was bad. So I &#8230;]]></description>
			<content:encoded><![CDATA[<p><a href='http://nimal.info/blog/2009/process-priority-with-nice-renice/'>Being Nice on a Linux Box &#8211; Process priority with &#039;nice&#039; &amp; &#039;renice&#039; &#8211; Nimal&#039;s Weblog</a>.</p>
<p>Problem (I had): Wanted to run a VirtualBox on a RHEL 4.7 Linux server which is shared by someothers. But as some other processes took more CPU, the VirtualBox performance was bad. So I wanted to increase the priority given to VirtualBox.</p>
<p>Solution (I found): VirtualBox can be given higher priority using nice command. Also renice command can be used to change the priority of a running process, which will also be useful.</p>
<p>nice -10 VBoxHeadless</p>
<p>Gives the VBoxHeadless process 1.5 times priority than the normal process, calculated as (20 – -10)/20 = 1.5</p>
<p>nice -20 make</p>
<p>Executes make at maximum priority.</p>
<p>renice +20 2222</p>
<p>Changes the priority of process 2222 to +20 (minimum priority).</p>
<p>renice -10 -p 13013</p>
<p>Changes the priority of a running process by specifying its process ID, where priority can be,</p>
<p>    1 to 20 :Â Runs the specified processes slower than the base priority.<br />
    0 :Â Sets priority of the specified processes to the base scheduling priority.<br />
    -20 to -1 :Â Runs the specified processes quicker than the base priority.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.kogitae.fr/being-nice-on-a-linux-box-process-priority-with-nice-renice-nimals-weblog.html/feed</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>ZTE AT-commands &#8211; 3G modem wiki</title>
		<link>http://www.kogitae.fr/zte-at-commands-3g-modem-wiki.html</link>
		<comments>http://www.kogitae.fr/zte-at-commands-3g-modem-wiki.html#comments</comments>
		<pubDate>Wed, 09 May 2012 12:04:52 +0000</pubDate>
		<dc:creator>PJ Michel</dc:creator>
				<category><![CDATA[Généralités]]></category>

		<guid isPermaLink="false">http://www.kogitae.fr/?p=550</guid>
		<description><![CDATA[ZTE AT-commandsThis is a featured page disable/enable flash cd-drive AT+ZCDRUN=8 disable AT+ZCDRUN=9 enable stay online AT+ZOPRT=5 check net-/SIMlock AT+ZSEC? answer: , < SEC_STATUE >: 0 Initializing the encryption (Insignificant SEC_ITEMS) 1 Network Lock error. (Insignificant SEC_ITEMS) 2 Network Locked 3 Unlocked or correct MCC/MNC : 0 No action 1 Network &#8230;]]></description>
			<content:encoded><![CDATA[<p>ZTE AT-commandsThis is a featured page<br />
disable/enable flash cd-drive<br />
AT+ZCDRUN=8 disable<br />
AT+ZCDRUN=9 enable</p>
<p>stay online<br />
AT+ZOPRT=5</p>
<p>check net-/SIMlock<br />
AT+ZSEC?<br />
answer: <SEC_STATUE>,<SEC_ITEMS></p>
<p>< SEC_STATUE >:<br />
0 Initializing the encryption (Insignificant SEC_ITEMS)<br />
1 Network Lock error. (Insignificant SEC_ITEMS)<br />
2 Network Locked<br />
3 Unlocked or correct MCC/MNC</p>
<p><SEC_ITEMS>:<br />
0 No action<br />
1 Network lock<br />
2 (U)SIM card lock<br />
3 Network Lock and (U)SIM card Lock</p>
<p>Unlock<br />
+ZNCK=&nbsp;&raquo;unlock-code&nbsp;&raquo;<br />
+ZNCK?<br />
Unlock residual time 0-5</p>
<p>Report signal strength +ZRSSI<br />
Syntax<br />
+ZRSSI parameter command syntax<br />
Command Possible response(s)<br />
+ZRSSI <CR><LF>+ZRSSI:<rssi>,<ecio>,<rscp><CR><LF><CR><LF><br />
OK<CR><LF></p>
<p><CR><LF>+CME ERROR: <err><CR><LF></p>
<p>Description<br />
This command is used to report signal strength.. Notice the command is used only in platform<br />
6290 and 6246.<br />
Defined values<br />
3G network（registered to 3G network）<br />
+ZRSSI: rssi,ecio,rscp<br />
The unit of Rscp is 0.5dbm ( in 0.5 dBm step with no sign).<br />
The unit of Ecio is 0.5db ( in 0.5 dB step with no sign).<br />
The relation is: 2*rssi=rscp-ecio<br />
e.g.<br />
+ZRSSI: 49,8,106<br />
Rssidbm = -rssi = -49dbm<br />
Eciodb = -ecio/2= -4db<br />
Rscpdbm = &#8211; rscp /2= -53dbm<br />
2G network（there is no ecio and rscp value when registered in 2G network ，so set<br />
value of 1000）<br />
e.g.<br />
+ZRSSI: rssi,1000,1000<br />
No network e.g.<br />
+ZRSSI ：OK<br />
Notice! the command is used only in platform 6290 and 6246.</p>
<p>Set Operational Mode<br />
AT+ZSNT=0,0,0 (Auto) &#8211; Default<br />
AT+ZSNT=1,0,0 GPRS Only<br />
AT+ZSNT=2,0,0 3G Only<br />
AT+ZSNT=0,0,1 GPRS Preferred<br />
AT+ZSNT=0,0,2 3G Preferred</p>
<p>Query Operational Mode<br />
AT+ZPAS?<br />
<CR><LF>+ZPAS:<network>,<srv_domain><CR><LF>OK<CR><LF><br />
<network>: the type of current network<br />
No Service<br />
Limited Service<br />
GPRS<br />
GSM<br />
UMTS<br />
EDGE<br />
HSDPA<br />
<srv_domain>: service domain<br />
CS_ONLY: CS domain service available.<br />
PS_ONLY: PS domain service available.<br />
CS_PS: CS&#038;PS domain service available.<br />
CAMPED: camped in a cell.<br />
example<br />
Command: AT+ZPAS?<br />
Response: +ZPAS: &laquo;&nbsp;GPRS&nbsp;&raquo;,&nbsp;&raquo;CS_PS&nbsp;&raquo;<br />
OK</p>
<p>Set Band Status +ZBANDI<br />
at+zbandi=0 • Automatic (Auto) &#8211; Default<br />
at+zbandi=1 • UMTS 850 + GSM 900/1800<br />
at+zbandi=2 • UMTS 2100 + GSM 900/1800 (Europe)<br />
at+zbandi=3 • UMTS 850/2100 + GSM 900/1800<br />
at+zbandi=4 • UMTS 850/1900 + GSM 850/1900<br />
Notice! the command is used only in platform 6290 and 6246.</p>
<p>Weblinks</p>
<p>http://www.zte.com.au/downloads/USB_Modem_Config_Procedure.pdf</p>
]]></content:encoded>
			<wfw:commentRss>http://www.kogitae.fr/zte-at-commands-3g-modem-wiki.html/feed</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>SSH: bad ownership or modes for chroot directory » ZedTuX On R00t</title>
		<link>http://www.kogitae.fr/ssh-bad-ownership-or-modes-for-chroot-directory-zedtux-on-r00t.html</link>
		<comments>http://www.kogitae.fr/ssh-bad-ownership-or-modes-for-chroot-directory-zedtux-on-r00t.html#comments</comments>
		<pubDate>Fri, 04 May 2012 08:00:18 +0000</pubDate>
		<dc:creator>PJ Michel</dc:creator>
				<category><![CDATA[Debian]]></category>
		<category><![CDATA[chroot]]></category>
		<category><![CDATA[ssh]]></category>

		<guid isPermaLink="false">http://www.kogitae.fr/?p=547</guid>
		<description><![CDATA[chroot directory 13 avril 2010 par zedtux Laisser une réponse » Si vous donnez à un utilisateur un dossier home partagé (le dossier appartient à un groupe, et plusieurs utilisateurs peuvent y accéder), et que vous avez le message bad ownership or modes for chroot directory dans les logs de &#8230;]]></description>
			<content:encoded><![CDATA[<p>chroot directory<br />
13 avril 2010 par zedtux Laisser une réponse »</p>
<p>Si vous donnez à un utilisateur un dossier home partagé (le dossier appartient à un groupe, et plusieurs utilisateurs peuvent y accéder), et que vous avez le message bad ownership or modes for chroot directory dans les logs de Linux, c’est que, comme dis dans le message, le dossier home n’a pas les bon droits.<br />
Fixé le problème</p>
<p>Pour réparer ce petit soucis, il faut que le propriétaire du dossier (owner) soit root, et que le groupe du dossier soit le groupe que vous voulez utiliser pour liés vos utilisateurs à ce dossier.</p>
<p>Et le tout avec des permissions à 755.<br />
Un exemple</p>
<p>Pour que ce soit plus clair:</p>
<p>Disons que le groupe que vous avez créé pour relier vos utilisateur soit uploaders, et vous voulez donc que les utilisateurs john, jean, et robert puissent envoyer des fichiers dans le dossier /home/uploads.</p>
<p>Les utilisateurs seront donc créé avec la commande suivante:</p>
<p>    useradd -b /home/uploads -d /home/uploads -G uploaders -r john</p>
<p>Ensuite vous n’avez qu’a créer le dossier /home/uploads et à lancer ces commandes:</p>
<p>    sudo chmod 755 /home/uploads</p>
<p>    sudo chown root:uploaders /home/uploads</p>
<p>Et voilà !!! <img src='http://www.kogitae.fr/wp-includes/images/smilies/icon_smile.gif' alt=':)' class='wp-smiley' />  </p>
]]></content:encoded>
			<wfw:commentRss>http://www.kogitae.fr/ssh-bad-ownership-or-modes-for-chroot-directory-zedtux-on-r00t.html/feed</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Increase the speed of Linux Software RAID reconstruction &#124; MDLog:/sysadmin</title>
		<link>http://www.kogitae.fr/increase-the-speed-of-linux-software-raid-reconstruction-mdlogsysadmin.html</link>
		<comments>http://www.kogitae.fr/increase-the-speed-of-linux-software-raid-reconstruction-mdlogsysadmin.html#comments</comments>
		<pubDate>Fri, 06 Apr 2012 10:49:32 +0000</pubDate>
		<dc:creator>PJ Michel</dc:creator>
				<category><![CDATA[Debian]]></category>
		<category><![CDATA[mdadm]]></category>
		<category><![CDATA[centos-6-speed_limit_min]]></category>
		<category><![CDATA[debian-software-raid-increase]]></category>
		<category><![CDATA[debian-speed_limit_min]]></category>
		<category><![CDATA[increase-dovecot-speed]]></category>
		<category><![CDATA[increase-speed-mdadm-ram]]></category>
		<category><![CDATA[limit]]></category>
		<category><![CDATA[linux]]></category>
		<category><![CDATA[linux-raid-rebuild-slow-ram]]></category>
		<category><![CDATA[md-minimum-speed]]></category>
		<category><![CDATA[md-minimum-_guaranteed_-reconstruction-speed-1000-kbsecdisc]]></category>
		<category><![CDATA[speed]]></category>

		<guid isPermaLink="false">http://www.kogitae.fr/?p=535</guid>
		<description><![CDATA[Increase the speed of Linux Software RAID reconstruction If you are in a situation where you sit in front of the console (or on a remote ssh connection) waiting for a Linux software RAID to finish rebuilding (either you added a new drive, or you replaced a failed one, etc.) &#8230;]]></description>
			<content:encoded><![CDATA[<p><a href="http://www.ducea.com/2006/06/25/increase-the-speed-of-linux-software-raid-reconstruction/" title="Article d'origine" target="_blank"></a></p>
<p>Increase the speed of Linux Software RAID reconstruction</p>
<p>If you are in a situation where you sit in front of the console (or on a remote ssh connection) waiting for a Linux software RAID to finish rebuilding (either you added a new drive, or you replaced a failed one, etc.) then you might be frustrated by how slow this process is running. You are running cat on /proc/mdstat repeatedly (you should really use watch in this case <img src='http://www.kogitae.fr/wp-includes/images/smilies/icon_wink.gif' alt=';)' class='wp-smiley' />  ), and this seems to never finish… Obviously that there is a logical reason for this ‘slowness‘ and on a production system you should leave it running with the defaults. But in case you want to speed up this process here is how you can do it. This will place a much higher load on the system so you should use it with care.</p>
<p>To see your Linux kernel speed limits imposed on the RAID reconstruction use:</p>
<p>cat /proc/sys/dev/raid/speed_limit_max<br />
200000<br />
cat /proc/sys/dev/raid/speed_limit_min<br />
1000</p>
<p>In the system logs you can see something similar to:<br />
md: minimum _guaranteed_ reconstruction speed: 1000 KB/sec/disc.<br />
md: using maximum available idle IO bandwidth (but not more than 200000 KB/sec) for reconstruction.</p>
<p>This means that the minimum guaranteed speed of the rebuild of the array is approx 1MB/s. The actual speed will be higher and will depend on the system load and what other processes are running at that time.<br />
In case you want to increase this minimum speed you need to enter a higher value in speed_limit_min. For example to set this to approx 50 megabytes per second as minimum use:</p>
<p>echo 50000 &gt;/proc/sys/dev/raid/speed_limit_min</p>
<p>The results are instant… you can return to the watch window to see it running, and hope that this will finish a little faster (this will really depend on the system you are running, the HDDs, controllers, etc.):</p>
<p>watch cat /proc/mdstat</p>
]]></content:encoded>
			<wfw:commentRss>http://www.kogitae.fr/increase-the-speed-of-linux-software-raid-reconstruction-mdlogsysadmin.html/feed</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>With a Little Help from my Friend &#124; How to recreate root account in MySQL</title>
		<link>http://www.kogitae.fr/with-a-little-help-from-my-friend-how-to-recreate-root-account-in-mysql.html</link>
		<comments>http://www.kogitae.fr/with-a-little-help-from-my-friend-how-to-recreate-root-account-in-mysql.html#comments</comments>
		<pubDate>Mon, 26 Mar 2012 17:13:57 +0000</pubDate>
		<dc:creator>PJ Michel</dc:creator>
				<category><![CDATA[Debian]]></category>
		<category><![CDATA[mysql]]></category>
		<category><![CDATA[mysqld_safe-permission-denied]]></category>
		<category><![CDATA[recovery]]></category>
		<category><![CDATA[root]]></category>

		<guid isPermaLink="false">http://www.kogitae.fr/?p=533</guid>
		<description><![CDATA[Today I was trying to log in to mysql database administration on one of my hosting machines and as I was getting ‘permission denied for user rott@localhost’ I tried to fix the root account and reset its password. But I wasn’t successful and later on I realized, that the root &#8230;]]></description>
			<content:encoded><![CDATA[<p>Today I was trying to log in to mysql database administration on one of my hosting machines and as I was getting ‘permission denied for user rott@localhost’ I tried to fix the root account and reset its password. But I wasn’t successful and later on I realized, that the root account was deleted from the mysql database by one of my friends accidentally. I started to search the internet what to do, but the only thing I have found regarding this issue was question on MySQL forum with exactly the same problem but no answer. So as usual, I tried to solve it by myself and here is it is.</p>
<p>The pre requisition is a shell access on your MySQL machine. Then you have to stop the standard mysql daemon and start the database in safe mode.</p>
<p>/etc/init.d/mysql stop<br />
mysqld_safe &#8211;skip-grant-tables &#038;</p>
<p>Then log in as a root and switch to mysql system database.</p>
<p>mysql -u root<br />
mysql> use mysql;</p>
<p>Try to check that the root user is not present in user table:</p>
<p>mysql> select * from user where User=&#8217;root&#8217;;</p>
<p>If the database return empty record, lets manually insert the root user with empty password and then set all the permissions which he normally needs:</p>
<p>mysql> insert into user (Host, User, Password) values (&#8216;localhost&#8217;,'root&#8217;,&nbsp;&raquo;);<br />
Query OK, 1 rows affected (0.04 sec)<br />
mysql> update user set Select_priv=&#8217;Y',Insert_priv=&#8217;Y',Update_priv=&#8217;Y',Delete_priv=&#8217;Y',Create_priv=&#8217;Y',Drop_priv=&#8217;Y',Reload_priv=&#8217;Y',Shutdown_priv=&#8217;Y',Process_priv=&#8217;Y',File_priv=&#8217;Y',Grant_priv=&#8217;Y',References_priv=&#8217;Y',Index_priv=&#8217;Y',Alter_priv=&#8217;Y',Show_db_priv=&#8217;Y',Super_priv=&#8217;Y',Create_tmp_table_priv=&#8217;Y',Lock_tables_priv=&#8217;Y',Execute_priv=&#8217;Y',Repl_slave_priv=&#8217;Y',Repl_client_priv=&#8217;Y',Create_view_priv=&#8217;Y',Show_view_priv=&#8217;Y',Create_routine_priv=&#8217;Y',Alter_routine_priv=&#8217;Y',Create_user_priv=&#8217;Y&#8217; where user=&#8217;root&#8217;;<br />
Query OK, 1 rows affected (0.03 sec)</p>
<p>Then quit the database console, kill the mysqld_safe daemon and start the standard mysql daemon again:</p>
<p>mysql> quit<br />
killall mysqld_safe<br />
/etc/init.d/mysql start</p>
<p>Try to log in into mysql console again with an empty password and for double check, try to run ‘grant’ command to see that the account is fully working:</p>
]]></content:encoded>
			<wfw:commentRss>http://www.kogitae.fr/with-a-little-help-from-my-friend-how-to-recreate-root-account-in-mysql.html/feed</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Terminal auto-lock with zsh and vlock &#124; wroot</title>
		<link>http://www.kogitae.fr/terminal-auto-lock-with-zsh-and-vlock-wroot.html</link>
		<comments>http://www.kogitae.fr/terminal-auto-lock-with-zsh-and-vlock-wroot.html#comments</comments>
		<pubDate>Sun, 18 Mar 2012 22:18:05 +0000</pubDate>
		<dc:creator>PJ Michel</dc:creator>
				<category><![CDATA[Debian]]></category>
		<category><![CDATA[debian]]></category>
		<category><![CDATA[debian-lock-terminal]]></category>
		<category><![CDATA[session]]></category>
		<category><![CDATA[shared-memory-block-size-know-linux-apc-shm_size]]></category>
		<category><![CDATA[ssh]]></category>
		<category><![CDATA[unlockterminalcentos6]]></category>
		<category><![CDATA[vlock-autolock]]></category>

		<guid isPermaLink="false">http://www.kogitae.fr/?p=527</guid>
		<description><![CDATA[Filed under: Hardening :: by Jan Seidl :: I’m always concerned about leaving terminal sessions open. I’ve used for many and many years the $TMOUT environment variable to close my sessions if idle for N seconds. Just by exporting the TMOUT variable to the number of desired timeout seconds will &#8230;]]></description>
			<content:encoded><![CDATA[<p>Filed under: Hardening :: by Jan Seidl ::</p>
<p>I’m always concerned about leaving terminal sessions open. I’ve used for many and many years the $TMOUT environment variable to close my sessions if idle for N seconds.</p>
<p>Just by exporting the TMOUT variable to the number of desired timeout seconds will close your shell (Bash, Ksh, Zsh and some others).</p>
<p>The following example will timeout in 300 seconds (5 minutes)</p>
<p>export TMOUT=300</p>
<p>I am currently reading the book Secure Coding: Principles &#038; Practices and the authors cited this timeout technique as pretty ineffective since it annoys more than it helps. I was obliged to agree. I got pretty mad with it some good times.</p>
<p>So I started looking for alternatives.</p>
<p>I’ve found a console application called vlock. It should be available on most distro’s repositories.</p>
<p>Just invoke vlock and the terminal session will be locked awaiting the user password to unlock. Pretty nice. Locking is definitely better than killing the session.</p>
<p>So I just started to wonder how to integrate vlock with zsh and after some research I’ve discovered that the shell will only be killed within TMOUT if no trap function for signal ALARM is set.</p>
<p>If you set an ALARM trap function, it will be called instead of killing the session. Perfect.</p>
<p>So I ended up with this in my .zshrc:</p>
<p>export TMOUT=600<br />
function TRAPALRM() { vlock }</p>
<p>And now zsh locks my sessions after 10 minutes. It’s working perfectly even within tmux.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.kogitae.fr/terminal-auto-lock-with-zsh-and-vlock-wroot.html/feed</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Postfix with SASL-Authentication in Debian &#8211; Jonas Genannt</title>
		<link>http://www.kogitae.fr/postfix-with-sasl-authentication-in-debian-jonas-genannt.html</link>
		<comments>http://www.kogitae.fr/postfix-with-sasl-authentication-in-debian-jonas-genannt.html#comments</comments>
		<pubDate>Tue, 13 Mar 2012 21:35:17 +0000</pubDate>
		<dc:creator>PJ Michel</dc:creator>
				<category><![CDATA[Debian]]></category>
		<category><![CDATA[postfix]]></category>
		<category><![CDATA[auth]]></category>
		<category><![CDATA[debian-postfix-directory-var-spool-postfix-permissions]]></category>
		<category><![CDATA[jonas-genannt]]></category>
		<category><![CDATA[libsasl2-centos]]></category>
		<category><![CDATA[mail]]></category>
		<category><![CDATA[no-sasl-authentication-mechanisms-postfix]]></category>
		<category><![CDATA[postfix-authentication-with-sasl-in-debian]]></category>
		<category><![CDATA[postfix-authentification-pam]]></category>
		<category><![CDATA[sasl-authentication]]></category>
		<category><![CDATA[smtp]]></category>

		<guid isPermaLink="false">http://www.kogitae.fr/?p=522</guid>
		<description><![CDATA[I think SMTP-AUTH is very important! Here is a short HowTo for Postfix with sasl authentication against shadow. First install the necessary packages: apt-get install postfix-tls libsasl2-modules sasl2-bin Open the /etc/default/saslauthd for the configuration. # This needs to be uncommented before saslauthd will be run automatically START=yes # You must &#8230;]]></description>
			<content:encoded><![CDATA[<p>I think SMTP-AUTH is very important! Here is a short HowTo for Postfix with sasl authentication against shadow.</p>
<p>First install the necessary packages:<br />
apt-get install postfix-tls libsasl2-modules sasl2-bin</p>
<p>Open the /etc/default/saslauthd for the configuration.</p>
<p>    # This needs to be uncommented before saslauthd will be run automatically<br />
    START=yes<br />
    # You must specify the authentication mechanisms you wish to use.<br />
    # This defaults to &laquo;&nbsp;pam&nbsp;&raquo; for PAM support, but may also include<br />
    # &laquo;&nbsp;shadow&nbsp;&raquo; or &laquo;&nbsp;sasldb&nbsp;&raquo;, like this:<br />
    MECHANISMS=&nbsp;&raquo;shadow&nbsp;&raquo;</p>
<p>    PARAMS=&nbsp;&raquo;-m /var/spool/postfix/var/run/saslauthd/&nbsp;&raquo;<br />
    PIDFILE=&nbsp;&raquo;/var/spool/postfix/var/run/${NAME}/saslauthd.pid&nbsp;&raquo;</p>
<p>Postfix have to know which authentication mode the daemon will use.<br />
You can define this in the /etc/postfix/sasl/smtpd.conf! (chmod 0644)</p>
<p>    saslauthd_path: /var/run/saslauthd/mux<br />
    pwcheck_method: saslauthd<br />
    mech_list: plain login</p>
<p>Then configure the postfix to ask for a username and password then anybody will send a mail to the server.<br />
Add the following lines to the /etc/postfix/main.cnf</p>
<p>    #sasl<br />
    smtpd_sasl_auth_enable = yes<br />
    smtpd_sasl_security_options = noanonymous<br />
    smtpd_sasl_local_domain =<br />
    smtp_sasl_auth_enable = no<br />
    broken_sasl_auth_clients = yes<br />
    smtpd_recipient_restrictions = permit_mynetworks, reject_unknown_recipient_domain, permit_sasl_authenticated, reject_unauth_destination</p>
<p>For security reason you should change that postfix runs in a chroot environment. You can change that in the /etc/postfix/master.cnf</p>
<p>    smtp inet n &#8211; y &#8211; - smtpd</p>
<p>(Change the &#8211; to y!)</p>
<p>Create now the directory for the saslauthd:<br />
mkdir -p /var/spool/postfix/var/run/saslauthd</p>
<p>Set the right directory permission:<br />
chown root.sasl -R /var/spool/postfix/var/</p>
<p>Instead that dpkg change the permission we have to create an override for dpkg!<br />
dpkg-statoverride &#8211;add root sasl 710 /var/spool/postfix/var/run/saslauthd</p>
<p>At last postfix musst have the right permission to speak to the saslauthd daemon, add postfix to the sasl group.<br />
adduser postfix sasl</p>
<p>Restart postfix and saslauthd and try to send a mail to the mailserver.</p>
<p>(Don&#8217;t forget to set a username and a password in your mailclient for mailsending) <img src='http://www.kogitae.fr/wp-includes/images/smilies/icon_smile.gif' alt=':-)' class='wp-smiley' /> </p>
]]></content:encoded>
			<wfw:commentRss>http://www.kogitae.fr/postfix-with-sasl-authentication-in-debian-jonas-genannt.html/feed</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>htdigest sous Lighttpd</title>
		<link>http://www.kogitae.fr/htdigest-sous-lighttpd.html</link>
		<comments>http://www.kogitae.fr/htdigest-sous-lighttpd.html#comments</comments>
		<pubDate>Mon, 12 Mar 2012 08:24:52 +0000</pubDate>
		<dc:creator>PJ Michel</dc:creator>
				<category><![CDATA[Hebergement]]></category>
		<category><![CDATA[Lighttpd]]></category>
		<category><![CDATA[htaccess]]></category>
		<category><![CDATA[htdigest]]></category>
		<category><![CDATA[htdigest-c]]></category>
		<category><![CDATA[lighttpd]]></category>

		<guid isPermaLink="false">http://www.kogitae.fr/?p=519</guid>
		<description><![CDATA[Les htaccess n&#8217;existent pas sous Lighttpd, mais il y a un équivalent de taille. Vérifiez avant de commencer que le module mod_auth est bien chargé. Nous allons dans un premier temps générer (avec -c pour la première fois, comme un htaccess) un fichier contenant les identifiants pour être autoriser à &#8230;]]></description>
			<content:encoded><![CDATA[<p>Les htaccess n&#8217;existent pas sous Lighttpd, mais il y a un équivalent de taille. Vérifiez avant de commencer que le module mod_auth est bien chargé.<br />
Nous allons dans un premier temps générer (avec -c pour la première fois, comme un htaccess) un fichier contenant les identifiants pour être autoriser à consulter tel ou tel site :</p>
<table style="width: 100%;">
<tbody>
<tr>
<td><span><a title="Command" href="http://www.deimos.fr/blocnotesinfo/index.php?title=Fichier:Terminal.png"><img src="http://www.deimos.fr/blocnotesinfo/images/9/9c/Terminal.png" alt="Command" width="32" height="32" /></a> htdigest</span></td>
</tr>
<tr>
<td>
<pre>htdigest -c /etc/lighttpd/.passwd &#039;Authorized users only&#039; deimos</pre>
</td>
</tr>
</tbody>
</table>
<p>&nbsp;</p>
<p>Je créer ici l&#8217;utilisateur deimos. Le realm (ici &#8216;Authorized users only&#8217;) va nous permettre de différencier les différents fichiers de login/mot de passe que nous allons pouvoir avoir car nous ne pouvons en spécifier qu&#8217;un seul pour tout le serveur.</p>
<p>Ensuite on rajoute ces lignes dans la configuration global de lighttpd :</p>
<table style="width: 100%;">
<tbody>
<tr>
<td><span><a title="Configuration File" href="http://www.deimos.fr/blocnotesinfo/index.php?title=Fichier:Configuration_file.png"><img src="http://www.deimos.fr/blocnotesinfo/images/a/a6/Configuration_file.png" alt="Configuration File" width="32" height="32" /></a> /etc/lighttpd/lighttpd.conf</span></td>
</tr>
<tr>
<td>
<div dir="ltr">
<div>
<ol start="0">
<li>
<pre>auth.backend = &quot;htdigest&quot;</pre>
</li>
<li>
<pre>auth.backend.htdigest.userfile = &quot;/etc/lighttpd/.passwd&quot;</pre>
</li>
<li>
<pre>auth.debug = 2</pre>
</li>
</ol>
</div>
</div>
</td>
</tr>
</tbody>
</table>
<p>&nbsp;</p>
<p>Puis je rajoute à l&#8217;endroit qui m&#8217;intéresse la protection :</p>
<table style="width: 100%;">
<tbody>
<tr>
<td><span><a title="Configuration File" href="http://www.deimos.fr/blocnotesinfo/index.php?title=Fichier:Configuration_file.png"><img src="http://www.deimos.fr/blocnotesinfo/images/a/a6/Configuration_file.png" alt="Configuration File" width="32" height="32" /></a> /etc/lighttpd/lighttpd.conf</span></td>
</tr>
<tr>
<td>
<div dir="ltr">
<div>
<ol start="0">
<li>
<pre>auth.require = ( &quot;/docs/&quot; =&amp;gt;</pre>
</li>
<li>
<pre>&nbsp;&nbsp; (</pre>
</li>
<li>
<pre>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&quot;method&quot; =&amp;gt; &quot;digest&quot;,</pre>
</li>
<li>
<pre>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&quot;realm&quot; =&amp;gt; &quot;Authorized users only&quot;,</pre>
</li>
<li>
<pre>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&quot;require&quot; =&amp;gt; &quot;valid-user&quot;</pre>
</li>
<li>
<pre>&nbsp;&nbsp; )</pre>
</li>
<li>
<pre>)</pre>
</li>
</ol>
</div>
</div>
</td>
</tr>
</tbody>
</table>
<p>&nbsp;</p>
<p>On redémarre lighty et c&#8217;est bon. L&#8217;exemple ci dessus montre comment ajouter la restriction à l&#8217;endroit qui nous intéresse, nous allons donc le faire en modifiant notre conf d&#8217;awstats :</p>
<table style="width: 100%;">
<tbody>
<tr>
<td><span><a title="Configuration File" href="http://www.deimos.fr/blocnotesinfo/index.php?title=Fichier:Configuration_file.png"><img src="http://www.deimos.fr/blocnotesinfo/images/a/a6/Configuration_file.png" alt="Configuration File" width="32" height="32" /></a> /etc/lighttpd/conf-available/50-awstats.conf</span></td>
</tr>
<tr>
<td>
<div dir="ltr">
<div>
<ol start="0">
<li>
<pre>alias.url = (</pre>
</li>
<li>
<pre>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&quot;/awstats-icon&quot; =&amp;gt; &quot;/usr/share/awstats/icon/&quot;,</pre>
</li>
<li>
<pre>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&quot;/awstats/&quot; =&amp;gt; &quot;/usr/lib/cgi-bin/&quot;,</pre>
</li>
<li>
<pre>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&quot;/icon/&quot; =&amp;gt; &quot;/usr/share/awstats/icon/&quot;</pre>
</li>
<li>
<pre>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;)</pre>
</li>
<li>
<pre># provide awstats cgi-bin access</pre>
</li>
<li>
<pre>$HTTP[&quot;url&quot;] =~ &quot;/awstats/&quot; {</pre>
</li>
<li>
<pre>&nbsp;&nbsp;&nbsp;&nbsp;cgi.assign = ( &quot;.pl&quot; =&amp;gt; &quot;/usr/bin/perl&quot; )</pre>
</li>
<li>
<pre>&nbsp;&nbsp;&nbsp;&nbsp;auth.require = ( &quot;/awstats/&quot; =&amp;gt;</pre>
</li>
<li>
<pre>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;(</pre>
</li>
<li>
<pre>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&quot;method&quot; =&amp;gt; &quot;digest&quot;,</pre>
</li>
<li>
<pre>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&quot;realm&quot; =&amp;gt; &quot;Trusted users only&quot;,</pre>
</li>
<li>
<pre>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&quot;require&quot; =&amp;gt; &quot;valid-user&quot;</pre>
</li>
<li>
<pre>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;)</pre>
</li>
<li>
<pre>&nbsp;&nbsp;&nbsp;&nbsp;)</pre>
</li>
<li>
<pre>}</pre>
</li>
</ol>
</div>
</div>
</td>
</tr>
</tbody>
</table>
]]></content:encoded>
			<wfw:commentRss>http://www.kogitae.fr/htdigest-sous-lighttpd.html/feed</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Keeping a Log Of Daily Network Traffic for ADSL or Dedicated Remote Linux Server</title>
		<link>http://www.kogitae.fr/keeping-a-log-of-daily-network-traffic-for-adsl-or-dedicated-remote-linux-server.html</link>
		<comments>http://www.kogitae.fr/keeping-a-log-of-daily-network-traffic-for-adsl-or-dedicated-remote-linux-server.html#comments</comments>
		<pubDate>Fri, 24 Feb 2012 14:55:47 +0000</pubDate>
		<dc:creator>PJ Michel</dc:creator>
				<category><![CDATA[Généralités]]></category>
		<category><![CDATA[linux-network-log]]></category>

		<guid isPermaLink="false">http://www.kogitae.fr/?p=486</guid>
		<description><![CDATA[Keeping a Log Of Daily Network Traffic for ADSL or Dedicated Remote Linux Server.]]></description>
			<content:encoded><![CDATA[<p><a href='http://www.cyberciti.biz/tips/keeping-a-log-of-daily-network-traffic-for-adsl-or-dedicated-remote-linux-box.html'>Keeping a Log Of Daily Network Traffic for ADSL or Dedicated Remote Linux Server</a>.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.kogitae.fr/keeping-a-log-of-daily-network-traffic-for-adsl-or-dedicated-remote-linux-server.html/feed</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
	</channel>
</rss>
<!-- This Quick Cache file was built for (  www.kogitae.fr/feed ) in 0.38751 seconds, on May 20th, 2012 at 12:56 am UTC. -->
<!-- This Quick Cache file will automatically expire ( and be re-built automatically ) on May 20th, 2012 at 1:56 am UTC -->
<!-- +++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ -->
<!-- Quick Cache Is Fully Functional :-) ... A Quick Cache file was just served for (  www.kogitae.fr/feed ) in 0.00028 seconds, on May 20th, 2012 at 1:32 am UTC. -->
