<?xml version="1.0" encoding="UTF-8"?><rss
version="2.0"
xmlns:content="http://purl.org/rss/1.0/modules/content/"
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/"
> <channel><title>Comments on: Do NOT Use This Perl Module: Passwd::Unix</title> <atom:link href="http://beerpla.net/2008/04/22/do-not-use-this-perl-module-passwdunix/feed/" rel="self" type="application/rss+xml" /><link>http://beerpla.net/2008/04/22/do-not-use-this-perl-module-passwdunix/</link> <description>where things have nothing to do with beer - tutorials, tips, how-tos, thoughts, hacks, and other techy nonsense</description> <lastBuildDate>Sat, 11 Feb 2012 17:00:25 +0000</lastBuildDate> <sy:updatePeriod>hourly</sy:updatePeriod> <sy:updateFrequency>1</sy:updateFrequency> <generator>http://wordpress.org/?v=3.3.1</generator> <item><title>By: Jason</title><link>http://beerpla.net/2008/04/22/do-not-use-this-perl-module-passwdunix/#comment-12888</link> <dc:creator>Jason</dc:creator> <pubDate>Tue, 10 Feb 2009 06:53:55 +0000</pubDate> <guid
isPermaLink="false">http://beerpla.net/2008/04/22/do-not-use-this-perl-module-passwdunix/#comment-12888</guid> <description>I&#039;m using v0.40 Passwd::Unix qw(uid encpass passwd) without any problems.
I would recommend against using Artem&#039;s example of system(&quot;echo stuff &#124; passwordprogram&quot;) since that will show up in the ps -eF output....
There are other methods open a pipe to a program where your password won&#039;t be viewable non-root users.  In Perl you can use
&lt;code&gt;
open(HANDLE,&quot;&gt;&quot;,&quot;&#124;chpasswd&quot;) &#124;&#124; die &quot;$!\n&quot;;
print HANDLE &quot;$username:$password&quot;;
&lt;/code&gt;
In PHP you can use &lt;code&gt;popoen()&lt;/code&gt; or &lt;code&gt;proc_open()&lt;/code&gt;</description> <content:encoded><![CDATA[<p>I&#039;m using v0.40 Passwd::Unix qw(uid encpass passwd) without any problems.</p><p>I would recommend against using Artem&#039;s example of system(&#034;echo stuff | passwordprogram&#034;) since that will show up in the ps -eF output&#8230;.</p><p>There are other methods open a pipe to a program where your password won&#039;t be viewable non-root users.  In Perl you can use<br
/> <code><br
/> open(HANDLE,"&gt;","|chpasswd") || die "$!\n";<br
/> print HANDLE "$username:$password";<br
/> </code><br
/> In PHP you can use <code>popoen()</code> or <code>proc_open()</code></p> ]]></content:encoded> </item> <item><title>By: Artem Russakovskii</title><link>http://beerpla.net/2008/04/22/do-not-use-this-perl-module-passwdunix/#comment-4576</link> <dc:creator>Artem Russakovskii</dc:creator> <pubDate>Tue, 27 May 2008 21:24:52 +0000</pubDate> <guid
isPermaLink="false">http://beerpla.net/2008/04/22/do-not-use-this-perl-module-passwdunix/#comment-4576</guid> <description>joe, yeah, I ended up writing my own version which has worked well so far. If I were writing new code though, I would give Passwd::Unix another try since the author rewrote it after my bug report.
For reference, here&#039;s the code I&#039;ve come up with:
&lt;pre line=&quot;1&quot;&gt;
system(&quot;echo &#039;$username:$password&#039; &#124; chpasswd&quot;) &amp;&amp; die &quot;Oops, there was some error setting the password!&quot;;
&lt;/pre&gt;</description> <content:encoded><![CDATA[<p>joe, yeah, I ended up writing my own version which has worked well so far. If I were writing new code though, I would give Passwd::Unix another try since the author rewrote it after my bug report.</p><p>For reference, here&#039;s the code I&#039;ve come up with:</p><div
class="wp_syntax"><table><tr><td
class="line_numbers"><pre>1
</pre></td><td
class="code"><pre>system(&quot;echo '$username:$password' | chpasswd&quot;) &amp;&amp; die &quot;Oops, there was some error setting the password!&quot;;</pre></td></tr></table></div> ]]></content:encoded> </item> <item><title>By: joe</title><link>http://beerpla.net/2008/04/22/do-not-use-this-perl-module-passwdunix/#comment-4568</link> <dc:creator>joe</dc:creator> <pubDate>Tue, 27 May 2008 13:08:26 +0000</pubDate> <guid
isPermaLink="false">http://beerpla.net/2008/04/22/do-not-use-this-perl-module-passwdunix/#comment-4568</guid> <description>What have you used instead ?
Did you write your own ?</description> <content:encoded><![CDATA[<p>What have you used instead ?<br
/> Did you write your own ?</p> ]]></content:encoded> </item> </channel> </rss>
