<?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>blog.nicolas.pawlak.fr</title>
	<atom:link href="http://blog.nicolas.pawlak.fr/feed/" rel="self" type="application/rss+xml" />
	<link>http://blog.nicolas.pawlak.fr</link>
	<description>Tux ne sait pas voler, c&#039;est normal : ce n&#039;est pas un pingouin...</description>
	<lastBuildDate>Sat, 04 Sep 2010 08:37:20 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.0.1</generator>
		<item>
		<title>Fonction ASP de recherche d&#8217;un utilisateur Active Directory</title>
		<link>http://blog.nicolas.pawlak.fr/2010/07/24/fonction-asp-de-recherche-dun-utilisateur-active-directory/</link>
		<comments>http://blog.nicolas.pawlak.fr/2010/07/24/fonction-asp-de-recherche-dun-utilisateur-active-directory/#comments</comments>
		<pubDate>Sat, 24 Jul 2010 09:00:06 +0000</pubDate>
		<dc:creator>Nicolas</dc:creator>
				<category><![CDATA[ASP]]></category>
		<category><![CDATA[Windows]]></category>
		<category><![CDATA[active]]></category>
		<category><![CDATA[ad]]></category>
		<category><![CDATA[annuaire]]></category>
		<category><![CDATA[attribut]]></category>
		<category><![CDATA[dc]]></category>
		<category><![CDATA[directory]]></category>
		<category><![CDATA[fonction]]></category>
		<category><![CDATA[function]]></category>
		<category><![CDATA[ou]]></category>
		<category><![CDATA[recherche]]></category>
		<category><![CDATA[recordset]]></category>
		<category><![CDATA[subtree]]></category>
		<category><![CDATA[utilisateur]]></category>
		<guid isPermaLink="false">http://blog.nicolas.pawlak.fr/?p=1161</guid>
		<description><![CDATA[&#60;% Function RechercheUtilisateur&#40;utilisateur, attribut&#41; &#160; 'Déclaration des variables Dim objConn, objRS Dim Base, Filtre, Scope, Cmd Dim ServeurAD, CompteAD, PwdAD, OU, DC, AttributFiltre &#160; 'Paramétrage ServeurAD = &#34;127.0.0.1&#34; 'Machine hébergeant Active Directory CompteAD = &#34;DOMAINE\admin.ad&#34; 'Utilisateur autorisé à interroger Active Directory PwdAD = &#34;********&#34; 'Mot de passe de cet utilisateur OU = &#34;OU=Utilisateurs&#34; 'OU à [...]]]></description>
			<content:encoded><![CDATA[
<div class="wp_syntax"><div class="code"><pre class="asp" style="font-family:monospace;"><span style="color: #000000; font-weight: bold;">&lt;%</span>
<span style="color: #0000ff; font-weight: bold;">Function</span> RechercheUtilisateur<span style="color: #006600; font-weight:bold;">&#40;</span>utilisateur, attribut<span style="color: #006600; font-weight:bold;">&#41;</span>
&nbsp;
<span style="color: #008000;">'Déclaration des variables</span>
<span style="color: #990099; font-weight: bold;">Dim</span> objConn, objRS
<span style="color: #990099; font-weight: bold;">Dim</span> Base, Filtre, Scope, Cmd
<span style="color: #990099; font-weight: bold;">Dim</span> ServeurAD, CompteAD, PwdAD, OU, DC, AttributFiltre
&nbsp;
<span style="color: #008000;">'Paramétrage</span>
ServeurAD <span style="color: #006600; font-weight: bold;">=</span> <span style="color: #cc0000;">&quot;127.0.0.1&quot;</span>           <span style="color: #008000;">'Machine hébergeant Active Directory</span>
CompteAD <span style="color: #006600; font-weight: bold;">=</span> <span style="color: #cc0000;">&quot;DOMAINE\admin.ad&quot;</span>     <span style="color: #008000;">'Utilisateur autorisé à interroger Active Directory</span>
PwdAD <span style="color: #006600; font-weight: bold;">=</span> <span style="color: #cc0000;">&quot;********&quot;</span>                <span style="color: #008000;">'Mot de passe de cet utilisateur</span>
OU <span style="color: #006600; font-weight: bold;">=</span> <span style="color: #cc0000;">&quot;OU=Utilisateurs&quot;</span>            <span style="color: #008000;">'OU à interroger</span>
DC <span style="color: #006600; font-weight: bold;">=</span> <span style="color: #cc0000;">&quot;DC=domaine,DC=fr&quot;</span>           <span style="color: #008000;">'DC à interroger</span>
AttributFiltre <span style="color: #006600; font-weight: bold;">=</span> <span style="color: #cc0000;">&quot;sAMAccountName&quot;</span> <span style="color: #008000;">'Filtre de recherche de l'utilisateur</span>
&nbsp;
<span style="color: #008000;">'Connexion à l'annuaire Active Directory</span>
<span style="color: #990099; font-weight: bold;">Set</span> objConn <span style="color: #006600; font-weight: bold;">=</span> <span style="color: #330066;">CreateObject</span><span style="color: #006600; font-weight:bold;">&#40;</span><span style="color: #cc0000;">&quot;ADODB.Connection&quot;</span><span style="color: #006600; font-weight:bold;">&#41;</span>
objConn.<span style="color: #9900cc;">Provider</span> <span style="color: #006600; font-weight: bold;">=</span> <span style="color: #cc0000;">&quot;ADsDSOObject&quot;</span>
objConn.<span style="color: #330066;">Properties</span><span style="color: #006600; font-weight:bold;">&#40;</span><span style="color: #cc0000;">&quot;User ID&quot;</span><span style="color: #006600; font-weight:bold;">&#41;</span> <span style="color: #006600; font-weight: bold;">=</span> CompteAD
objConn.<span style="color: #330066;">Properties</span><span style="color: #006600; font-weight:bold;">&#40;</span><span style="color: #cc0000;">&quot;Password&quot;</span><span style="color: #006600; font-weight:bold;">&#41;</span> <span style="color: #006600; font-weight: bold;">=</span> PwdAD
objConn.<span style="color: #330066;">Properties</span><span style="color: #006600; font-weight:bold;">&#40;</span><span style="color: #cc0000;">&quot;Encrypt Password&quot;</span><span style="color: #006600; font-weight:bold;">&#41;</span> <span style="color: #006600; font-weight: bold;">=</span> <span style="color: #0000ff; font-weight: bold;">true</span>
objConn.<span style="color: #330066;">Open</span>
&nbsp;
<span style="color: #008000;">'Création de la requête</span>
<span style="color: #990099; font-weight: bold;">if</span> attribut<span style="color: #006600; font-weight: bold;">=</span><span style="color: #cc0000;">&quot;&quot;</span> <span style="color: #990099; font-weight: bold;">then</span>
        <span style="color: #008000;">'Permet la recherche simple de l'utilisateur (sans recherche d'attribut)</span>
	attribut <span style="color: #006600; font-weight: bold;">=</span> <span style="color: #cc0000;">&quot;sAMAccountName&quot;</span>
<span style="color: #990099; font-weight: bold;">end</span> <span style="color: #990099; font-weight: bold;">if</span>
Base <span style="color: #006600; font-weight: bold;">=</span> <span style="color: #cc0000;">&quot;&lt;LDAP://&quot;</span> <span style="color: #006600; font-weight: bold;">&amp;</span> ServeurAD <span style="color: #006600; font-weight: bold;">&amp;</span> <span style="color: #cc0000;">&quot;/&quot;</span> <span style="color: #006600; font-weight: bold;">&amp;</span> OU <span style="color: #006600; font-weight: bold;">&amp;</span> <span style="color: #cc0000;">&quot;,&quot;</span> <span style="color: #006600; font-weight: bold;">&amp;</span> DC <span style="color: #006600; font-weight: bold;">&amp;</span> <span style="color: #cc0000;">&quot;&gt;&quot;</span>
Filtre <span style="color: #006600; font-weight: bold;">=</span> <span style="color: #cc0000;">&quot;(&quot;</span> <span style="color: #006600; font-weight: bold;">&amp;</span> AttributFiltre <span style="color: #006600; font-weight: bold;">&amp;</span> <span style="color: #cc0000;">&quot;=&quot;</span> <span style="color: #006600; font-weight: bold;">&amp;</span> utilisateur <span style="color: #006600; font-weight: bold;">&amp;</span> <span style="color: #cc0000;">&quot;)&quot;</span>
Scope <span style="color: #006600; font-weight: bold;">=</span> <span style="color: #cc0000;">&quot;subtree&quot;</span>
Cmd <span style="color: #006600; font-weight: bold;">=</span> Base <span style="color: #006600; font-weight: bold;">&amp;</span> <span style="color: #cc0000;">&quot;;&quot;</span> <span style="color: #006600; font-weight: bold;">&amp;</span> Filtre <span style="color: #006600; font-weight: bold;">&amp;</span> <span style="color: #cc0000;">&quot;;&quot;</span> <span style="color: #006600; font-weight: bold;">&amp;</span> attribut <span style="color: #006600; font-weight: bold;">&amp;</span> <span style="color: #cc0000;">&quot;;&quot;</span> <span style="color: #006600; font-weight: bold;">&amp;</span> Scope
<span style="color: #990099; font-weight: bold;">set</span> objRS <span style="color: #006600; font-weight: bold;">=</span> <span style="color: #990099; font-weight: bold;">Server</span>.<span style="color: #330066;">CreateObject</span><span style="color: #006600; font-weight:bold;">&#40;</span><span style="color: #cc0000;">&quot;ADODB.Recordset&quot;</span><span style="color: #006600; font-weight:bold;">&#41;</span>
<span style="color: #990099; font-weight: bold;">set</span> objRS <span style="color: #006600; font-weight: bold;">=</span> objConn.<span style="color: #330066;">Execute</span><span style="color: #006600; font-weight:bold;">&#40;</span>Cmd<span style="color: #006600; font-weight:bold;">&#41;</span>
&nbsp;
<span style="color: #990099; font-weight: bold;">If</span> objRS.<span style="color: #9900cc;">RecordCount</span> <span style="color: #006600; font-weight: bold;">=</span> <span style="color: #800000;">0</span> <span style="color: #990099; font-weight: bold;">Then</span>
        <span style="color: #008000;">'Aucun utilisateur trouvé</span>
	RechercheUtilisateur <span style="color: #006600; font-weight: bold;">=</span> <span style="color: #0000ff; font-weight: bold;">false</span>
<span style="color: #990099; font-weight: bold;">Else</span>
	<span style="color: #990099; font-weight: bold;">if</span> IsNull<span style="color: #006600; font-weight:bold;">&#40;</span>objRS<span style="color: #006600; font-weight:bold;">&#40;</span>attribut<span style="color: #006600; font-weight:bold;">&#41;</span><span style="color: #006600; font-weight:bold;">&#41;</span> <span style="color: #990099; font-weight: bold;">then</span>
		<span style="color: #008000;">'Utilisateur trouvé, attribut recherché vide</span>
		RechercheUtilisateur <span style="color: #006600; font-weight: bold;">=</span> <span style="color: #cc0000;">&quot;NULL&quot;</span>
	<span style="color: #990099; font-weight: bold;">else</span>
		<span style="color: #990099; font-weight: bold;">if</span> attribut<span style="color: #006600; font-weight: bold;">=</span><span style="color: #cc0000;">&quot;sAMAccountName&quot;</span> <span style="color: #990099; font-weight: bold;">then</span>
			<span style="color: #008000;">'Utilisateur trouvé, pas d'attribut recherché</span>
			RechercheUtilisateur <span style="color: #006600; font-weight: bold;">=</span> <span style="color: #0000ff; font-weight: bold;">true</span>
		<span style="color: #990099; font-weight: bold;">else</span>
			<span style="color: #008000;">'Utilisateur trouvé, attribut recherché non-nul</span>
			RechercheUtilisateur <span style="color: #006600; font-weight: bold;">=</span> objRS<span style="color: #006600; font-weight:bold;">&#40;</span>attribut<span style="color: #006600; font-weight:bold;">&#41;</span>
		<span style="color: #990099; font-weight: bold;">end</span> <span style="color: #990099; font-weight: bold;">if</span>
	<span style="color: #990099; font-weight: bold;">end</span> <span style="color: #990099; font-weight: bold;">if</span>
<span style="color: #990099; font-weight: bold;">End</span> <span style="color: #990099; font-weight: bold;">If</span>
&nbsp;
<span style="color: #008000;">'Fermeture du recordset et de la connexion</span>
objRS.<span style="color: #330066;">Close</span>
objConn.<span style="color: #330066;">Close</span>
&nbsp;
<span style="color: #990099; font-weight: bold;">End</span> <span style="color: #0000ff; font-weight: bold;">Function</span>
<span style="color: #000000; font-weight: bold;">%&gt;</span></pre></div></div>
<p>Exemple de recherche avec un attribut en paramètre :</p>
<div class="wp_syntax"><div class="code"><pre class="asp" style="font-family:monospace;"><span style="color: #000000; font-weight: bold;">&lt;%</span>
<span style="color: #990099; font-weight: bold;">Response</span>.<span style="color: #330066;">Write</span> <span style="color: #cc0000;">&quot;E-mail : &quot;</span> <span style="color: #006600; font-weight: bold;">&amp;</span> RechercheUtilisateur<span style="color: #006600; font-weight:bold;">&#40;</span><span style="color: #cc0000;">&quot;utilisateur.alpha&quot;</span>, <span style="color: #cc0000;">&quot;mail&quot;</span><span style="color: #006600; font-weight:bold;">&#41;</span>
<span style="color: #000000; font-weight: bold;">%&gt;</span></pre></div></div>
<p>Résultat :</p>
<div class="wp_syntax"><div class="code"><pre class="text" style="font-family:monospace;">E-mail : utilisateur.alpha@domaine.fr</pre></div></div>
<p>Exemple de recherche &laquo;&nbsp;simple&nbsp;&raquo; :</p>
<div class="wp_syntax"><div class="code"><pre class="asp" style="font-family:monospace;"><span style="color: #000000; font-weight: bold;">&lt;%</span>
<span style="color: #990099; font-weight: bold;">Response</span>.<span style="color: #330066;">Write</span> <span style="color: #cc0000;">&quot;Utilisateur existant : &quot;</span>
<span style="color: #990099; font-weight: bold;">if</span> RechercheUtilisateur<span style="color: #006600; font-weight:bold;">&#40;</span><span style="color: #cc0000;">&quot;utilisateur.alpha&quot;</span>,<span style="color: #cc0000;">&quot;&quot;</span><span style="color: #006600; font-weight:bold;">&#41;</span><span style="color: #006600; font-weight: bold;">=</span><span style="color: #0000ff; font-weight: bold;">true</span> <span style="color: #990099; font-weight: bold;">then</span>
	<span style="color: #990099; font-weight: bold;">Response</span>.<span style="color: #330066;">Write</span> <span style="color: #cc0000;">&quot;oui&quot;</span>
<span style="color: #990099; font-weight: bold;">else</span>
	<span style="color: #990099; font-weight: bold;">Response</span>.<span style="color: #330066;">Write</span> <span style="color: #cc0000;">&quot;non&quot;</span>
<span style="color: #990099; font-weight: bold;">end</span> <span style="color: #990099; font-weight: bold;">if</span>
<span style="color: #000000; font-weight: bold;">%&gt;</span></pre></div></div>
<p>Résultat :</p>
<div class="wp_syntax"><div class="code"><pre class="text" style="font-family:monospace;">Utilisateur existant : oui</pre></div></div>
]]></content:encoded>
			<wfw:commentRss>http://blog.nicolas.pawlak.fr/2010/07/24/fonction-asp-de-recherche-dun-utilisateur-active-directory/feed/</wfw:commentRss>
		<slash:comments>3</slash:comments>
		</item>
		<item>
		<title>LastFM : quand Decibel Audio Player ne scrobble plus correctement&#8230;</title>
		<link>http://blog.nicolas.pawlak.fr/2010/07/10/lastfm-quand-decibel-audio-player-ne-scrobble-plus-correctement/</link>
		<comments>http://blog.nicolas.pawlak.fr/2010/07/10/lastfm-quand-decibel-audio-player-ne-scrobble-plus-correctement/#comments</comments>
		<pubDate>Sat, 10 Jul 2010 15:00:43 +0000</pubDate>
		<dc:creator>Nicolas</dc:creator>
				<category><![CDATA[Decibel Audio Player]]></category>
		<category><![CDATA[LastFM]]></category>
		<category><![CDATA[Linux]]></category>
		<category><![CDATA[audio]]></category>
		<category><![CDATA[bug]]></category>
		<category><![CDATA[decibel]]></category>
		<category><![CDATA[fm]]></category>
		<category><![CDATA[last]]></category>
		<category><![CDATA[lastfm]]></category>
		<category><![CDATA[player]]></category>
		<category><![CDATA[scrobbler]]></category>
		<category><![CDATA[scrobbling]]></category>
		<guid isPermaLink="false">http://blog.nicolas.pawlak.fr/?p=1068</guid>
		<description><![CDATA[Decibel Audio Player est un lecteur audio pour Linux (sous environnement GNOME), écrit en Python. Léger et simple d&#8217;utilisation, il apporte tout le nécessaire à l&#8217;écoute de fichiers musicaux sur une machine, sans le superflu. Pas mal d&#8217;options sont présentes sous forme d&#8217;options dans le menu &#171;&#160;Préférences&#160;&#187;, ce qui permet de n&#8217;activer que ce dont [...]]]></description>
			<content:encoded><![CDATA[<p><a href="http://decibel.silent-blade.org/">Decibel Audio Player</a> est un lecteur audio pour Linux (sous environnement <a href="http://doc.ubuntu-fr.org/gnome">GNOME</a>), écrit en <a href="http://fr.wikipedia.org/wiki/Python_%28langage%29">Python</a>. Léger et simple d&#8217;utilisation, il apporte tout le nécessaire à l&#8217;écoute de fichiers musicaux sur une machine, sans le superflu. Pas mal d&#8217;options sont présentes sous forme d&#8217;options dans le menu &laquo;&nbsp;Préférences&nbsp;&raquo;, ce qui permet de n&#8217;activer que ce dont vous avez réellement besoin. Après avoir essayé bon nombre de lecteurs audio (<a href="http://doc.ubuntu-fr.org/Amarok">Amarok</a>, <a href="http://doc.ubuntu-fr.org/Listen">Listen</a>, <a href="http://doc.ubuntu-fr.org/Exaile">Exaile</a>&#8230; et <a href="http://moc.daper.net/">MOC</a> !), j&#8217;ai finalement adopté Decibel depuis un ou deux ans.</p>
<p align="center"><img alt="decibel-audio-player" src="http://decibel.silent-blade.org/uploads/Main/main-library.png" title="decibel-audio-player" class="aligncenter" width="70%" height="70%" /></p>
<p><a href="http://www.lastfm.fr">LastFM</a> est une sorte de &laquo;&nbsp;réseau social musical&nbsp;&raquo; : votre lecteur audio soumet au site la liste des titres que vous écoutez, ce qui permet de constituer au fil du temps des statistiques sur vos goûts musicaux. L&#8217;intérêt ? Pouvoir vous proposer des noms d&#8217;artistes pouvant correspondre à vos goûts, des <a href="http://www.lastfm.fr/events">concerts</a> des artistes que vous écoutez régulièrement, découvrir vos affinités musicales avec d&#8217;autres utilisateurs&#8230; et pouvoir écouter légalement des extraits de beaucoup d&#8217;albums. Bref, pour ceux qui écoutent beaucoup de musique, fréquentent de temps à autres les salles de concert et recherchent des nouveautés, LastFM est le site qu&#8217;il vous faut.</p>
<p>Vous pouvez visiter mon <a href="http://www.lastfm.fr/user/HostOfSeraphim">profil LastFM</a> pour avoir un aperçu des fonctionnalités.</p>
<p align="center"><img alt="Lastfm" src="http://transientwriting.files.wordpress.com/2008/10/last-fm-logo.png" title="LastFM" class="aligncenter" width="50%" height="50%" /></p>
<p>La transmission à LastFM de vos données d&#8217;écoute porte un nom bien spécifique : le <em>scrobbling</em>. C&#8217;est cette fonctionnalité là qui pose problème à Decibel : au moins de quelques temps d&#8217;utilisation (un mois, six mois, voire plus&#8230;), l&#8217;outil de <em>scrobbling</em> ne fonctionne plus : si vous consultez votre page LastFM, vous vous apercevez que seul le titre actuellement écouté apparaît, et que plus aucun titre n&#8217;est conservé dans l&#8217;historique. Bref, à part afficher le titre en cours, votre profil LastFM ne bouge plus d&#8217;un poil.</p>
<p>Le problème est en fait lié aux <a href="http://fr.wikipedia.org/wiki/ID3"><em>ID3 tags</em></a> de certains titres, comportant des caractères non acceptés par LastFM qui refuse alors la soumission ; le titre reste donc en cache (fichier ~/.config/decibel-audio-player/audioscrobbler-cache.txt), et les titres joués à la suite y restent également bloqués.</p>
<p>Dans mon cas, voici le nom d&#8217;artiste du premier titre présent en cache :</p>
<div class="wp_syntax"><div class="code"><pre class="text" style="font-family:monospace;">a[*]=%44%65%76%69%6E%20%54%6F%77%6E%73%65%6E%64%0%0%0%0%0%0%0%0%0%0%0%0%0%0%0</pre></div></div>
<p>Ce qui nous donne, une fois converti, le nom d&#8217;artiste suivant :</p>
<div class="wp_syntax"><div class="code"><pre class="text" style="font-family:monospace;">a[*]=Devin Townsend\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0</pre></div></div>
<p>Les caractères « \0 » empêchent la soumission du titre auprès de LastFM. Il faut donc supprimer du fichier toute ligne &laquo;&nbsp;mal formatée&nbsp;&raquo; pour que le cache puisse être soumis à nouveau et que le scrobbling retrouve son comportement normal.</p>
<p>Il est possible aussi de tout simplement supprimer le fichier de cache, si vous souhaitez faire simple :</p>
<div class="wp_syntax"><div class="code"><pre class="bash" style="font-family:monospace;">user<span style="color: #000000; font-weight: bold;">@</span>machine:~$ <span style="color: #c20cb9; font-weight: bold;">rm</span> <span style="color: #660033;">-rf</span> ~<span style="color: #000000; font-weight: bold;">/</span>.config<span style="color: #000000; font-weight: bold;">/</span>decibel-audio-player<span style="color: #000000; font-weight: bold;">/</span>audioscrobbler-cache.txt</pre></div></div>
<p>Le <em>bug</em> a été signalé au développeur de Decibel, qui a réglé le problème dans la version &laquo;&nbsp;trunk&nbsp;&raquo;. Il devrait donc être corrigé dans la version 1.06 du logiciel.</p>
]]></content:encoded>
			<wfw:commentRss>http://blog.nicolas.pawlak.fr/2010/07/10/lastfm-quand-decibel-audio-player-ne-scrobble-plus-correctement/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Linux : attention aux mots de passe Oracle sur sqlplus !</title>
		<link>http://blog.nicolas.pawlak.fr/2010/06/29/linux-attention-aux-mots-de-passe-oracle-sur-sqlplus/</link>
		<comments>http://blog.nicolas.pawlak.fr/2010/06/29/linux-attention-aux-mots-de-passe-oracle-sur-sqlplus/#comments</comments>
		<pubDate>Tue, 29 Jun 2010 10:00:56 +0000</pubDate>
		<dc:creator>Nicolas</dc:creator>
				<category><![CDATA[Oracle]]></category>
		<category><![CDATA[connect]]></category>
		<category><![CDATA[database]]></category>
		<category><![CDATA[Linux]]></category>
		<category><![CDATA[mot]]></category>
		<category><![CDATA[nolog]]></category>
		<category><![CDATA[passe]]></category>
		<category><![CDATA[ps]]></category>
		<category><![CDATA[sqlplus]]></category>
		<category><![CDATA[system]]></category>
		<category><![CDATA[xe]]></category>
		<guid isPermaLink="false">http://blog.nicolas.pawlak.fr/?p=970</guid>
		<description><![CDATA[Une petite piqûre de rappel sur la façon dont se connecter à une instance Oracle sous Linux, afin de tordre le cou au sacro-saint sqlplus identifiant/motdepasse@instance &#8230; &#91;ora102@bddhost&#93;# sqlplus SYSTEM/manager@XE &#160; SQL*Plus: Release 10.2.0.1.0 - Production on Tue Jun 8 10:49:35 2010 &#160; Copyright &#40;c&#41; 1982, 2005, Oracle. All rights reserved. &#160; Connected to: Oracle [...]]]></description>
			<content:encoded><![CDATA[<p>Une petite piqûre de rappel sur la façon dont se connecter à une <a href="http://oracle.developpez.com/guide/architecture/archiinstance/">instance Oracle</a> sous Linux, afin de tordre le cou au sacro-saint <em>sqlplus  identifiant/motdepasse@instance</em> &#8230;</p>
<div class="wp_syntax"><div class="code"><pre class="bash" style="font-family:monospace;"><span style="color: #7a0874; font-weight: bold;">&#91;</span>ora102<span style="color: #000000; font-weight: bold;">@</span>bddhost<span style="color: #7a0874; font-weight: bold;">&#93;</span><span style="color: #666666; font-style: italic;"># sqlplus SYSTEM/manager@XE</span>
&nbsp;
SQL<span style="color: #000000; font-weight: bold;">*</span>Plus: Release 10.2.0.1.0 - Production on Tue Jun <span style="color: #000000;">8</span> <span style="color: #000000;">10</span>:<span style="color: #000000;">49</span>:<span style="color: #000000;">35</span> <span style="color: #000000;">2010</span>
&nbsp;
Copyright <span style="color: #7a0874; font-weight: bold;">&#40;</span>c<span style="color: #7a0874; font-weight: bold;">&#41;</span> <span style="color: #000000;">1982</span>, <span style="color: #000000;">2005</span>, Oracle.  All rights reserved.
&nbsp;
Connected to:
Oracle Database 10g Express Edition Release 10.2.0.1.0 - Production
&nbsp;
SQL<span style="color: #000000; font-weight: bold;">&gt;</span></pre></div></div>
<p>Ouvrons un autre <a href="http://doc.ubuntu-fr.org/terminal">terminal</a>, et voyons ce qui se passe lors d&#8217;une commande <em><a href="http://chl.be/glmf/www.linuxmag-france.org/old/lm3/ps.html">ps</a></em> :</p>
<div class="wp_syntax"><div class="code"><pre class="bash" style="font-family:monospace;"><span style="color: #7a0874; font-weight: bold;">&#91;</span>root<span style="color: #000000; font-weight: bold;">@</span>bddhost<span style="color: #7a0874; font-weight: bold;">&#93;</span><span style="color: #666666; font-style: italic;"># ps -ef | grep sqlplus | grep -v grep</span>
root      <span style="color: #000000;">9207</span>  <span style="color: #000000;">9193</span>  <span style="color: #000000;">0</span> <span style="color: #000000;">10</span>:<span style="color: #000000;">49</span> pts<span style="color: #000000; font-weight: bold;">/</span><span style="color: #000000;">0</span>    00:00:00 sqlplus SYSTEM<span style="color: #000000; font-weight: bold;">/</span>manager<span style="color: #000000; font-weight: bold;">@</span>XE
root      <span style="color: #000000;">9208</span>  <span style="color: #000000;">9207</span>  <span style="color: #000000;">0</span> <span style="color: #000000;">10</span>:<span style="color: #000000;">49</span> pts<span style="color: #000000; font-weight: bold;">/</span><span style="color: #000000;">1</span>    00:00:00 sqlplus</pre></div></div>
<p>Plutôt gênant, non ? </p>
<p>Une bonne pratique est l&#8217;utilisation de l&#8217;option /nolog :</p>
<div class="wp_syntax"><div class="code"><pre class="bash" style="font-family:monospace;"><span style="color: #7a0874; font-weight: bold;">&#91;</span>ora102<span style="color: #000000; font-weight: bold;">@</span>bddhost<span style="color: #7a0874; font-weight: bold;">&#93;</span><span style="color: #666666; font-style: italic;"># sqlplus /nolog</span>
&nbsp;
SQL<span style="color: #000000; font-weight: bold;">*</span>Plus: Release 10.2.0.1.0 - Production on Tue Jun <span style="color: #000000;">8</span> <span style="color: #000000;">10</span>:<span style="color: #000000;">53</span>:<span style="color: #000000;">48</span> <span style="color: #000000;">2010</span>
&nbsp;
Copyright <span style="color: #7a0874; font-weight: bold;">&#40;</span>c<span style="color: #7a0874; font-weight: bold;">&#41;</span> <span style="color: #000000;">1982</span>, <span style="color: #000000;">2005</span>, Oracle.  All rights reserved.
&nbsp;
SQL<span style="color: #000000; font-weight: bold;">&gt;</span> connect SYSTEM<span style="color: #000000; font-weight: bold;">/</span>manager<span style="color: #000000; font-weight: bold;">@</span>XE
Connected.
SQL<span style="color: #000000; font-weight: bold;">&gt;</span></pre></div></div>
<p>Le résultat de la commande <em>ps</em> :</p>
<div class="wp_syntax"><div class="code"><pre class="bash" style="font-family:monospace;"><span style="color: #7a0874; font-weight: bold;">&#91;</span>root<span style="color: #000000; font-weight: bold;">@</span>bddhost<span style="color: #7a0874; font-weight: bold;">&#93;</span><span style="color: #666666; font-style: italic;"># ps -ef | grep sqlplus | grep -v grep</span>
root      <span style="color: #000000;">9314</span>  <span style="color: #000000;">9193</span>  <span style="color: #000000;">0</span> <span style="color: #000000;">10</span>:<span style="color: #000000;">53</span> pts<span style="color: #000000; font-weight: bold;">/</span><span style="color: #000000;">0</span>    00:00:00 sqlplus <span style="color: #000000; font-weight: bold;">/</span>nolog
root      <span style="color: #000000;">9315</span>  <span style="color: #000000;">9314</span>  <span style="color: #000000;">0</span> <span style="color: #000000;">10</span>:<span style="color: #000000;">53</span> pts<span style="color: #000000; font-weight: bold;">/</span><span style="color: #000000;">1</span>    00:00:00 sqlplus</pre></div></div>
<p>C&#8217;est mieux !</p>
<p>Enfin, pour une utilisation hors scripts, il vaut mieux éviter de saisir de cette façon son mot de passe et privilégier la solution suivante :</p>
<div class="wp_syntax"><div class="code"><pre class="bash" style="font-family:monospace;"><span style="color: #7a0874; font-weight: bold;">&#91;</span>ora102<span style="color: #000000; font-weight: bold;">@</span>bddhost<span style="color: #7a0874; font-weight: bold;">&#93;</span><span style="color: #666666; font-style: italic;"># sqlplus /nolog</span>
&nbsp;
SQL<span style="color: #000000; font-weight: bold;">*</span>Plus: Release 10.2.0.1.0 - Production on Tue Jun <span style="color: #000000;">8</span> <span style="color: #000000;">10</span>:<span style="color: #000000;">56</span>:<span style="color: #000000;">55</span> <span style="color: #000000;">2010</span>
&nbsp;
Copyright <span style="color: #7a0874; font-weight: bold;">&#40;</span>c<span style="color: #7a0874; font-weight: bold;">&#41;</span> <span style="color: #000000;">1982</span>, <span style="color: #000000;">2005</span>, Oracle.  All rights reserved.
&nbsp;
SQL<span style="color: #000000; font-weight: bold;">&gt;</span> connect SYSTEM<span style="color: #000000; font-weight: bold;">@</span>XE
Enter password: <span style="color: #000000; font-weight: bold;">*******</span>
Connected.
SQL<span style="color: #000000; font-weight: bold;">&gt;</span></pre></div></div>
]]></content:encoded>
			<wfw:commentRss>http://blog.nicolas.pawlak.fr/2010/06/29/linux-attention-aux-mots-de-passe-oracle-sur-sqlplus/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Retirer les lignes vides d&#8217;un fichier sous Linux</title>
		<link>http://blog.nicolas.pawlak.fr/2010/06/13/retirer-les-lignes-vides-dun-fichier-sous-linux/</link>
		<comments>http://blog.nicolas.pawlak.fr/2010/06/13/retirer-les-lignes-vides-dun-fichier-sous-linux/#comments</comments>
		<pubDate>Sun, 13 Jun 2010 08:00:52 +0000</pubDate>
		<dc:creator>Nicolas</dc:creator>
				<category><![CDATA[Linux]]></category>
		<category><![CDATA[awk]]></category>
		<category><![CDATA[cat]]></category>
		<category><![CDATA[empty]]></category>
		<category><![CDATA[enlever]]></category>
		<category><![CDATA[fichier]]></category>
		<category><![CDATA[grep]]></category>
		<category><![CDATA[ligne]]></category>
		<category><![CDATA[lignes]]></category>
		<category><![CDATA[line]]></category>
		<category><![CDATA[retirer]]></category>
		<category><![CDATA[sed]]></category>
		<category><![CDATA[vide]]></category>
		<category><![CDATA[vides]]></category>
		<guid isPermaLink="false">http://blog.nicolas.pawlak.fr/?p=981</guid>
		<description><![CDATA[Ces petites commandes méritent à être retenues, pour gagner du temps le jour où on est confronté au problème&#8230; et que l&#8217;on a pas Google sous la main ! Prenons un fichier test.txt qui nous servira d&#8217;exemple : &#91;root@pc-linux&#93;# cat test.txt test 1 &#160; test 2 test 3 &#160; test 4 test 5 test 6 [...]]]></description>
			<content:encoded><![CDATA[<p>Ces petites commandes méritent à être retenues, pour gagner du temps le jour où on est confronté au problème&#8230; et que l&#8217;on a pas <a href="http://www.google.fr/">Google</a> sous la main !</p>
<p>Prenons un fichier test.txt qui nous servira d&#8217;exemple :</p>
<div class="wp_syntax"><div class="code"><pre class="bash" style="font-family:monospace;"><span style="color: #7a0874; font-weight: bold;">&#91;</span>root<span style="color: #000000; font-weight: bold;">@</span>pc-linux<span style="color: #7a0874; font-weight: bold;">&#93;</span><span style="color: #666666; font-style: italic;"># cat test.txt</span>
<span style="color: #7a0874; font-weight: bold;">test</span> <span style="color: #000000;">1</span>
&nbsp;
<span style="color: #7a0874; font-weight: bold;">test</span> <span style="color: #000000;">2</span>
<span style="color: #7a0874; font-weight: bold;">test</span> <span style="color: #000000;">3</span>
&nbsp;
<span style="color: #7a0874; font-weight: bold;">test</span> <span style="color: #000000;">4</span>
<span style="color: #7a0874; font-weight: bold;">test</span> <span style="color: #000000;">5</span>
<span style="color: #7a0874; font-weight: bold;">test</span> <span style="color: #000000;">6</span>
&nbsp;
&nbsp;
&nbsp;
&nbsp;
<span style="color: #7a0874; font-weight: bold;">test</span> <span style="color: #000000;">7</span></pre></div></div>
<p><strong>Avec <a href="http://fr.wikipedia.org/wiki/Stream_Editor">sed</a> :</strong></p>
<div class="wp_syntax"><div class="code"><pre class="bash" style="font-family:monospace;"><span style="color: #7a0874; font-weight: bold;">&#91;</span>root<span style="color: #000000; font-weight: bold;">@</span>pc-linux<span style="color: #7a0874; font-weight: bold;">&#93;</span><span style="color: #666666; font-style: italic;"># sed '/^$/D' test.txt</span>
<span style="color: #7a0874; font-weight: bold;">test</span> <span style="color: #000000;">1</span>
<span style="color: #7a0874; font-weight: bold;">test</span> <span style="color: #000000;">2</span>
<span style="color: #7a0874; font-weight: bold;">test</span> <span style="color: #000000;">3</span>
<span style="color: #7a0874; font-weight: bold;">test</span> <span style="color: #000000;">4</span>
<span style="color: #7a0874; font-weight: bold;">test</span> <span style="color: #000000;">5</span>
<span style="color: #7a0874; font-weight: bold;">test</span> <span style="color: #000000;">6</span>
<span style="color: #7a0874; font-weight: bold;">test</span> <span style="color: #000000;">7</span></pre></div></div>
<p><strong>Avec <a href="http://fr.wikipedia.org/wiki/Awk">awk</a> :</strong></p>
<div class="wp_syntax"><div class="code"><pre class="bash" style="font-family:monospace;"><span style="color: #7a0874; font-weight: bold;">&#91;</span>root<span style="color: #000000; font-weight: bold;">@</span>pc-linux<span style="color: #7a0874; font-weight: bold;">&#93;</span><span style="color: #666666; font-style: italic;"># awk NF test.txt</span>
<span style="color: #7a0874; font-weight: bold;">test</span> <span style="color: #000000;">1</span>
<span style="color: #7a0874; font-weight: bold;">test</span> <span style="color: #000000;">2</span>
<span style="color: #7a0874; font-weight: bold;">test</span> <span style="color: #000000;">3</span>
<span style="color: #7a0874; font-weight: bold;">test</span> <span style="color: #000000;">4</span>
<span style="color: #7a0874; font-weight: bold;">test</span> <span style="color: #000000;">5</span>
<span style="color: #7a0874; font-weight: bold;">test</span> <span style="color: #000000;">6</span>
<span style="color: #7a0874; font-weight: bold;">test</span> <span style="color: #000000;">7</span></pre></div></div>
<p>Variante :</p>
<div class="wp_syntax"><div class="code"><pre class="bash" style="font-family:monospace;"><span style="color: #7a0874; font-weight: bold;">&#91;</span>root<span style="color: #000000; font-weight: bold;">@</span>pc-linux<span style="color: #7a0874; font-weight: bold;">&#93;</span><span style="color: #666666; font-style: italic;"># awk '/./' test.txt</span>
<span style="color: #7a0874; font-weight: bold;">test</span> <span style="color: #000000;">1</span>
<span style="color: #7a0874; font-weight: bold;">test</span> <span style="color: #000000;">2</span>
<span style="color: #7a0874; font-weight: bold;">test</span> <span style="color: #000000;">3</span>
<span style="color: #7a0874; font-weight: bold;">test</span> <span style="color: #000000;">4</span>
<span style="color: #7a0874; font-weight: bold;">test</span> <span style="color: #000000;">5</span>
<span style="color: #7a0874; font-weight: bold;">test</span> <span style="color: #000000;">6</span>
<span style="color: #7a0874; font-weight: bold;">test</span> <span style="color: #000000;">7</span></pre></div></div>
<p><strong>Sans awk ni sed :</strong></p>
<div class="wp_syntax"><div class="code"><pre class="bash" style="font-family:monospace;"><span style="color: #7a0874; font-weight: bold;">&#91;</span>root<span style="color: #000000; font-weight: bold;">@</span>pc-linux<span style="color: #7a0874; font-weight: bold;">&#93;</span><span style="color: #666666; font-style: italic;"># cat test.txt | grep '.'</span>
<span style="color: #7a0874; font-weight: bold;">test</span> <span style="color: #000000;">1</span>
<span style="color: #7a0874; font-weight: bold;">test</span> <span style="color: #000000;">2</span>
<span style="color: #7a0874; font-weight: bold;">test</span> <span style="color: #000000;">3</span>
<span style="color: #7a0874; font-weight: bold;">test</span> <span style="color: #000000;">4</span>
<span style="color: #7a0874; font-weight: bold;">test</span> <span style="color: #000000;">5</span>
<span style="color: #7a0874; font-weight: bold;">test</span> <span style="color: #000000;">6</span>
<span style="color: #7a0874; font-weight: bold;">test</span> <span style="color: #000000;">7</span></pre></div></div>
<p>Variante :</p>
<div class="wp_syntax"><div class="code"><pre class="bash" style="font-family:monospace;"><span style="color: #7a0874; font-weight: bold;">&#91;</span>root<span style="color: #000000; font-weight: bold;">@</span>pc-linux<span style="color: #7a0874; font-weight: bold;">&#93;</span><span style="color: #666666; font-style: italic;"># cat test.txt | grep -v '^$'</span>
<span style="color: #7a0874; font-weight: bold;">test</span> <span style="color: #000000;">1</span>
<span style="color: #7a0874; font-weight: bold;">test</span> <span style="color: #000000;">2</span>
<span style="color: #7a0874; font-weight: bold;">test</span> <span style="color: #000000;">3</span>
<span style="color: #7a0874; font-weight: bold;">test</span> <span style="color: #000000;">4</span>
<span style="color: #7a0874; font-weight: bold;">test</span> <span style="color: #000000;">5</span>
<span style="color: #7a0874; font-weight: bold;">test</span> <span style="color: #000000;">6</span>
<span style="color: #7a0874; font-weight: bold;">test</span> <span style="color: #000000;">7</span></pre></div></div>
]]></content:encoded>
			<wfw:commentRss>http://blog.nicolas.pawlak.fr/2010/06/13/retirer-les-lignes-vides-dun-fichier-sous-linux/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Cacher un utilisateur dans la fenêtre de connexion GNOME</title>
		<link>http://blog.nicolas.pawlak.fr/2010/06/01/cacher-un-utilisateur-dans-la-fenetre-de-connexion-gnome/</link>
		<comments>http://blog.nicolas.pawlak.fr/2010/06/01/cacher-un-utilisateur-dans-la-fenetre-de-connexion-gnome/#comments</comments>
		<pubDate>Tue, 01 Jun 2010 08:30:17 +0000</pubDate>
		<dc:creator>Nicolas</dc:creator>
				<category><![CDATA[Linux]]></category>
		<category><![CDATA[cacher]]></category>
		<category><![CDATA[connexion]]></category>
		<category><![CDATA[custom]]></category>
		<category><![CDATA[exclude]]></category>
		<category><![CDATA[gdm]]></category>
		<category><![CDATA[gnome]]></category>
		<category><![CDATA[greeter]]></category>
		<category><![CDATA[schemas]]></category>
		<category><![CDATA[uid]]></category>
		<category><![CDATA[utilisateur]]></category>
		<guid isPermaLink="false">http://blog.nicolas.pawlak.fr/?p=943</guid>
		<description><![CDATA[Aussi curieux que cela puisse paraître, il n&#8217;y a pas de solution graphique utilisable pour cacher un utilisateur dans la fenêtre de connexion GNOME. Imaginons que nous voulions cacher le compte &#171;&#160;toto&#160;&#187;. Dans le fichier /etc/gdm/gdm.schemas, repérez les lignes suivantes : &#60;schema&#62; &#60;key&#62;greeter/Exclude&#60;/key&#62; &#60;signature&#62;s&#60;/signature&#62; &#60;default&#62;bin,root,daemon,adm,lp,sync,shutdown,halt,mail,news,uucp&#60;/default&#62; &#60;/schema&#62; Ajoutez &#171;&#160;toto&#160;&#187; à la liste existante : &#60;schema&#62; &#60;key&#62;greeter/Exclude&#60;/key&#62; [...]]]></description>
			<content:encoded><![CDATA[<p>Aussi curieux que cela puisse paraître, il n&#8217;y a pas de solution graphique utilisable pour cacher un utilisateur dans la fenêtre de connexion <a href="http://fr.wikipedia.org/wiki/GNOME">GNOME</a>.</p>
<p>Imaginons que nous voulions cacher le compte &laquo;&nbsp;toto&nbsp;&raquo;. Dans le fichier <strong>/etc/gdm/gdm.schemas</strong>, repérez les lignes suivantes :</p>
<div class="wp_syntax"><div class="code"><pre class="text" style="font-family:monospace;">&lt;schema&gt;
  &lt;key&gt;greeter/Exclude&lt;/key&gt;
  &lt;signature&gt;s&lt;/signature&gt;
  &lt;default&gt;bin,root,daemon,adm,lp,sync,shutdown,halt,mail,news,uucp&lt;/default&gt;
&lt;/schema&gt;</pre></div></div>
<p>Ajoutez &laquo;&nbsp;toto&nbsp;&raquo; à la liste existante :</p>
<div class="wp_syntax"><div class="code"><pre class="text" style="font-family:monospace;">&lt;schema&gt;
  &lt;key&gt;greeter/Exclude&lt;/key&gt;
  &lt;signature&gt;s&lt;/signature&gt;
  &lt;default&gt;toto,bin,root,daemon,adm,lp,sync,shutdown,halt,mail,news,uucp&lt;/default&gt;
&lt;/schema&gt;</pre></div></div>
<p>Au redémarrage de GDM, toto n&#8217;apparaîtra plus dans la liste des utilisateurs.</p>
<p><em>Pour des raisons de lisibilité, la liste des utilisateurs entre les balises a été tronquée.</em></p>
]]></content:encoded>
			<wfw:commentRss>http://blog.nicolas.pawlak.fr/2010/06/01/cacher-un-utilisateur-dans-la-fenetre-de-connexion-gnome/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
	</channel>
</rss>
