<?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: Creating a password hash in Operating System - Linux</title>
    <link>https://community.hpe.com/t5/operating-system-linux/creating-a-password-hash/m-p/3945638#M27097</link>
    <description>*Grumble*&lt;BR /&gt;&lt;BR /&gt;Ok. Now I'm thinking my original algorithm with make key worked for the hash too.&lt;BR /&gt;&lt;BR /&gt;Here's what I've narrowed the problem to now that I've played with it some more...&lt;BR /&gt;&lt;BR /&gt;Once the hash is created, I append ",..." to immediately expire the password so the user is forced to change it when they first login. This works fine on the HP-UX systems. The Linux systems can't handle this.&lt;BR /&gt;&lt;BR /&gt;If I login to an HP-UX system and change the password, the hash created for the new password is also not recognized by the Linux systems.</description>
    <pubDate>Fri, 16 Feb 2007 11:28:35 GMT</pubDate>
    <dc:creator>Jeff_Traigle</dc:creator>
    <dc:date>2007-02-16T11:28:35Z</dc:date>
    <item>
      <title>Creating a password hash</title>
      <link>https://community.hpe.com/t5/operating-system-linux/creating-a-password-hash/m-p/3945631#M27090</link>
      <description>I have a script on HP-UX that I wrote that generates a hash of an 8 character string with makekey. Although the resulting hash seems to satisfy HP-UX for authenticating, SUSE Linux doesn't like it and won't authenticate until I change the password from the Linux system. (NIS is used so the same hash is used cross-platform.) Ideally, I'd like to keep the hash looking random instead of hard coding a known HP-UX- and SUSE-friendly hash for the default password we use when creating a new account. Any ideas?</description>
      <pubDate>Thu, 15 Feb 2007 14:12:27 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-linux/creating-a-password-hash/m-p/3945631#M27090</guid>
      <dc:creator>Jeff_Traigle</dc:creator>
      <dc:date>2007-02-15T14:12:27Z</dc:date>
    </item>
    <item>
      <title>Re: Creating a password hash</title>
      <link>https://community.hpe.com/t5/operating-system-linux/creating-a-password-hash/m-p/3945632#M27091</link>
      <description>&lt;!--!*#--&gt;Hi Jeff:&lt;BR /&gt;&lt;BR /&gt;Perhaps:&lt;BR /&gt;&lt;BR /&gt;# cat ./makepw&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;# ./makepw plaintext&lt;BR /&gt;&lt;BR /&gt;Regards!&lt;BR /&gt;&lt;BR /&gt;...JRF...</description>
      <pubDate>Thu, 15 Feb 2007 18:08:00 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-linux/creating-a-password-hash/m-p/3945632#M27091</guid>
      <dc:creator>James R. Ferguson</dc:creator>
      <dc:date>2007-02-15T18:08:00Z</dc:date>
    </item>
    <item>
      <title>Re: Creating a password hash</title>
      <link>https://community.hpe.com/t5/operating-system-linux/creating-a-password-hash/m-p/3945633#M27092</link>
      <description>This is because the standard hashing algorithms used by the OS's are different. Most linux variants use MD5 as their standard.</description>
      <pubDate>Fri, 16 Feb 2007 02:37:16 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-linux/creating-a-password-hash/m-p/3945633#M27092</guid>
      <dc:creator>Andrew Cowan</dc:creator>
      <dc:date>2007-02-16T02:37:16Z</dc:date>
    </item>
    <item>
      <title>Re: Creating a password hash</title>
      <link>https://community.hpe.com/t5/operating-system-linux/creating-a-password-hash/m-p/3945634#M27093</link>
      <description>Shalom,&lt;BR /&gt;&lt;BR /&gt;Its also known that HP-UX systems with normal security will not authenticate to linux NIS servers with shadow password.&lt;BR /&gt;&lt;BR /&gt;I'm not even sure it will work if you go trusted or install shaldow passwords.&lt;BR /&gt;&lt;BR /&gt;SEP</description>
      <pubDate>Fri, 16 Feb 2007 05:02:36 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-linux/creating-a-password-hash/m-p/3945634#M27093</guid>
      <dc:creator>Steven E. Protter</dc:creator>
      <dc:date>2007-02-16T05:02:36Z</dc:date>
    </item>
    <item>
      <title>Re: Creating a password hash</title>
      <link>https://community.hpe.com/t5/operating-system-linux/creating-a-password-hash/m-p/3945635#M27094</link>
      <description>I'll give that script a try.&lt;BR /&gt;&lt;BR /&gt;The NIS servers (both master and slaves) are HP-UX systems. The Linux systems are only NIS clients.&lt;BR /&gt;&lt;BR /&gt;I found it a bit odd that using makekey to generate the hash would work for HP-UX, but not SUSE... yet changing the password from the Linux client (logged in as root to change the new user's password), created a hash that was decipherable by both platforms. I don't remember if I tried changing the password from the HP-UX systems. Although that won't help the solution, it would be interesting to know the result.</description>
      <pubDate>Fri, 16 Feb 2007 08:10:12 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-linux/creating-a-password-hash/m-p/3945635#M27094</guid>
      <dc:creator>Jeff_Traigle</dc:creator>
      <dc:date>2007-02-16T08:10:12Z</dc:date>
    </item>
    <item>
      <title>Re: Creating a password hash</title>
      <link>https://community.hpe.com/t5/operating-system-linux/creating-a-password-hash/m-p/3945636#M27095</link>
      <description>I use this script generating passwords on a SUSE-servers:&lt;BR /&gt;&lt;BR /&gt;# Sets the maximum size of the password the script will generate&lt;BR /&gt;MAXSIZE=8&lt;BR /&gt;&lt;BR /&gt;# Holds valid password characters. I choose alpha-numeric + the shift-number keyboard keys&lt;BR /&gt;# I put escape chars on all the non alpha-numeric characters just for precaution&lt;BR /&gt;array1=(&lt;BR /&gt;q w e r t y u i o p a s d f g h j k l z x c v b n m Q W E R T Y U I O P A S D&lt;BR /&gt;F G H J K L Z X C V B N M 1 2 3 4 5 6 7 8 9&lt;BR /&gt;)&lt;BR /&gt;&lt;BR /&gt;# Used in conjunction with modulus to keep random numbers in range of the array size&lt;BR /&gt;MODNUM=${#array1[*]}&lt;BR /&gt;&lt;BR /&gt;# Keeps track of the number characters in the password we have generated&lt;BR /&gt;pwd_len=0&lt;BR /&gt;&lt;BR /&gt;# The outer while loop starts at 0 and loops till MAXSIZE, creating a passwd char each iteration.&lt;BR /&gt;# The shells $RANDOM variable creates a semi-random unsigned number. This is our entropy. =x&lt;BR /&gt;# x simply holds some random unsigned int that will be used to make the character scramble.&lt;BR /&gt;# 500 was choosen for speed and nothing else. Leave out the mod 500 if you want or change it.&lt;BR /&gt;# The inner loop displays the password characters. Tput keeps the cursor in the proper position.&lt;BR /&gt;# Mod MODNUM keeps the random number inside the size of the array so it doesnt over index.&lt;BR /&gt;PASSWORD=""&lt;BR /&gt;while [ $pwd_len -lt $MAXSIZE ]&lt;BR /&gt;do&lt;BR /&gt;  x=$(($RANDOM%500))&lt;BR /&gt;  y=0&lt;BR /&gt;  while [ $y -lt $x ]&lt;BR /&gt;  do&lt;BR /&gt;    ((y++))&lt;BR /&gt;    index=$(($RANDOM%$MODNUM))&lt;BR /&gt;  done&lt;BR /&gt;  PASSWORD="${PASSWORD}${array1[$index]}"&lt;BR /&gt;  ((pwd_len++))&lt;BR /&gt;done&lt;BR /&gt;&lt;BR /&gt;# Crypt password&lt;BR /&gt;PASSWORDCRYPT=$(openssl passwd "$PASSWORD")</description>
      <pubDate>Fri, 16 Feb 2007 10:03:33 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-linux/creating-a-password-hash/m-p/3945636#M27095</guid>
      <dc:creator>Frank Larsen</dc:creator>
      <dc:date>2007-02-16T10:03:33Z</dc:date>
    </item>
    <item>
      <title>Re: Creating a password hash</title>
      <link>https://community.hpe.com/t5/operating-system-linux/creating-a-password-hash/m-p/3945637#M27096</link>
      <description>Nice. Both the perl script and the "openssl passwd" command seemed to create hashed passwords that both HP-UX and SUSE were happy with. Think I'll go with the openssl option though. One less script to worry about and doesn't require generating the seed characters.</description>
      <pubDate>Fri, 16 Feb 2007 10:51:05 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-linux/creating-a-password-hash/m-p/3945637#M27096</guid>
      <dc:creator>Jeff_Traigle</dc:creator>
      <dc:date>2007-02-16T10:51:05Z</dc:date>
    </item>
    <item>
      <title>Re: Creating a password hash</title>
      <link>https://community.hpe.com/t5/operating-system-linux/creating-a-password-hash/m-p/3945638#M27097</link>
      <description>*Grumble*&lt;BR /&gt;&lt;BR /&gt;Ok. Now I'm thinking my original algorithm with make key worked for the hash too.&lt;BR /&gt;&lt;BR /&gt;Here's what I've narrowed the problem to now that I've played with it some more...&lt;BR /&gt;&lt;BR /&gt;Once the hash is created, I append ",..." to immediately expire the password so the user is forced to change it when they first login. This works fine on the HP-UX systems. The Linux systems can't handle this.&lt;BR /&gt;&lt;BR /&gt;If I login to an HP-UX system and change the password, the hash created for the new password is also not recognized by the Linux systems.</description>
      <pubDate>Fri, 16 Feb 2007 11:28:35 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-linux/creating-a-password-hash/m-p/3945638#M27097</guid>
      <dc:creator>Jeff_Traigle</dc:creator>
      <dc:date>2007-02-16T11:28:35Z</dc:date>
    </item>
  </channel>
</rss>

