<?xml version="1.0" encoding="UTF-8"?>
<rss xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns:taxo="http://purl.org/rss/1.0/modules/taxonomy/" version="2.0">
  <channel>
    <title>topic Re: decrypt 4 digit passwd. in Operating System - HP-UX</title>
    <link>https://community.hpe.com/t5/operating-system-hp-ux/decrypt-4-digit-passwd/m-p/4454021#M359115</link>
    <description>Hi (again) Jaime:&lt;BR /&gt;&lt;BR /&gt;&amp;gt; I must be doing something wrong, the password is 1234&lt;BR /&gt;&lt;BR /&gt;And either 'makekey' or the Perl script I offered will encrypt that plaintext password as you saw.&lt;BR /&gt;&lt;BR /&gt;If you have an encrypted password and want to see if it matches what you think it should you can do:&lt;BR /&gt;&lt;BR /&gt;# perl -le '$plain=shift;$secret=shift or die;print "ok" if if crypt($plain,$secret) eq $secret' 1234oL VLzVSMAFApTr2&lt;BR /&gt;&lt;BR /&gt;That is, pass the plaintext password followed by what the encrypted version should match.  I used your data in the above example.&lt;BR /&gt;&lt;BR /&gt;Regards,&lt;BR /&gt;&lt;BR /&gt;...JRF...</description>
    <pubDate>Mon, 06 Jul 2009 23:34:54 GMT</pubDate>
    <dc:creator>James R. Ferguson</dc:creator>
    <dc:date>2009-07-06T23:34:54Z</dc:date>
    <item>
      <title>decrypt 4 digit passwd.</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/decrypt-4-digit-passwd/m-p/4454018#M359112</link>
      <description>Hi guys, using /usr/lib/makekey I can decrypt my own known password, knowing my password, the salt and peper, for example:&lt;BR /&gt;&lt;BR /&gt;echo "jaime123SP" | /usr/lib/makekey&lt;BR /&gt;&lt;BR /&gt;But I am trying to do the same with a 4 digit password, but makekey is especting an 8 digit value, so I do not get it right.&lt;BR /&gt;&lt;BR /&gt;How do you write the command to fill in the other 4 digits that the password does not have?&lt;BR /&gt;&lt;BR /&gt;Regards,&lt;BR /&gt;&lt;BR /&gt;Jaime.</description>
      <pubDate>Mon, 06 Jul 2009 20:39:41 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/decrypt-4-digit-passwd/m-p/4454018#M359112</guid>
      <dc:creator>Jaime Bolanos Rojas.</dc:creator>
      <dc:date>2009-07-06T20:39:41Z</dc:date>
    </item>
    <item>
      <title>Re: decrypt 4 digit passwd.</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/decrypt-4-digit-passwd/m-p/4454019#M359113</link>
      <description>&lt;!--!*#--&gt;Hi Jaime:&lt;BR /&gt;&lt;BR /&gt;Instead of using 'makekey' you can let Perl do this thusly:&lt;BR /&gt;&lt;BR /&gt;# cat ./pwgen&lt;BR /&gt;#!/usr/bin/perl -l&lt;BR /&gt;die "One arg expected\n" unless @ARGV;&lt;BR /&gt;print crypt(&lt;BR /&gt;    $ARGV[0],&lt;BR /&gt;    join( '',&lt;BR /&gt;        ( '.', '/', 0 .. 9, 'A' .. 'Z', 'a' .. 'z' )[ rand 64, rand 64 ] )&lt;BR /&gt;);&lt;BR /&gt;1;&lt;BR /&gt;&lt;BR /&gt;...run as:&lt;BR /&gt;&lt;BR /&gt;# ./pwgen plaintext&lt;BR /&gt;&lt;BR /&gt;The script's output is your corresponding encrypted password.&lt;BR /&gt;&lt;BR /&gt;Regards!&lt;BR /&gt;&lt;BR /&gt;...JRF...</description>
      <pubDate>Mon, 06 Jul 2009 20:46:40 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/decrypt-4-digit-passwd/m-p/4454019#M359113</guid>
      <dc:creator>James R. Ferguson</dc:creator>
      <dc:date>2009-07-06T20:46:40Z</dc:date>
    </item>
    <item>
      <title>Re: decrypt 4 digit passwd.</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/decrypt-4-digit-passwd/m-p/4454020#M359114</link>
      <description>Thanks James,&lt;BR /&gt;&lt;BR /&gt;I must be doing something wrong, the password is 1234&lt;BR /&gt;&lt;BR /&gt;# ./pwgen 1234&lt;BR /&gt;/wbBjQGevNiU6&lt;BR /&gt;#&lt;BR /&gt;#&lt;BR /&gt;# pwget -n root&lt;BR /&gt;root:oLZx6qTytmexI:0:3::/:/sbin/sh&lt;BR /&gt;# ./pwgen 1234oL&lt;BR /&gt;vLzVSMAFApTr2&lt;BR /&gt;&lt;BR /&gt;Strange, what am I doing wrong?&lt;BR /&gt;&lt;BR /&gt;Regards,&lt;BR /&gt;&lt;BR /&gt;Jaime.&lt;BR /&gt;&lt;BR /&gt;</description>
      <pubDate>Mon, 06 Jul 2009 21:03:11 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/decrypt-4-digit-passwd/m-p/4454020#M359114</guid>
      <dc:creator>Jaime Bolanos Rojas.</dc:creator>
      <dc:date>2009-07-06T21:03:11Z</dc:date>
    </item>
    <item>
      <title>Re: decrypt 4 digit passwd.</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/decrypt-4-digit-passwd/m-p/4454021#M359115</link>
      <description>Hi (again) Jaime:&lt;BR /&gt;&lt;BR /&gt;&amp;gt; I must be doing something wrong, the password is 1234&lt;BR /&gt;&lt;BR /&gt;And either 'makekey' or the Perl script I offered will encrypt that plaintext password as you saw.&lt;BR /&gt;&lt;BR /&gt;If you have an encrypted password and want to see if it matches what you think it should you can do:&lt;BR /&gt;&lt;BR /&gt;# perl -le '$plain=shift;$secret=shift or die;print "ok" if if crypt($plain,$secret) eq $secret' 1234oL VLzVSMAFApTr2&lt;BR /&gt;&lt;BR /&gt;That is, pass the plaintext password followed by what the encrypted version should match.  I used your data in the above example.&lt;BR /&gt;&lt;BR /&gt;Regards,&lt;BR /&gt;&lt;BR /&gt;...JRF...</description>
      <pubDate>Mon, 06 Jul 2009 23:34:54 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/decrypt-4-digit-passwd/m-p/4454021#M359115</guid>
      <dc:creator>James R. Ferguson</dc:creator>
      <dc:date>2009-07-06T23:34:54Z</dc:date>
    </item>
    <item>
      <title>Re: decrypt 4 digit passwd.</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/decrypt-4-digit-passwd/m-p/4454022#M359116</link>
      <description>Thanks James :-)&lt;BR /&gt;&lt;BR /&gt;I though that for some reason this was not working for me, then I realized ( after 1:30 mins thinking) ( I donÂ´t even know how to program a "hello world" script ) why the perl scripts where not given me what I needed, they were working fine, I created a password with the pwgen script, and then use the second script to match the plain text the the encrypted password by the perl script.  It worked fine :-)&lt;BR /&gt;The thing is that HP-UX puts this salt and pepper in my 4 digit password thatÂ´s the "SP" in the "jaime123SP".&lt;BR /&gt;The reason why I was having a hard time myself is because the perl script is not helping me find the corresponding plain text password/matching encrypted cypher because unix uses the makekey command to created the encrypted text and it adds a salt and pepper to the encrypted text, itÂ´s just I can not find the match because when using the command:&lt;BR /&gt;&lt;BR /&gt;echo "1234SP" | /usr/lib/makekey&lt;BR /&gt;&lt;BR /&gt;The makekey will add values to it because itÂ´s expecting an 8 bit digit plus the SP ( salt and pepper ).&lt;BR /&gt;&lt;BR /&gt;Thanks again for the scripts, it was fun trying to understand them without knowing how to program :-).&lt;BR /&gt;&lt;BR /&gt;If you know how to deal with the above problem, please let me know, I will be a happy man, even more :-)&lt;BR /&gt;&lt;BR /&gt;Thanks James.&lt;BR /&gt;&lt;BR /&gt;Regards,&lt;BR /&gt;&lt;BR /&gt;Jaime.</description>
      <pubDate>Tue, 07 Jul 2009 13:01:00 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/decrypt-4-digit-passwd/m-p/4454022#M359116</guid>
      <dc:creator>Jaime Bolanos Rojas.</dc:creator>
      <dc:date>2009-07-07T13:01:00Z</dc:date>
    </item>
  </channel>
</rss>

