<?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>Chmouel&#039;s Blog &#187; Solaris</title>
	<atom:link href="http://blog.chmouel.com/category/solaris/feed/" rel="self" type="application/rss+xml" />
	<link>http://blog.chmouel.com</link>
	<description>Random and probably boring stuff.</description>
	<lastBuildDate>Wed, 01 Feb 2012 10:28:40 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.3.1</generator>
<atom:link rel="hub" href="http://pubsubhubbub.appspot.com"/><atom:link rel="hub" href="http://superfeedr.com/hubbub"/>		<item>
		<title>Netapp sue Sun</title>
		<link>http://blog.chmouel.com/2007/09/07/netapp-sue-sun/</link>
		<comments>http://blog.chmouel.com/2007/09/07/netapp-sue-sun/#comments</comments>
		<pubDate>Fri, 07 Sep 2007 07:50:24 +0000</pubDate>
		<dc:creator>chmouel</dc:creator>
				<category><![CDATA[Misc]]></category>
		<category><![CDATA[Solaris]]></category>

		<guid isPermaLink="false">http://www.chmouel.com/blog/2007/09/07/netapp-sue-sun/</guid>
		<description><![CDATA[This is fun, theses two CEO of theses big companies are dog fighting each others : Dave post: http://blogs.netapp.com/dave/2007/09/netapp-sues-sun.html Johanthan answer: http://blogs.sun.com/jonathan/entry/on_patent_trolling but the real (fake) truth about that post is here : http://fakeschwartz.blogspot.com/2007/09/bring-it-cowboy.html I tend to believe more NetAPP &#8230; <a href="http://blog.chmouel.com/2007/09/07/netapp-sue-sun/">Continue reading <span class="meta-nav">&#8594;</span></a>]]></description>
			<content:encoded><![CDATA[<p>This is fun, theses two CEO of theses big companies are dog fighting each others :</p>
<p>Dave post:</p>
<p><a href="http://blogs.netapp.com/dave/2007/09/netapp-sues-sun.html" target="_blank">http://blogs.netapp.com/dave/2007/09/netapp-sues-sun.html</a></p>
<p>Johanthan  answer:</p>
<p><a href="http://blogs.sun.com/jonathan/entry/on_patent_trolling" target="_blank">http://blogs.sun.com/jonathan/entry/on_patent_trolling</a></p>
<p>but the real (fake) truth about that post is here :</p>
<p><a href="http://fakeschwartz.blogspot.com/2007/09/bring-it-cowboy.html" title="http://fakeschwartz.blogspot.com/2007/09/bring-it-cowboy.html">http://fakeschwartz.blogspot.com/2007/09/bring-it-cowboy.html  </a></p>
<p>I tend to believe more NetAPP in this case, just because i don&#8217;t know how many time i have sweared on that bloody ps -aux that does not work on solaris.</p>
]]></content:encoded>
			<wfw:commentRss>http://blog.chmouel.com/2007/09/07/netapp-sue-sun/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Generating md5 encrypted password for chpasswd</title>
		<link>http://blog.chmouel.com/2007/08/17/generating-md5-encrypted-password-for-chpasswd/</link>
		<comments>http://blog.chmouel.com/2007/08/17/generating-md5-encrypted-password-for-chpasswd/#comments</comments>
		<pubDate>Fri, 17 Aug 2007 07:11:38 +0000</pubDate>
		<dc:creator>chmouel</dc:creator>
				<category><![CDATA[Programming]]></category>
		<category><![CDATA[Python]]></category>
		<category><![CDATA[Scripts]]></category>
		<category><![CDATA[Solaris]]></category>
		<category><![CDATA[Travel]]></category>

		<guid isPermaLink="false">http://www.chmouel.com/blog/2007/08/17/generating-md5-encrypted-password-for-chpasswd/</guid>
		<description><![CDATA[If you want to generate properly encrypted password to feed to chpasswd, the most easier and proper way is to do that from command line : [code lang="bash"] echo &#34;encryptedpassword&#34;&#124;openssl passwd -1 -stdin [/code] If you want to generate in &#8230; <a href="http://blog.chmouel.com/2007/08/17/generating-md5-encrypted-password-for-chpasswd/">Continue reading <span class="meta-nav">&#8594;</span></a>]]></description>
			<content:encoded><![CDATA[<p>If you want to generate properly encrypted password to feed to chpasswd, the most easier and proper way is to do that from command line :<br />
[code lang="bash"]<br />
echo &quot;encryptedpassword&quot;|openssl passwd -1 -stdin<br />
[/code]<br />
If you want to generate in pure python you can do it like that :<br />
[code lang="python"]<br />
    def md5crypt(password, salt, magic='$1$'):<br />
        import md5<br />
        m = md5.new()<br />
        m.update(password + magic + salt)</p>
<p>        # /* Then just as many characters of the MD5(pw,salt,pw) */<br />
        mixin = md5.md5(password + salt + password).digest()<br />
        for i in range(0, len(password)):<br />
            m.update(mixin[i % 16])</p>
<p>        # /* Then something really weird... */<br />
        # Also really broken, as far as I can tell.  -m<br />
        i = len(password)<br />
        while i:<br />
            if i &amp; 1:<br />
                m.update('x00')<br />
            else:<br />
                m.update(password[0])<br />
            i >>= 1</p>
<p>        final = m.digest()<br />
        # /* and now, just to make sure things don't run too fast */<br />
        for i in range(1000):<br />
            m2 = md5.md5()<br />
            if i &amp; 1:<br />
                m2.update(password)<br />
            else:<br />
                m2.update(final)<br />
            if i % 3:<br />
                m2.update(salt)<br />
            if i % 7:<br />
                m2.update(password)</p>
<p>            if i &amp; 1:<br />
                m2.update(final)<br />
            else:<br />
                m2.update(password)</p>
<p>            final = m2.digest()</p>
<p>        # This is the bit that uses to64() in the original code.<br />
        itoa64 = './0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz'<br />
        rearranged = ''<br />
        for a, b, c in ((0, 6, 12), (1, 7, 13), (2, 8, 14), (3, 9, 15), (4, 10, 5)):<br />
            v = ord(final[a]) < < 16 | ord(final[b]) << 8 | ord(final[c])<br />
            for i in range(4):<br />
                rearranged += itoa64[v &amp; 0x3f]; v >>= 6</p>
<p>        v = ord(final[11])<br />
        for i in range(2):<br />
            rearranged += itoa64[v &amp; 0x3f]; v >>= 6</p>
<p>        return magic + salt + '$' + rearranged</p>
<p>[/code]</p>
<p>You need to feed it up with a salt, like this :<br />
[code lang="python"]<br />
    def generate_salt(count):<br />
        import random, string<br />
        char = string.ascii_letters + string.digits + string.punctuation.replace(':', '')<br />
        return string.join(map(lambda x,v=char: random.choice(v), range(count)), '')<br />
[/code]</p>
]]></content:encoded>
			<wfw:commentRss>http://blog.chmouel.com/2007/08/17/generating-md5-encrypted-password-for-chpasswd/feed/</wfw:commentRss>
		<slash:comments>3</slash:comments>
		</item>
		<item>
		<title>Mixing 64 bytes and 32 Bytes Libraries on Solaris</title>
		<link>http://blog.chmouel.com/2006/04/29/mixing-64-bytes-and-32-bytes-libraries-on-solaris/</link>
		<comments>http://blog.chmouel.com/2006/04/29/mixing-64-bytes-and-32-bytes-libraries-on-solaris/#comments</comments>
		<pubDate>Sat, 29 Apr 2006 22:54:06 +0000</pubDate>
		<dc:creator>chmouel</dc:creator>
				<category><![CDATA[Solaris]]></category>

		<guid isPermaLink="false">http://www.chmouel.com/blog/?p=4</guid>
		<description><![CDATA[Remind to myself to use the switch -64 on solaris with crle to tell the linker on solaris to get the linker &#8216;seeing&#8217; 64 libraries. I wonder why everything is not as simple as linux thought where we have everything &#8230; <a href="http://blog.chmouel.com/2006/04/29/mixing-64-bytes-and-32-bytes-libraries-on-solaris/">Continue reading <span class="meta-nav">&#8594;</span></a>]]></description>
			<content:encoded><![CDATA[<p>Remind to myself to use the switch -64 on solaris with crle to tell<br />
the linker on solaris to get the linker &#8216;seeing&#8217; 64 libraries.</p>
<p>I wonder why everything is not as simple as linux thought where we<br />
have everything in one place with /etc/ld.so.config</p>
]]></content:encoded>
			<wfw:commentRss>http://blog.chmouel.com/2006/04/29/mixing-64-bytes-and-32-bytes-libraries-on-solaris/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
	</channel>
</rss>

