<?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>Everlinux's Blog &#187; Linux</title>
	<atom:link href="http://everlinux.com/blog/category/linux/feed" rel="self" type="application/rss+xml" />
	<link>http://everlinux.com/blog</link>
	<description>Sempre vivendo, aprendendo e blogando... :)</description>
	<lastBuildDate>Fri, 30 Jul 2010 18:13:16 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.0</generator>
		<item>
		<title>Porque hoje é Sexta #36</title>
		<link>http://everlinux.com/blog/2010/04/23/porque-hoje-e-sexta-36</link>
		<comments>http://everlinux.com/blog/2010/04/23/porque-hoje-e-sexta-36#comments</comments>
		<pubDate>Fri, 23 Apr 2010 11:53:37 +0000</pubDate>
		<dc:creator>leandro298</dc:creator>
				<category><![CDATA[Linux]]></category>

		<guid isPermaLink="false">http://everlinux.com/blog/?p=1131</guid>
		<description><![CDATA[Qualquer idiota é capaz de pintar um quadro; somente um gênio é capaz de vendê-lo.]]></description>
			<content:encoded><![CDATA[<p>Qualquer idiota é capaz de pintar um quadro; somente um gênio é capaz de vendê-lo.</p>
<p style="text-align: center;">
<p><a title="Porque hoje é sexta" rel="lightbox[sexta]" href="http://everlinux.com/sexta/six10/10100.jpg"><img src="http://everlinux.com/sexta/six10/10100.jpg" alt="Porque hoje é sexta" /></a></p>
<p><a title="Porque hoje é sexta" rel="lightbox[sexta]" href="http://everlinux.com/sexta/six10/10101.jpg"><img src="http://everlinux.com/images/avatar_tux/nemo.png" alt="Porque hoje é sexta" width="80" height="87" /></a></p>
<p><a title="Porque hoje é sexta" rel="lightbox[sexta]" href="http://everlinux.com/sexta/six10/10102.jpg"><img src="http://everlinux.com/images/avatar_tux/pooh1.png" alt="Porque hoje é sexta" width="80" height="87" /></a></p>
<p><a title="Porque hoje é sexta" rel="lightbox[sexta]" href="http://everlinux.com/sexta/six10/10103.jpg"><img src="http://everlinux.com/images/avatar_tux/perna.png" alt="Porque hoje é sexta" width="80" height="87" /></a></p>
<p><a title="Porque hoje é sexta" rel="lightbox[sexta]" href="http://everlinux.com/sexta/six10/10104.jpg"><img src="http://everlinux.com/images/avatar_tux/shreck.png" alt="Porque hoje é sexta" width="80" height="87" /></a></p>
<p><a title="Porque hoje é sexta" rel="lightbox[sexta]" href="http://everlinux.com/sexta/six10/10105.jpg"><img src="http://everlinux.com/images/avatar_tux/bandicoot.png" alt="Porque hoje é sexta" width="80" height="87" /></a></p>
<p><a title="Porque hoje é sexta" rel="lightbox[sexta]" href="http://everlinux.com/sexta/six10/10106.jpg"><img src="http://everlinux.com/images/avatar_tux/monster_sa.png" alt="Porque hoje é sexta" width="80" height="87" /></a></p>
]]></content:encoded>
			<wfw:commentRss>http://everlinux.com/blog/2010/04/23/porque-hoje-e-sexta-36/feed</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Como autenticar serviços no LDAP da MS (Active Directory)</title>
		<link>http://everlinux.com/blog/2010/04/13/como-autenticar-servicos-no-ldap-da-ms-active-directory</link>
		<comments>http://everlinux.com/blog/2010/04/13/como-autenticar-servicos-no-ldap-da-ms-active-directory#comments</comments>
		<pubDate>Tue, 13 Apr 2010 14:07:22 +0000</pubDate>
		<dc:creator>Tiago Cruz</dc:creator>
				<category><![CDATA[Dicas]]></category>
		<category><![CDATA[LDAP]]></category>
		<category><![CDATA[Linux]]></category>
		<category><![CDATA[Segurança]]></category>
		<category><![CDATA[Squid]]></category>
		<category><![CDATA[Ubuntu]]></category>
		<category><![CDATA[AD]]></category>
		<category><![CDATA[Apache]]></category>

		<guid isPermaLink="false">http://everlinux.com/blog/?p=1117</guid>
		<description><![CDATA[Imagine o seguinte cenário: Empresa de pequeno porte, com um AD instalado às pressas sem muitos cuidados e um servidor Linux lá no meio servindo de proxy. Se você tiver vontade de autenticar os serviços no AD, aqui vão alguns exemplos práticos e rápidos. Tome como base um Windows 2003, com o domínio chamado &#8220;EverLinux&#8221; [...]]]></description>
			<content:encoded><![CDATA[<p>Imagine o seguinte cenário: Empresa de pequeno porte, com um AD instalado às pressas sem muitos cuidados e um servidor Linux lá no meio servindo de proxy. Se você tiver vontade de autenticar os serviços no AD, aqui vão alguns exemplos práticos e rápidos.</p>
<p>Tome como base um Windows 2003, com o domínio chamado &#8220;EverLinux&#8221; e um usuário rosca lá chamado &#8220;tcruz&#8221; somente para fazer as buscas no diretório da Microsoft. O Linux seria um Ubuntu ou Debian da vida.</p>
<p><strong>Autenticando o Apache no AD</strong></p>

<div class="wp_syntax"><div class="code"><pre class="bash" style="font-family:monospace;"><span style="color: #7a0874; font-weight: bold;">cd</span> <span style="color: #000000; font-weight: bold;">/</span>etc<span style="color: #000000; font-weight: bold;">/</span>apache2<span style="color: #000000; font-weight: bold;">/</span>mods-enabled
<span style="color: #c20cb9; font-weight: bold;">ln</span> <span style="color: #660033;">-s</span> ..<span style="color: #000000; font-weight: bold;">/</span>mods-available<span style="color: #000000; font-weight: bold;">/</span>ldap.load .
<span style="color: #c20cb9; font-weight: bold;">ln</span> <span style="color: #660033;">-s</span> ..<span style="color: #000000; font-weight: bold;">/</span>mods-available<span style="color: #000000; font-weight: bold;">/</span>authnz_ldap.load .
&nbsp;
<span style="color: #000000; font-weight: bold;">&lt;</span>Directory <span style="color: #ff0000;">&quot;/var/www/protegido&quot;</span><span style="color: #000000; font-weight: bold;">&gt;</span>
        AuthBasicProvider ldap
        AuthzLDAPAuthoritative off
        AuthName <span style="color: #ff0000;">&quot;Entre com a senha do AD&quot;</span>
        AuthType Basic
        AuthLDAPBindDN tcruz<span style="color: #000000; font-weight: bold;">@</span>everlinux
        AuthLDAPBindPassword senha_do_tcruz
        AuthLDAPURL ldap:<span style="color: #000000; font-weight: bold;">//</span>10.10.20.20:<span style="color: #000000;">3268</span><span style="color: #000000; font-weight: bold;">/</span><span style="color: #007800;">cn</span>=<span style="color: #c20cb9; font-weight: bold;">users</span>,<span style="color: #007800;"><span style="color: #c20cb9; font-weight: bold;">dc</span></span>=everlinux?sAMAccountName?one
        require user tcruz cmangini
        Allow from all
<span style="color: #000000; font-weight: bold;">&lt;/</span>Directory<span style="color: #000000; font-weight: bold;">&gt;</span></pre></div></div>

<p><strong>Autenticando o Squid no AD</strong></p>

<div class="wp_syntax"><div class="code"><pre class="bash" style="font-family:monospace;">...
acl bloqueados dstdom_regex <span style="color: #660033;">-i</span> <span style="color: #ff0000;">&quot;/etc/squid/block.txt&quot;</span>
http_access deny bloqueados
&nbsp;
auth_param basic program <span style="color: #000000; font-weight: bold;">/</span>usr<span style="color: #000000; font-weight: bold;">/</span>lib<span style="color: #000000; font-weight: bold;">/</span>squid<span style="color: #000000; font-weight: bold;">/</span>ldap_auth <span style="color: #660033;">-R</span> <span style="color: #660033;">-b</span> <span style="color: #ff0000;">&quot;dc=everlinux&quot;</span> <span style="color: #660033;">-D</span> \
<span style="color: #ff0000;">&quot;cn=tiago cruz,cn=users,dc=everlinux&quot;</span> <span style="color: #660033;">-w</span> <span style="color: #ff0000;">&quot;senha_tcruz&quot;</span> <span style="color: #660033;">-f</span> <span style="color: #007800;">sAMAccountName</span>=<span style="color: #000000; font-weight: bold;">%</span>s <span style="color: #660033;">-h</span> 10.10.20.20
auth_param basic children <span style="color: #000000;">5</span>
auth_param basic realm Autenticacao
auth_param basic credentialsttl <span style="color: #000000;">5</span> minutes
acl ldapauth proxy_auth REQUIRED
http_access allow ldapauth
...</pre></div></div>

<p><strong>Autenticando algo em PHP no AD</strong></p>
<p>O exemplo será o software <a href="http://www.oneorzero.com">OneOrZero</a> utilizado Help Desk:</p>

<div class="wp_syntax"><div class="code"><pre class="bash" style="font-family:monospace;"><span style="color: #666666; font-style: italic;"># apt-get install php5-ldap</span>
&nbsp;
<span style="color: #c20cb9; font-weight: bold;">cat</span> <span style="color: #000000; font-weight: bold;">/</span>var<span style="color: #000000; font-weight: bold;">/</span>www<span style="color: #000000; font-weight: bold;">/</span>helpdesk<span style="color: #000000; font-weight: bold;">/</span>configuration<span style="color: #000000; font-weight: bold;">/</span>website_settings.php
auth_method = <span style="color: #ff0000;">&quot;AD&quot;</span>
ldap_host = <span style="color: #ff0000;">&quot;10.10.20.20&quot;</span>
ldap_domain = <span style="color: #ff0000;">&quot;everlinux&quot;</span>
ldap_binddn = <span style="color: #ff0000;">&quot;CN=Tiago Cruz,CN=Users,DC=everlinux&quot;</span>
ldap_bindpwd = <span style="color: #ff0000;">&quot;senha_tcruz&quot;</span>
ldap_rootdn = <span style="color: #ff0000;">&quot;CN=Users,DC=everlinux&quot;</span>
ldap_searchattr = <span style="color: #ff0000;">&quot;sAMAccountName&quot;</span>
ldap_fname = <span style="color: #ff0000;">&quot;givenname&quot;</span>
ldap_lname = <span style="color: #ff0000;">&quot;sn&quot;</span>
ldap_uname = <span style="color: #ff0000;">&quot;samaccountname&quot;</span>
ldap_email_add = <span style="color: #ff0000;">&quot;mail&quot;</span>
ldap_office = <span style="color: #ff0000;">&quot;physicaldeliveryofficename&quot;</span>
ldap_phone = <span style="color: #ff0000;">&quot;telephonenumber&quot;</span>
ldap_context = <span style="color: #ff0000;">&quot;sAMAccountName&quot;</span></pre></div></div>

<p><strong>Fazendo uma busca manualmente no diretório</strong></p>

<div class="wp_syntax"><div class="code"><pre class="bash" style="font-family:monospace;"><span style="color: #666666; font-style: italic;"># ldapsearch -LLL -h 10.10.20.20 -P 3 -x -D &quot;cn=tiago cruz,cn=users,dc=everlinux&quot; -W \</span>
<span style="color: #660033;">-b</span> <span style="color: #ff0000;">&quot;cn=users,dc=everlinux&quot;</span>  <span style="color: #ff0000;">&quot;(&amp;(&amp;(objectClass=user)(objectCategory=person)) <span style="color: #000099; font-weight: bold;">\
</span>(sAMAccountName=tcruz))&quot;</span> 
Enter LDAP Password: 
dn: <span style="color: #007800;">CN</span>=Tiago Cruz,<span style="color: #007800;">CN</span>=Users,<span style="color: #007800;">DC</span>=everlinux
objectClass: top
objectClass: person
objectClass: organizationalPerson
objectClass: user
cn: Tiago Cruz
sn: Cruz
physicalDeliveryOfficeName: EverLinuxs Office
telephoneNumber: <span style="color: #000000;">1234</span>-<span style="color: #000000;">4321</span>
givenName: Tiago
initials: ti
distinguishedName: <span style="color: #007800;">CN</span>=Tiago Cruz,<span style="color: #007800;">CN</span>=Users,<span style="color: #007800;">DC</span>=everlinux
instanceType: <span style="color: #000000;">4</span>
whenCreated: 20090427110042.0Z
whenChanged: 20100406221357.0Z
displayName: Tiago Cruz
uSNCreated: <span style="color: #000000;">555987</span>
memberOf:: <span style="color: #007800;">Q049QWRtaW5zLiBkbyBkb23DrW5pbyxDTj1Vc2VycyxEQz1kb21pbmlvMjAwNw</span>==
memberOf: <span style="color: #007800;">CN</span>=Administradores,<span style="color: #007800;">CN</span>=Builtin,<span style="color: #007800;">DC</span>=everlinux
uSNChanged: <span style="color: #000000;">2331137</span>
name: Tiago Cruz
objectGUID:: <span style="color: #000000;">39</span><span style="color: #007800;">teBl62JUWwzZz36nNICw</span>==
userAccountControl: <span style="color: #000000;">66048</span>
badPwdCount: <span style="color: #000000;">0</span>
codePage: <span style="color: #000000;">0</span>
countryCode: <span style="color: #000000;">0</span>
badPasswordTime: <span style="color: #000000;">129150648344589017</span>
lastLogoff: <span style="color: #000000;">0</span>
lastLogon: <span style="color: #000000;">129150648382871002</span>
pwdLastSet: <span style="color: #000000;">128853036428004858</span>
primaryGroupID: <span style="color: #000000;">513</span>
objectSid:: AQUAAAAAAAUVAAAAR0LCqonS5XyzPF2T+<span style="color: #007800;">AQAAA</span>==
adminCount: <span style="color: #000000;">1</span>
accountExpires: <span style="color: #000000;">9223372036854775807</span>
logonCount: <span style="color: #000000;">0</span>
sAMAccountName: tcruz
sAMAccountType: <span style="color: #000000;">80530263368</span>
userPrincipalName: tcruz<span style="color: #000000; font-weight: bold;">@</span>everlinux
objectCategory: <span style="color: #007800;">CN</span>=Person,<span style="color: #007800;">CN</span>=Schema,<span style="color: #007800;">CN</span>=Configuration,<span style="color: #007800;">DC</span>=everlinux
mail: tiagocruz AT everlinux.com</pre></div></div>

<p>Espero que com estas dicas fique mais fácil para você centralizar a autenticação de seus serviços, caso seja necessário integrar com um LDAP proprietário.</p>
]]></content:encoded>
			<wfw:commentRss>http://everlinux.com/blog/2010/04/13/como-autenticar-servicos-no-ldap-da-ms-active-directory/feed</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
		<item>
		<title>Balanceamento de carga com Apache e Nginx</title>
		<link>http://everlinux.com/blog/2010/01/19/balanceamento-de-carga-com-apache-e-nginx</link>
		<comments>http://everlinux.com/blog/2010/01/19/balanceamento-de-carga-com-apache-e-nginx#comments</comments>
		<pubDate>Tue, 19 Jan 2010 17:00:29 +0000</pubDate>
		<dc:creator>Tiago Cruz</dc:creator>
				<category><![CDATA[Cluster]]></category>
		<category><![CDATA[Dicas]]></category>
		<category><![CDATA[High Availability]]></category>
		<category><![CDATA[Linux]]></category>
		<category><![CDATA[Nerd]]></category>

		<guid isPermaLink="false">http://everlinux.com/blog/?p=1026</guid>
		<description><![CDATA[Se você precisa balancear a carga em seu webserver e não tem (ou não pode usar) um hardware dedicado para isso, segue alguns exemplos práticos: Apache httpd: NameVirtualhost *:80 &#60;VirtualHost *:80&#62; ServerName everlinux-homolog.com ServerAlias 200.24.12.34 10.10.23.53 10.10.23.56 ServerAdmin suporte@everlinux.com ErrorLog &#34;&#124;/usr/sbin/rotatelogs /var/log/httpd/error_log.%Y%m%d 86400 -180&#34; CustomLog &#34;&#124;/usr/sbin/rotatelogs /var/log/httpd/access_log.%Y%m%d 86400 -180&#34; combined &#160; &#60;Proxy balancer://everhttp&#62; BalancerMember http://10.10.23.53:80/ [...]]]></description>
			<content:encoded><![CDATA[<p>Se você precisa balancear a carga em seu webserver e não tem (ou não pode usar) um hardware dedicado para isso, segue alguns exemplos práticos:</p>
<p><strong>Apache httpd:</strong></p>

<div class="wp_syntax"><div class="code"><pre class="bash" style="font-family:monospace;">NameVirtualhost <span style="color: #000000; font-weight: bold;">*</span>:<span style="color: #000000;">80</span>
<span style="color: #000000; font-weight: bold;">&lt;</span>VirtualHost <span style="color: #000000; font-weight: bold;">*</span>:<span style="color: #000000;">80</span><span style="color: #000000; font-weight: bold;">&gt;</span>
    ServerName everlinux-homolog.com
    ServerAlias 200.24.12.34 10.10.23.53 10.10.23.56
    ServerAdmin suporte<span style="color: #000000; font-weight: bold;">@</span>everlinux.com
    ErrorLog <span style="color: #ff0000;">&quot;|/usr/sbin/rotatelogs /var/log/httpd/error_log.%Y%m%d 86400 -180&quot;</span>
    CustomLog <span style="color: #ff0000;">&quot;|/usr/sbin/rotatelogs /var/log/httpd/access_log.%Y%m%d 86400 -180&quot;</span> combined
&nbsp;
        <span style="color: #000000; font-weight: bold;">&lt;</span>Proxy balancer:<span style="color: #000000; font-weight: bold;">//</span>everhttp<span style="color: #000000; font-weight: bold;">&gt;</span>
          BalancerMember http:<span style="color: #000000; font-weight: bold;">//</span>10.10.23.53:<span style="color: #000000;">80</span><span style="color: #000000; font-weight: bold;">/</span> <span style="color: #007800;"><span style="color: #c20cb9; font-weight: bold;">ping</span></span>=<span style="color: #000000;">10</span>
          BalancerMember http:<span style="color: #000000; font-weight: bold;">//</span>10.10.23.56:<span style="color: #000000;">80</span><span style="color: #000000; font-weight: bold;">/</span> <span style="color: #007800;"><span style="color: #c20cb9; font-weight: bold;">ping</span></span>=<span style="color: #000000;">10</span>
        <span style="color: #000000; font-weight: bold;">&lt;/</span>Proxy<span style="color: #000000; font-weight: bold;">&gt;</span>
&nbsp;
ProxyPreserveHost on
ProxyPass <span style="color: #000000; font-weight: bold;">/</span> balancer:<span style="color: #000000; font-weight: bold;">//</span>everhttp<span style="color: #000000; font-weight: bold;">/</span>
ProxyPassReverse <span style="color: #000000; font-weight: bold;">/</span>oii balancer:<span style="color: #000000; font-weight: bold;">//</span>everhttp<span style="color: #000000; font-weight: bold;">/</span>
&nbsp;
<span style="color: #000000; font-weight: bold;">&lt;/</span>VirtualHost<span style="color: #000000; font-weight: bold;">&gt;</span></pre></div></div>

<p><strong>Nginx</strong></p>

<div class="wp_syntax"><div class="code"><pre class="bash" style="font-family:monospace;">http <span style="color: #7a0874; font-weight: bold;">&#123;</span>
    include       mime.types;
    default_type  application<span style="color: #000000; font-weight: bold;">/</span>octet-stream;
    sendfile        on;
    keepalive_timeout  <span style="color: #000000;">50</span>;
&nbsp;
      upstream everbalance <span style="color: #7a0874; font-weight: bold;">&#123;</span>
         ip_hash;
         server 10.10.23.53 <span style="color: #007800;">max_fails</span>=<span style="color: #000000;">3</span> <span style="color: #007800;">fail_timeout</span>=30s;
         server 10.10.23.56 <span style="color: #007800;">max_fails</span>=<span style="color: #000000;">3</span> <span style="color: #007800;">fail_timeout</span>=30s;
         <span style="color: #7a0874; font-weight: bold;">&#125;</span>
&nbsp;
    server <span style="color: #7a0874; font-weight: bold;">&#123;</span>
         listen  202.34.52.24:<span style="color: #000000;">80</span>;
         server_name  everlinux-homolog.com;
         location <span style="color: #000000; font-weight: bold;">/</span>
           <span style="color: #7a0874; font-weight: bold;">&#123;</span>
            access_log   <span style="color: #000000; font-weight: bold;">/</span>var<span style="color: #000000; font-weight: bold;">/</span>log<span style="color: #000000; font-weight: bold;">/</span>nginx<span style="color: #000000; font-weight: bold;">/</span>hdig.log;
            proxy_pass   http:<span style="color: #000000; font-weight: bold;">//</span>everbalance;
            proxy_set_header Host <span style="color: #007800;">$host</span>;
           <span style="color: #7a0874; font-weight: bold;">&#125;</span>
         <span style="color: #7a0874; font-weight: bold;">&#125;</span>
<span style="color: #7a0874; font-weight: bold;">&#125;</span></pre></div></div>

<p>As linhas &#8220;ProxyPreserveHost on&#8221; (apache) e &#8220;proxy_set_header Host $host;&#8221; (nginx) são importantes caso sua aplicação trabalhe com o nome do domínio da URL para montar alguma coisa dinamicamente. Conteúdo estático geralmente não é necessário estas variáveis.</p>
]]></content:encoded>
			<wfw:commentRss>http://everlinux.com/blog/2010/01/19/balanceamento-de-carga-com-apache-e-nginx/feed</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Interação Social&#8230;&#8230;</title>
		<link>http://everlinux.com/blog/2010/01/13/interacao-social</link>
		<comments>http://everlinux.com/blog/2010/01/13/interacao-social#comments</comments>
		<pubDate>Wed, 13 Jan 2010 19:05:13 +0000</pubDate>
		<dc:creator>Carlos Mangini</dc:creator>
				<category><![CDATA[Linux]]></category>

		<guid isPermaLink="false">http://everlinux.com/blog/2010/01/13/interacao-social</guid>
		<description><![CDATA[Ouvindo muitos &#8220;Jackson Five &#8211; Motoboy&#8221;, acabei juntando algumas rimas encontradas na InterNet e usadas por ele. Segue um link do histórias do malandro e sua magrela Lady Laura (motocicleta). Suave na nave De boa na lagoa (canoa) Tranquilo no quilo (como um grilo) As pampa na rampa Firmão no galpão (busao, macarrao) De leve [...]]]></description>
			<content:encoded><![CDATA[<p>Ouvindo muitos &#8220;Jackson Five &#8211; Motoboy&#8221;, acabei juntando algumas rimas encontradas na InterNet e usadas por ele.<br />
Segue um link do histórias do malandro e sua magrela Lady Laura (motocicleta).</p>
<p><a href="http://everlinux.com/blog/2010/01/13/interacao-social"><em>Click here to view the embedded video.</em></a></p>
<p>Suave na nave<br />
De boa na lagoa (canoa)<br />
Tranquilo no quilo (como um grilo)<br />
As pampa na rampa<br />
Firmão no galpão (busao, macarrao)<br />
De leve na neve<br />
Beleza na mesa<br />
Irado no gado<br />
Na moral no matagal<br />
Legal no bananal<br />
Firmose na apoteose<br />
Sem drama na cama<br />
Firmeza na represa<br />
Sossegado no mercado<br />
Tudo em cima na piscina<br />
Tudo certo no deserto<br />
Relax no durex<br />
Joia na Jibóia<br />
Realiza na briza<br />
Sussa na montanha russa<br />
Relaxa na bolaxa (ou graxa)<br />
Se pá no maracujá<br />
Joinha na prainha<br />
Estranho como um ranho<br />
Se orienta na polenta<br />
Light na night<br />
Tudo em cima na piscina<br />
Bem no armazém<br />
Manero no putero<br />
Demoreba na budega<br />
De boresta na palestra<br />
A brisa no para-brisa<br />
Nice on the ice<br />
sussegado no marcado<br />
tranquilo no asilo<br />
ja é no jacaré<br />
firmão no busão<br />
suavão no camburão<br />
seguro no muro<br />
tudo em cima na piscina<br />
conosco não há enrosco<br />
comigo não tem perigo<br />
é quente no dente<br />
legal no pedal<br />
relachado no machado<br />
de onda na Honda<br />
se toca na tapioca<br />
no grau do bacalhau<br />
de bobeira na ladeira<br />
Stayle no baile</p>
<p>Éh nóis queiróiz!   8p</p>
]]></content:encoded>
			<wfw:commentRss>http://everlinux.com/blog/2010/01/13/interacao-social/feed</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Retoque Digital</title>
		<link>http://everlinux.com/blog/2009/09/27/retoque-digital</link>
		<comments>http://everlinux.com/blog/2009/09/27/retoque-digital#comments</comments>
		<pubDate>Mon, 28 Sep 2009 01:46:16 +0000</pubDate>
		<dc:creator>leandro298</dc:creator>
				<category><![CDATA[Dicas]]></category>
		<category><![CDATA[Diversão]]></category>
		<category><![CDATA[Linux]]></category>

		<guid isPermaLink="false">http://everlinux.com/blog/?p=812</guid>
		<description><![CDATA[Calma pessoal, hoje ainda não é sexta! Então não se empolgem. Há uns dias atrás fiz um post falando sobre o GIMP, que é junto com Photoshop um das poderosas ferramentas de editorações e retoques em imagens. Então clique na imagem abaixo e veja alguns milagres feitos por essas ferramentas. [ 1 ] [ 2 [...]]]></description>
			<content:encoded><![CDATA[<p>Calma pessoal, hoje ainda não é sexta! Então não se empolgem.<br />
Há uns dias atrás fiz um post falando sobre o <a href="http://everlinux.com/blog/2009/09/14/the-gimp-gnu-image-manipulation-program">GIMP</a>, que é junto com Photoshop um das poderosas ferramentas de editorações e retoques em imagens.<br />
Então clique na imagem abaixo e veja alguns milagres feitos por essas ferramentas.</p>
<p style="text-align: center;"><a title="Retoque Digital" rel="lightbox[retoque]" href="http://everlinux.com/sexta/retoque0.jpg"><img src="http://everlinux.com/sexta/retoque0.jpg" alt="Retoque Digital" /></a></p>
<p><a title="Retoque Digital" rel="lightbox[retoque]" href="http://everlinux.com/sexta/retoque1.jpg">[ 1 ] </a><br />
<a title="Retoque Digital" rel="lightbox[retoque]" href="http://everlinux.com/sexta/retoque2.jpg">[ 2 ] </a><br />
<a title="Retoque Digital" rel="lightbox[retoque]" href="http://everlinux.com/sexta/retoque3.jpg">[ 3 ] </a><br />
<a title="Retoque Digital" rel="lightbox[retoque]" href="http://everlinux.com/sexta/retoque4.jpg">[ 4 ] </a><br />
<a title="Retoque Digital" rel="lightbox[retoque]" href="http://everlinux.com/sexta/retoque5.jpg">[ 5 ] </a></p>
]]></content:encoded>
			<wfw:commentRss>http://everlinux.com/blog/2009/09/27/retoque-digital/feed</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>The GIMP (GNU Image Manipulation Program)</title>
		<link>http://everlinux.com/blog/2009/09/14/the-gimp-gnu-image-manipulation-program</link>
		<comments>http://everlinux.com/blog/2009/09/14/the-gimp-gnu-image-manipulation-program#comments</comments>
		<pubDate>Mon, 14 Sep 2009 20:18:09 +0000</pubDate>
		<dc:creator>leandro298</dc:creator>
				<category><![CDATA[Linux]]></category>
		<category><![CDATA[Dicas]]></category>

		<guid isPermaLink="false">http://everlinux.com/blog/?p=782</guid>
		<description><![CDATA[É um software de distribuição gratuita capaz de realizar composição e criação de imagem, retoques em fotos, entre muitas outras coisas. Ele é bastante utilizado por profissionais para manipular e melhorar a qualidade fotos e ou para a realização de projetos gráficos. Sendo assim uma alternativa livre ao Photoshop da Adobe. Nasceu como um projeto [...]]]></description>
			<content:encoded><![CDATA[<p>É um software de distribuição gratuita capaz de realizar composição e criação de imagem, retoques em fotos, entre muitas outras coisas.</p>
<p>Ele é bastante utilizado por profissionais para manipular e melhorar a qualidade fotos e ou para a realização de projetos gráficos. Sendo assim uma alternativa livre ao Photoshop da Adobe.</p>
<p>Nasceu como um projeto universitário em 1995 por Spencer Kimball e Peter Mattis é hoje mantido por um grupo de voluntários.</p>
<p>Site oficial: <a title="Gimp" href="http://www.gimp.org/">Gimp</a></p>
<p>Download [linux]: <a href="ftp://ftp.gimp.org/pub/gimp/v2.6/gimp-2.6.7.tar.bz2" target="_blank">The Gimp 2.6.7</a> [15.58MB]</p>
<p>Download [win]: <a href="http://freefr.dl.sourceforge.net/project/portableapps/GIMP%20Portable/GIMP%20Portable%202.6.7%20Rev%203/GIMPPortable_2.6.7_Rev_3.paf.exe" target="_blank">The Gimp 2.6.7 Portable Rev 3</a> [16.73MB]</p>
<p>Download [win]: <a href="http://downloads.sourceforge.net/gimp-win/gimp-2.6.7-i686-setup.exe?use_mirror=" target="_blank">The GIMP 2.6.7</a> [16.08MB]</p>
<p>Download [win]: <a href="http://downloads.sourceforge.net/gimp-win/gimp-2.7.0-i686-setup.exe?use_mirror=" target="_blank">The GIMP 2.7.0 Beta</a> [15.04MB]</p>
<p><img class="size-full wp-image-783 alignnone" title="gimps" src="http://everlinux.com/blog/wp-content/uploads/2009/09/gimps.jpg" alt="gimps" width="500" height="200" /></p>
]]></content:encoded>
			<wfw:commentRss>http://everlinux.com/blog/2009/09/14/the-gimp-gnu-image-manipulation-program/feed</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
		<item>
		<title>A Little Linux Story</title>
		<link>http://everlinux.com/blog/2009/08/25/a-little-linux-story</link>
		<comments>http://everlinux.com/blog/2009/08/25/a-little-linux-story#comments</comments>
		<pubDate>Tue, 25 Aug 2009 05:08:41 +0000</pubDate>
		<dc:creator>leandro298</dc:creator>
				<category><![CDATA[Humor]]></category>
		<category><![CDATA[Linux]]></category>
		<category><![CDATA[Diversão]]></category>
		<category><![CDATA[Nerd]]></category>

		<guid isPermaLink="false">http://everlinux.com/blog/?p=679</guid>
		<description><![CDATA[A Little Linux Story &#8220;free the code&#8221;]]></description>
			<content:encoded><![CDATA[<p>A Little Linux Story<br />
&#8220;free the code&#8221;</p>
<p><a title="free the code - Clique para assistir!" href="http://everlinux.com/flash/freecode.swf"><img src="http://everlinux.com/img/freecode.jpg" alt="free the code" /></a></p>
]]></content:encoded>
			<wfw:commentRss>http://everlinux.com/blog/2009/08/25/a-little-linux-story/feed</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Placa de rede com MAC AA:00:04:00:0A:04</title>
		<link>http://everlinux.com/blog/2009/08/23/placa-de-rede-com-mac-aa0004000a04</link>
		<comments>http://everlinux.com/blog/2009/08/23/placa-de-rede-com-mac-aa0004000a04#comments</comments>
		<pubDate>Sun, 23 Aug 2009 04:09:16 +0000</pubDate>
		<dc:creator>Tiago Cruz</dc:creator>
				<category><![CDATA[Dicas]]></category>
		<category><![CDATA[Diversão]]></category>
		<category><![CDATA[Linux]]></category>
		<category><![CDATA[Nerd]]></category>
		<category><![CDATA[Network]]></category>
		<category><![CDATA[Ubuntu]]></category>
		<category><![CDATA[Wii]]></category>
		<category><![CDATA[Redes]]></category>

		<guid isPermaLink="false">http://everlinux.com/blog/?p=695</guid>
		<description><![CDATA[Já é a segunda vez que meu Ubuntu 9.04 resolve colocar o MAC &#8220;AA:00:04:00:0A:04&#8243; em minha interface de rede. Aconteceu com minha Realtek RTL8101E/RTL8102E (onboard) e agora com a minha Realtek RTL-8139/8139C/8139C+ Offboard, no meu super PC da SpaceBR que já veio com Linux instalado. Aparentemente não é algo difícil de acontecer no Ubuntu, por [...]]]></description>
			<content:encoded><![CDATA[<p>Já é a segunda vez que meu Ubuntu 9.04 resolve colocar o MAC &#8220;AA:00:04:00:0A:04&#8243; em minha interface de rede. Aconteceu com minha Realtek RTL8101E/RTL8102E (onboard) e agora com a minha Realtek RTL-8139/8139C/8139C+ Offboard, no meu super <a href="http://everlinux.com/blog/2009/04/08/micro-da-spacebr-com-kurumin-linux">PC da SpaceBR que já veio com Linux instalado.</a></p>
<p>Aparentemente não é algo <a href="http://ubuntuforums.org/showthread.php?t=465872">difícil de acontecer</a> no Ubuntu, por isso colocarei aqui o que fiz para parar de vez com esse problema irritante:</p>
<p>Editei o /etc/rc.local e acrescentei essas linhas:</p>

<div class="wp_syntax"><div class="code"><pre class="bash" style="font-family:monospace;"><span style="color: #000000; font-weight: bold;">/</span>sbin<span style="color: #000000; font-weight: bold;">/</span><span style="color: #c20cb9; font-weight: bold;">ifconfig</span> eth0 hw ether 00:<span style="color: #000000;">21</span>:<span style="color: #000000;">97</span>:9E:<span style="color: #000000;">13</span>:<span style="color: #000000;">13</span>
<span style="color: #000000; font-weight: bold;">/</span>sbin<span style="color: #000000; font-weight: bold;">/</span><span style="color: #c20cb9; font-weight: bold;">ifconfig</span> eth1 hw ether 00:E0:4C:<span style="color: #000000;">56</span>:0E:D8</pre></div></div>

<p>Logo em seguida, arrumei o /etc/udev/rules.d/70-persistent-net.rules</p>

<div class="wp_syntax"><div class="code"><pre class="bash" style="font-family:monospace;"><span style="color: #666666; font-style: italic;"># PCI device 0x10ec:0x8136 (r8169)</span>
<span style="color: #007800;">SUBSYSTEM</span>==<span style="color: #ff0000;">&quot;net&quot;</span>, <span style="color: #007800;">ACTION</span>==<span style="color: #ff0000;">&quot;add&quot;</span>, <span style="color: #007800;">DRIVERS</span>==<span style="color: #ff0000;">&quot;?*&quot;</span>, ATTR<span style="color: #7a0874; font-weight: bold;">&#123;</span>address<span style="color: #7a0874; font-weight: bold;">&#125;</span>==<span style="color: #ff0000;">&quot;00:21:97:9e:13:13&quot;</span>, ATTR<span style="color: #7a0874; font-weight: bold;">&#123;</span><span style="color: #7a0874; font-weight: bold;">type</span><span style="color: #7a0874; font-weight: bold;">&#125;</span>==<span style="color: #ff0000;">&quot;1&quot;</span>, <span style="color: #007800;">KERNEL</span>==<span style="color: #ff0000;">&quot;eth*&quot;</span>, <span style="color: #007800;">NAME</span>=<span style="color: #ff0000;">&quot;eth0&quot;</span>
&nbsp;
<span style="color: #666666; font-style: italic;"># PCI device 0x10ec:0x8139 (8139too)</span>
<span style="color: #007800;">SUBSYSTEM</span>==<span style="color: #ff0000;">&quot;net&quot;</span>, <span style="color: #007800;">ACTION</span>==<span style="color: #ff0000;">&quot;add&quot;</span>, <span style="color: #007800;">DRIVERS</span>==<span style="color: #ff0000;">&quot;?*&quot;</span>, ATTR<span style="color: #7a0874; font-weight: bold;">&#123;</span>address<span style="color: #7a0874; font-weight: bold;">&#125;</span>==<span style="color: #ff0000;">&quot;00:e0:4c:56:0e:d8&quot;</span>, ATTR<span style="color: #7a0874; font-weight: bold;">&#123;</span><span style="color: #7a0874; font-weight: bold;">type</span><span style="color: #7a0874; font-weight: bold;">&#125;</span>==<span style="color: #ff0000;">&quot;1&quot;</span>, <span style="color: #007800;">KERNEL</span>==<span style="color: #ff0000;">&quot;eth*&quot;</span>, <span style="color: #007800;">NAME</span>=<span style="color: #ff0000;">&quot;eth1&quot;</span></pre></div></div>

<p>No próximo reboot, o NetworkManager resolveu me obedecer e colocar o IP que eu havia selecionado (na verdade DHCP), sem ficar criando o maldito &#8220;Auto eth0&#8243; com dhcp e aquele MAC maluco.</p>
<p>No meu caso, eu configuro meu roteador Netgear WGR614 v7 para colocar um IP de acordo com o MAC da minha placa. Desta forma, meu Wii (rodando o mplayer_ce 0.75) consegue montar meu compartilhamento exportado via SaMBa (veja como no artigo: <a href="http://everlinux.com/blog/2009/03/17/assistindo-filmes-no-wii-usando-o-mplayer">Assistindo Filmes no Wii usando o Mplayer</a>) e eu posso assistir animês/ filmes e seriados pela TV da sala, deitado no sofá. Bem melhor do que ficar sentado na frente de um monitor <img src='http://everlinux.com/blog/wp-includes/images/smilies/icon_smile.gif' alt=':-)' class='wp-smiley' /> </p>
<p>O problema era que o Ubuntu colocava esse MAC maluco, o Wireless mandava um IP diferente do qual eu havia programado (192.168.1.5 ao invés do 192.168.1.2) e aí o Wii se perdia porque não encontrava o compartilhamento :-/</p>
<p>Agora tudo parece estar funcionando como deveria!</p>
]]></content:encoded>
			<wfw:commentRss>http://everlinux.com/blog/2009/08/23/placa-de-rede-com-mac-aa0004000a04/feed</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Instalando uma Nvidia 9500 GT no Ubuntu Linux</title>
		<link>http://everlinux.com/blog/2009/08/12/instalando-uma-nvidia-9500-gt-no-ubuntu-linux</link>
		<comments>http://everlinux.com/blog/2009/08/12/instalando-uma-nvidia-9500-gt-no-ubuntu-linux#comments</comments>
		<pubDate>Wed, 12 Aug 2009 11:32:33 +0000</pubDate>
		<dc:creator>Tiago Cruz</dc:creator>
				<category><![CDATA[Dicas]]></category>
		<category><![CDATA[Diversão]]></category>
		<category><![CDATA[Hardware]]></category>
		<category><![CDATA[Jogos]]></category>
		<category><![CDATA[Linux]]></category>
		<category><![CDATA[Nvidia]]></category>
		<category><![CDATA[Ubuntu]]></category>

		<guid isPermaLink="false">http://everlinux.com/blog/?p=636</guid>
		<description><![CDATA[Eu havia comentado anteriormente sobre a compra do meu PC novo para 2009, em substituição ao já idoso Athlon XP 1600+ que eu tinha anteriormente. Na verdade, um dos meus objetivos é possuir uma máquina descente para jogar games novos, por exemplo, o Diablo 3 (quando ele sair&#8230;), pois ainda estou muito empolgado jogando Diablo [...]]]></description>
			<content:encoded><![CDATA[<p>Eu havia comentado anteriormente sobre a <a href="http://everlinux.com/blog/2009/04/08/micro-da-spacebr-com-kurumin-linux">compra do meu PC novo para 2009</a>, em substituição ao já idoso Athlon XP 1600+ que eu tinha anteriormente.</p>
<p>Na verdade, um dos meus objetivos é possuir uma máquina descente para jogar games novos, por exemplo, o <a href="http://www.nowloading.com.br/diablo3-2010">Diablo 3 (quando ele sair&#8230;)</a>, pois ainda estou muito empolgado <a href="http://everlinux.com/blog/category/diablo">jogando Diablo 2</a> no Linux decentemente <img src='http://everlinux.com/blog/wp-includes/images/smilies/icon_smile.gif' alt=':)' class='wp-smiley' /> </p>
<p>Quando comprei a placa <em>Nvidia GeoForce Series 9 &#8211; 9500 GT com 1GB DDR2 (DVI/D-SUB/HDMI) &#8211; PCI-Express 2.0</em>, eu assim a fiz pensando no ótimo (??) suporte que a mesma possui em Linux. Eu ja tive uma Radeon 9200 da ATi e bem me lembro o sufoco que era fazer a mesma funcionar a aceleração 3D no Linux (se bem que isso não quer dizer muita coisa, hoje em dia as coisas andam muito mais fáceis&#8230;rsrsrs)</p>
<p>Para exemplificar isso, resolvi postar os screenshoots da instalação/ configuração desta placa no Ubuntu Linux 9.04. Mais fácil do que isso só roubar doce de criança&#8230;</p>
<p>Tudo começa clicando em <strong>System -> Administrator -> Hardware Drivers</strong>. O restante você confere nos screenshoots (clique para ampliar as imagens) <img src='http://everlinux.com/blog/wp-includes/images/smilies/icon_smile.gif' alt=':)' class='wp-smiley' /> </p>

<a href='http://everlinux.com/blog/2009/08/12/instalando-uma-nvidia-9500-gt-no-ubuntu-linux/nvidia1' title='nvidia1'><img width="150" height="150" src="http://everlinux.com/blog/wp-content/uploads/2009/08/nvidia1-150x150.png" class="attachment-thumbnail" alt="nvidia1" title="nvidia1" /></a>
<a href='http://everlinux.com/blog/2009/08/12/instalando-uma-nvidia-9500-gt-no-ubuntu-linux/nvidia2' title='nvidia2'><img width="150" height="150" src="http://everlinux.com/blog/wp-content/uploads/2009/08/nvidia2-150x150.png" class="attachment-thumbnail" alt="nvidia2" title="nvidia2" /></a>
<a href='http://everlinux.com/blog/2009/08/12/instalando-uma-nvidia-9500-gt-no-ubuntu-linux/nvidia3' title='nvidia3'><img width="150" height="150" src="http://everlinux.com/blog/wp-content/uploads/2009/08/nvidia3-150x150.png" class="attachment-thumbnail" alt="nvidia3" title="nvidia3" /></a>

<p>- Na primeira imagem você vê uma saída do &#8216;lspci&#8217; junto ao &#8216;Hardware Drivers&#8217;<br />
- Na segunda imagem, o /etc/X11/xorg.conf sendo modificado automaticamente<br />
- Na terceira, você pode visualizar o novo NVIDIA X Server Settings, tudo de forma fácil e gráfica!</p>
<p>Eu só não sei se tenho saudades dos velhos tempos em que configurar um X era coisa para macho, hahahahha <img src='http://everlinux.com/blog/wp-includes/images/smilies/icon_cool.gif' alt='8)' class='wp-smiley' /> </p>
<p>Abraços e até mais!</p>
]]></content:encoded>
			<wfw:commentRss>http://everlinux.com/blog/2009/08/12/instalando-uma-nvidia-9500-gt-no-ubuntu-linux/feed</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
		<item>
		<title>Resolvendo problemas com o SELinux</title>
		<link>http://everlinux.com/blog/2009/07/28/resolvendo-problemas-com-o-selinux</link>
		<comments>http://everlinux.com/blog/2009/07/28/resolvendo-problemas-com-o-selinux#comments</comments>
		<pubDate>Tue, 28 Jul 2009 21:13:22 +0000</pubDate>
		<dc:creator>Tiago Cruz</dc:creator>
				<category><![CDATA[Dicas]]></category>
		<category><![CDATA[Linux]]></category>
		<category><![CDATA[Segurança]]></category>
		<category><![CDATA[Selinux]]></category>

		<guid isPermaLink="false">http://everlinux.com/blog/?p=544</guid>
		<description><![CDATA[O objetivo deste post é ajudar as pessoas a manter o SELinux habilitado, resolvendo os problemas com o mesmo. O exemplo é um LAMP com Red Hat EL 5.3 com tudo funcionando, porém um daemon vsftpd que não quer subir quando o SELinux está rodando. Para verificar se o problema é de fato o SELinux, [...]]]></description>
			<content:encoded><![CDATA[<p>O objetivo deste post é ajudar as pessoas a manter o SELinux habilitado, resolvendo os problemas com o mesmo.</p>
<p>O exemplo é um LAMP com Red Hat EL 5.3 com tudo funcionando, porém um daemon vsftpd que não quer subir quando o SELinux está rodando.</p>
<p>Para verificar se o problema é de fato o SELinux, basta desabilita-lo temporariamente:</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>selinux tmp<span style="color: #7a0874; font-weight: bold;">&#93;</span><span style="color: #666666; font-style: italic;"># setenforce Permissive</span>
&nbsp;
<span style="color: #7a0874; font-weight: bold;">&#91;</span>root<span style="color: #000000; font-weight: bold;">@</span>selinux tmp<span style="color: #7a0874; font-weight: bold;">&#93;</span><span style="color: #666666; font-style: italic;"># /etc/init.d/vsftpd start</span>
Starting vsftpd <span style="color: #000000; font-weight: bold;">for</span> vsftpd:                                             <span style="color: #7a0874; font-weight: bold;">&#91;</span>  OK  <span style="color: #7a0874; font-weight: bold;">&#93;</span></pre></div></div>

<p>Sem o SELinux, o VSFTP funciona normalmente, porém basta ativa-lo que mensagens estranhas começam a aparecer:</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>selinux tmp<span style="color: #7a0874; font-weight: bold;">&#93;</span><span style="color: #666666; font-style: italic;"># setenforce enforcing</span>
&nbsp;
<span style="color: #7a0874; font-weight: bold;">&#91;</span>root<span style="color: #000000; font-weight: bold;">@</span>selinux tmp<span style="color: #7a0874; font-weight: bold;">&#93;</span><span style="color: #666666; font-style: italic;"># /etc/init.d/vsftpd start</span>
Starting vsftpd <span style="color: #000000; font-weight: bold;">for</span> vsftpd: <span style="color: #000000; font-weight: bold;">/</span>usr<span style="color: #000000; font-weight: bold;">/</span>sbin<span style="color: #000000; font-weight: bold;">/</span>vsftpd: error <span style="color: #000000; font-weight: bold;">while</span> loading shared libraries: libssl.so.6: failed to map segment from shared object: Permission denied
                                                          <span style="color: #7a0874; font-weight: bold;">&#91;</span>FAILED<span style="color: #7a0874; font-weight: bold;">&#93;</span>
<span style="color: #7a0874; font-weight: bold;">&#91;</span>root<span style="color: #000000; font-weight: bold;">@</span>selinux ~<span style="color: #7a0874; font-weight: bold;">&#93;</span> <span style="color: #666666; font-style: italic;"># tail /var/log/messages</span>
Jul <span style="color: #000000;">27</span> <span style="color: #000000;">15</span>:01:<span style="color: #000000;">44</span> selinux kernel: <span style="color: #007800;"><span style="color: #7a0874; font-weight: bold;">type</span></span>=<span style="color: #000000;">1107</span> audit<span style="color: #7a0874; font-weight: bold;">&#40;</span><span style="color: #000000;">1248717704.011</span>:<span style="color: #000000;">1569</span><span style="color: #7a0874; font-weight: bold;">&#41;</span>: user <span style="color: #007800;">pid</span>=<span style="color: #000000;">25449</span> <span style="color: #007800;">uid</span>=<span style="color: #000000;">28</span> <span style="color: #007800;">auid</span>=<span style="color: #000000;">4294967295</span> <span style="color: #007800;">subj</span>=system_u:system_r:init_t:s0 <span style="color: #007800;">msg</span>=<span style="color: #ff0000;">'avc:  denied  { shmempwd } for  scontext=system_u:system_r:initrc_t:s0 tcontext=system_u:system_r:init_t:s0 tclass=nscd
Jul 27 15:01:44 selinux kernel: : exe=&quot;?&quot; (sauid=28, hostname=?, addr=?, terminal=?)'</span>
Jul <span style="color: #000000;">27</span> <span style="color: #000000;">15</span>:01:<span style="color: #000000;">44</span> selinux kernel: <span style="color: #007800;"><span style="color: #7a0874; font-weight: bold;">type</span></span>=<span style="color: #000000;">1107</span> audit<span style="color: #7a0874; font-weight: bold;">&#40;</span><span style="color: #000000;">1248717704.012</span>:<span style="color: #000000;">1570</span><span style="color: #7a0874; font-weight: bold;">&#41;</span>: user <span style="color: #007800;">pid</span>=<span style="color: #000000;">25449</span> <span style="color: #007800;">uid</span>=<span style="color: #000000;">28</span> <span style="color: #007800;">auid</span>=<span style="color: #000000;">4294967295</span> <span style="color: #007800;">subj</span>=system_u:system_r:init_t:s0 <span style="color: #007800;">msg</span>=<span style="color: #ff0000;">'avc:  denied  { getpwd } for  scontext=system_u:system_r:initrc_t:s0 tcontext=system_u:system_r:init_t:s0 tclass=nscd
Jul 27 15:01:44 selinux kernel: : exe=&quot;?&quot; (sauid=28, hostname=?, addr=?, terminal=?)'</span>
Jul <span style="color: #000000;">27</span> <span style="color: #000000;">15</span>:01:<span style="color: #000000;">44</span> selinux kernel: <span style="color: #007800;"><span style="color: #7a0874; font-weight: bold;">type</span></span>=<span style="color: #000000;">1107</span> audit<span style="color: #7a0874; font-weight: bold;">&#40;</span><span style="color: #000000;">1248717704.012</span>:<span style="color: #000000;">1571</span><span style="color: #7a0874; font-weight: bold;">&#41;</span>: user <span style="color: #007800;">pid</span>=<span style="color: #000000;">25449</span> <span style="color: #007800;">uid</span>=<span style="color: #000000;">28</span> <span style="color: #007800;">auid</span>=<span style="color: #000000;">4294967295</span> <span style="color: #007800;">subj</span>=system_u:system_r:init_t:s0 <span style="color: #007800;">msg</span>=<span style="color: #ff0000;">'avc:  denied  { shmemgrp } for  scontext=system_u:system_r:initrc_t:s0 tcontext=system_u:system_r:init_t:s0 tclass=nscd
Jul 27 15:01:44 selinux kernel: : exe=&quot;?&quot; (sauid=28, hostname=?, addr=?, terminal=?)'</span>
Jul <span style="color: #000000;">27</span> <span style="color: #000000;">15</span>:01:<span style="color: #000000;">44</span> selinux kernel: <span style="color: #007800;"><span style="color: #7a0874; font-weight: bold;">type</span></span>=<span style="color: #000000;">1107</span> audit<span style="color: #7a0874; font-weight: bold;">&#40;</span><span style="color: #000000;">1248717704.012</span>:<span style="color: #000000;">1572</span><span style="color: #7a0874; font-weight: bold;">&#41;</span>: user <span style="color: #007800;">pid</span>=<span style="color: #000000;">25449</span> <span style="color: #007800;">uid</span>=<span style="color: #000000;">28</span> <span style="color: #007800;">auid</span>=<span style="color: #000000;">4294967295</span> <span style="color: #007800;">subj</span>=system_u:system_r:init_t:s0 <span style="color: #007800;">msg</span>=<span style="color: #ff0000;">'avc:  denied  { getgrp } for  scontext=system_u:system_r:initrc_t:s0 tcontext=system_u:system_r:init_t:s0 tclass=nscd
Jul 27 15:01:44 selinux kernel: : exe=&quot;?&quot; (sauid=28, hostname=?, addr=?, terminal=?)'</span>
Jul <span style="color: #000000;">27</span> <span style="color: #000000;">15</span>:01:<span style="color: #000000;">44</span> selinux kernel: <span style="color: #007800;"><span style="color: #7a0874; font-weight: bold;">type</span></span>=<span style="color: #000000;">1400</span> audit<span style="color: #7a0874; font-weight: bold;">&#40;</span><span style="color: #000000;">1248717704.028</span>:<span style="color: #000000;">1573</span><span style="color: #7a0874; font-weight: bold;">&#41;</span>: avc:  denied  <span style="color: #7a0874; font-weight: bold;">&#123;</span> execute <span style="color: #7a0874; font-weight: bold;">&#125;</span> <span style="color: #000000; font-weight: bold;">for</span>  <span style="color: #007800;">pid</span>=<span style="color: #000000;">25644</span> <span style="color: #007800;"><span style="color: #c20cb9; font-weight: bold;">comm</span></span>=<span style="color: #ff0000;">&quot;vsftpd&quot;</span> <span style="color: #007800;">path</span>=<span style="color: #ff0000;">&quot;/lib64/libssl.so.0.9.8e&quot;</span> <span style="color: #007800;">dev</span>=sda3 <span style="color: #007800;">ino</span>=<span style="color: #000000;">1488241</span> <span style="color: #007800;">scontext</span>=system_u:system_r:ftpd_t:s0 <span style="color: #007800;">tcontext</span>=system_u:object_r:file_t:s0 <span style="color: #007800;">tclass</span>=<span style="color: #c20cb9; font-weight: bold;">file</span></pre></div></div>

<p>Você pode observar que vários destes erros são referentes ao cache NSCD, e somente a última é de fato referente ao VSFTPd e suas bibiotecas compartilhadas.</p>
<p>Para ficar mais visível, vamos parar o o nscd e tratar como dois problemas distintos:</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>selinux selinux<span style="color: #7a0874; font-weight: bold;">&#93;</span><span style="color: #666666; font-style: italic;"># /etc/init.d/nscd stop</span>
Stopping nscd:                                             <span style="color: #7a0874; font-weight: bold;">&#91;</span>  OK  <span style="color: #7a0874; font-weight: bold;">&#93;</span>
&nbsp;
<span style="color: #7a0874; font-weight: bold;">&#91;</span>root<span style="color: #000000; font-weight: bold;">@</span>selinux selinux<span style="color: #7a0874; font-weight: bold;">&#93;</span><span style="color: #666666; font-style: italic;"># /etc/init.d/vsftpd start</span>
Starting vsftpd <span style="color: #000000; font-weight: bold;">for</span> vsftpd: <span style="color: #000000; font-weight: bold;">/</span>usr<span style="color: #000000; font-weight: bold;">/</span>sbin<span style="color: #000000; font-weight: bold;">/</span>vsftpd: error <span style="color: #000000; font-weight: bold;">while</span> loading shared libraries: libssl.so.6: failed to map segment from shared object: Permission denied
                                                          <span style="color: #7a0874; font-weight: bold;">&#91;</span>FAILED<span style="color: #7a0874; font-weight: bold;">&#93;</span>
<span style="color: #7a0874; font-weight: bold;">&#91;</span>root<span style="color: #000000; font-weight: bold;">@</span>selinux selinux<span style="color: #7a0874; font-weight: bold;">&#93;</span><span style="color: #666666; font-style: italic;"># tail /var/log/messages</span>
Jul <span style="color: #000000;">27</span> <span style="color: #000000;">15</span>:01:<span style="color: #000000;">52</span> selinux kernel: <span style="color: #007800;"><span style="color: #7a0874; font-weight: bold;">type</span></span>=<span style="color: #000000;">1400</span> audit<span style="color: #7a0874; font-weight: bold;">&#40;</span><span style="color: #000000;">1248717712.742</span>:<span style="color: #000000;">1574</span><span style="color: #7a0874; font-weight: bold;">&#41;</span>: avc:  denied  <span style="color: #7a0874; font-weight: bold;">&#123;</span> execute <span style="color: #7a0874; font-weight: bold;">&#125;</span> <span style="color: #000000; font-weight: bold;">for</span>  <span style="color: #007800;">pid</span>=<span style="color: #000000;">25662</span> <span style="color: #007800;"><span style="color: #c20cb9; font-weight: bold;">comm</span></span>=<span style="color: #ff0000;">&quot;vsftpd&quot;</span> <span style="color: #007800;">path</span>=<span style="color: #ff0000;">&quot;/lib64/libssl.so.0.9.8e&quot;</span> <span style="color: #007800;">dev</span>=sda3 <span style="color: #007800;">ino</span>=<span style="color: #000000;">1488241</span> <span style="color: #007800;">scontext</span>=system_u:system_r:ftpd_t:s0 <span style="color: #007800;">tcontext</span>=system_u:object_r:file_t:s0 <span style="color: #007800;">tclass</span>=<span style="color: #c20cb9; font-weight: bold;">file</span></pre></div></div>

<p>Uma das coisas mais legais que foram adicionados ao RHEL5, é o daemon setroubleshoot que ajuda a traduzir esses erros monstros do selinux para algo que um humano consiga entender.</p>
<p>A ferramenta <strong>audit2allow</strong> permite pegar trechos de logs monstros que estão barrando em algo e converter para o mundo do Selinux, eliminando assim o problema em que você está preso:</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>selinux tcruz<span style="color: #7a0874; font-weight: bold;">&#93;</span><span style="color: #666666; font-style: italic;"># grep vsftpd /var/log/messages | audit2allow -M vsftpd</span></pre></div></div>

<p>Será gerado dois arquivos:<br />
vsftpd.te = texto<br />
vsftpd.pp = binário</p>
<p>O vsftpd.te conterá algo como:</p>

<div class="wp_syntax"><div class="code"><pre class="bash" style="font-family:monospace;">module vsftp <span style="color: #000000;">1.0</span>;
&nbsp;
require <span style="color: #7a0874; font-weight: bold;">&#123;</span>
	<span style="color: #7a0874; font-weight: bold;">type</span> ftpd_t;
	<span style="color: #7a0874; font-weight: bold;">type</span> file_t;
	class <span style="color: #c20cb9; font-weight: bold;">dir</span> search;
	class <span style="color: #c20cb9; font-weight: bold;">file</span> execute;
<span style="color: #7a0874; font-weight: bold;">&#125;</span>
&nbsp;
<span style="color: #666666; font-style: italic;">#============= ftpd_t ==============</span>
allow ftpd_t file_t:<span style="color: #c20cb9; font-weight: bold;">dir</span> search;
allow ftpd_t file_t:<span style="color: #c20cb9; font-weight: bold;">file</span> execute;</pre></div></div>

<p>Enquanto o nscd.te mostraria algo assim:</p>

<div class="wp_syntax"><div class="code"><pre class="bash" style="font-family:monospace;">module nscd <span style="color: #000000;">1.0</span>;
&nbsp;
require <span style="color: #7a0874; font-weight: bold;">&#123;</span>
	<span style="color: #7a0874; font-weight: bold;">type</span> init_t;
	<span style="color: #7a0874; font-weight: bold;">type</span> initrc_t;
	class nscd <span style="color: #7a0874; font-weight: bold;">&#123;</span> shmemhost shmempwd getpwd shmemgrp gethost getgrp <span style="color: #7a0874; font-weight: bold;">&#125;</span>;
<span style="color: #7a0874; font-weight: bold;">&#125;</span>
&nbsp;
<span style="color: #666666; font-style: italic;">#============= initrc_t ==============</span>
allow initrc_t init_t:nscd <span style="color: #7a0874; font-weight: bold;">&#123;</span> shmemgrp getgrp shmempwd getpwd gethost shmemhost <span style="color: #7a0874; font-weight: bold;">&#125;</span>;</pre></div></div>

<p>Se você estiver satisfeito com o resultado, poderá simplesmente importar o arquivo binário para junto das regras atuais do seu sistema:</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>selinux tcruz<span style="color: #7a0874; font-weight: bold;">&#93;</span><span style="color: #666666; font-style: italic;"># semodule -i vsftpd.pp</span></pre></div></div>

<p>Você pode fazer isso com o vsftpd e com nscd, até que seu problema seja de fato resolvido!</p>
<p>Pronto! Simples assim <img src='http://everlinux.com/blog/wp-includes/images/smilies/icon_smile.gif' alt=':)' class='wp-smiley' /> </p>
<p>Um outro comando interessante, é o <strong>getsebool</strong> que pode alterar várias variáveis boolean (on ou off, 0 ou 1, ligado ou desligado) pré-definidas como:</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>selinux log<span style="color: #7a0874; font-weight: bold;">&#93;</span><span style="color: #666666; font-style: italic;"># setsebool -P ftp_home_dir 1</span>
<span style="color: #7a0874; font-weight: bold;">&#91;</span>root<span style="color: #000000; font-weight: bold;">@</span>selinux log<span style="color: #7a0874; font-weight: bold;">&#93;</span><span style="color: #666666; font-style: italic;"># setsebool -P allow_ftpd_full_access=1</span>
&nbsp;
<span style="color: #7a0874; font-weight: bold;">&#91;</span>root<span style="color: #000000; font-weight: bold;">@</span>selinux log<span style="color: #7a0874; font-weight: bold;">&#93;</span><span style="color: #666666; font-style: italic;"># getsebool -a | grep ftp</span>
allow_ftpd_anon_write --<span style="color: #000000; font-weight: bold;">&gt;</span> off
allow_ftpd_full_access --<span style="color: #000000; font-weight: bold;">&gt;</span> on
allow_ftpd_use_cifs --<span style="color: #000000; font-weight: bold;">&gt;</span> off
allow_ftpd_use_nfs --<span style="color: #000000; font-weight: bold;">&gt;</span> off
allow_tftp_anon_write --<span style="color: #000000; font-weight: bold;">&gt;</span> off
ftp_home_dir --<span style="color: #000000; font-weight: bold;">&gt;</span> on
ftpd_disable_trans --<span style="color: #000000; font-weight: bold;">&gt;</span> off
ftpd_is_daemon --<span style="color: #000000; font-weight: bold;">&gt;</span> on
httpd_enable_ftp_server --<span style="color: #000000; font-weight: bold;">&gt;</span> off
tftpd_disable_trans --<span style="color: #000000; font-weight: bold;">&gt;</span> off</pre></div></div>

<p>Links Úteis para saber mais sobre o SELinux:</p>
<p><a href="http://jczucco.blogspot.com/2009/07/apresentacao-sobre-selinux-no-fisl-10.html">http://jczucco.blogspot.com/2009/07/apresentacao-sobre-selinux-no-fisl-10.html</a><br />
<a href="http://magazine.redhat.com/2007/05/04/whats-new-in-selinux-for-red-hat-enterprise-linux-5/">http://magazine.redhat.com/2007/05/04/whats-new-in-selinux-for-red-hat-enterprise-linux-5/</a><br />
<a href="http://fedoraproject.org/wiki/SELinux">http://fedoraproject.org/wiki/SELinux</a><br />
<a href="http://docs.fedoraproject.org/selinux-faq-fc5/">http://docs.fedoraproject.org/selinux-faq-fc5/</a><br />
<a href="http://fedoraproject.org/wiki/SELinux/Understanding">http://fedoraproject.org/wiki/SELinux/Understanding</a></p>
]]></content:encoded>
			<wfw:commentRss>http://everlinux.com/blog/2009/07/28/resolvendo-problemas-com-o-selinux/feed</wfw:commentRss>
		<slash:comments>3</slash:comments>
		</item>
	</channel>
</rss>
<!-- This Quick Cache file was built for (  everlinux.com/blog/category/linux/feed ) in 2.00146 seconds, on Jul 30th, 2010 at 8:54 pm UTC. -->
<!-- This Quick Cache file will automatically expire ( and be re-built automatically ) on Jul 30th, 2010 at 9:54 pm UTC -->