<?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: Checking password entry for common patter in Operating System - HP-UX</title>
    <link>https://community.hpe.com/t5/operating-system-hp-ux/checking-password-entry-for-common-patter/m-p/3789128#M264692</link>
    <description>Hi Stuart:&lt;BR /&gt;&lt;BR /&gt;As Clay notes, Perl makes life easy.  You can use the following script to examine your password database.&lt;BR /&gt;&lt;BR /&gt;#!/usr/bin/perl&lt;BR /&gt;#@(#)defpws $ Find default passwords - JRF $&lt;BR /&gt;&lt;BR /&gt;use strict;&lt;BR /&gt;use warnings;&lt;BR /&gt;use File::Basename;&lt;BR /&gt;&lt;BR /&gt;my  $defpass = shift or die "Usage: ".basename($0)." Default_Password\n";&lt;BR /&gt;my ($name, $passwd, $uid);&lt;BR /&gt;&lt;BR /&gt;while (($name, $passwd, $uid) = getpwent) {&lt;BR /&gt;    if (crypt ($defpass, $passwd) eq $passwd) {&lt;BR /&gt;        print $name, "(id=", $uid, ") is using default password\n";&lt;BR /&gt;    }&lt;BR /&gt;}&lt;BR /&gt;1;&lt;BR /&gt;&lt;BR /&gt;...Name the script "defpws" (or anything you want) and do:&lt;BR /&gt;&lt;BR /&gt;# ./defpws sillypw&lt;BR /&gt;&lt;BR /&gt;...This will examine your password database and report any and all users using a password of "sillypw".  The output would look like:&lt;BR /&gt;&lt;BR /&gt;dummy(id=1001) is using default password&lt;BR /&gt;dummy2(id=1002) is using default password&lt;BR /&gt;&lt;BR /&gt;Regards!&lt;BR /&gt;&lt;BR /&gt;...JRF...</description>
    <pubDate>Tue, 16 May 2006 19:02:49 GMT</pubDate>
    <dc:creator>James R. Ferguson</dc:creator>
    <dc:date>2006-05-16T19:02:49Z</dc:date>
    <item>
      <title>Checking password entry for common patter</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/checking-password-entry-for-common-patter/m-p/3789125#M264689</link>
      <description>We are running HP-UX 11i without password shadowing on a non-trusted system.  I would like to be able to review the encrypted password entry for each user to see if they are using an unsafe password string.  When the systems were first brought on-line we normally set each users password to a common string.  We have since discarded that practice when a user calls in, but since we cannot restrict the password string by age a savvy user can change their password back to the common string.&lt;BR /&gt;I have loaded crack 5.0 and have run it, but I haven't figured out how to add that common string to a dictonary.&lt;BR /&gt;Any help on accomplishing my objectives would be appreciated.&lt;BR /&gt;&lt;BR /&gt;Stuart</description>
      <pubDate>Tue, 16 May 2006 12:19:01 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/checking-password-entry-for-common-patter/m-p/3789125#M264689</guid>
      <dc:creator>Stuart Powell</dc:creator>
      <dc:date>2006-05-16T12:19:01Z</dc:date>
    </item>
    <item>
      <title>Re: Checking password entry for common patter</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/checking-password-entry-for-common-patter/m-p/3789126#M264690</link>
      <description>Shalom,&lt;BR /&gt;&lt;BR /&gt;crack is a dangerous thing to have on a system, easily abused.&lt;BR /&gt;&lt;BR /&gt;On the other hand,Linux uses exactly that library to check passwords.&lt;BR /&gt;&lt;BR /&gt;Not knowing how the integration is done, I'd suggest looking at a Linux machine to see how its done. Since Linux is open source, it may provide you a solution you can use on HP-UX.&lt;BR /&gt;&lt;BR /&gt;Do share if you figure it out.&lt;BR /&gt;&lt;BR /&gt;SEP</description>
      <pubDate>Tue, 16 May 2006 12:36:07 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/checking-password-entry-for-common-patter/m-p/3789126#M264690</guid>
      <dc:creator>Steven E. Protter</dc:creator>
      <dc:date>2006-05-16T12:36:07Z</dc:date>
    </item>
    <item>
      <title>Re: Checking password entry for common patter</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/checking-password-entry-for-common-patter/m-p/3789127#M264691</link>
      <description>A better and safer approach is to use Perl because it has all the routines you need to extract the passwd fields getpwent() and also evaluate the password hash (crypt).&lt;BR /&gt;&lt;BR /&gt;The fundamental idea is to use the crypt() function to compare the plaintext password to the hash. If crypt() produces an identical hash then the same plaintext key was used. You actually pass the current passwd hash to the crypt function because the 1st 2 characters of the hash are the "salt" which is used to perturb the hashing algorithm.&lt;BR /&gt;&lt;BR /&gt;#!/usr/bin/perl&lt;BR /&gt;&lt;BR /&gt;my $plaintext = "secret";&lt;BR /&gt;my $currentpwhash = "wCNuEoWfzgPJ.";&lt;BR /&gt;&lt;BR /&gt;if (crypt($plaintext,$currentpwhash) eq $currentpwhash)&lt;BR /&gt;  {&lt;BR /&gt;    print "$plaintext was used; bad password\n";&lt;BR /&gt;  }&lt;BR /&gt;else&lt;BR /&gt;  {&lt;BR /&gt;    print "OK\n";&lt;BR /&gt;  }&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;</description>
      <pubDate>Tue, 16 May 2006 17:26:19 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/checking-password-entry-for-common-patter/m-p/3789127#M264691</guid>
      <dc:creator>A. Clay Stephenson</dc:creator>
      <dc:date>2006-05-16T17:26:19Z</dc:date>
    </item>
    <item>
      <title>Re: Checking password entry for common patter</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/checking-password-entry-for-common-patter/m-p/3789128#M264692</link>
      <description>Hi Stuart:&lt;BR /&gt;&lt;BR /&gt;As Clay notes, Perl makes life easy.  You can use the following script to examine your password database.&lt;BR /&gt;&lt;BR /&gt;#!/usr/bin/perl&lt;BR /&gt;#@(#)defpws $ Find default passwords - JRF $&lt;BR /&gt;&lt;BR /&gt;use strict;&lt;BR /&gt;use warnings;&lt;BR /&gt;use File::Basename;&lt;BR /&gt;&lt;BR /&gt;my  $defpass = shift or die "Usage: ".basename($0)." Default_Password\n";&lt;BR /&gt;my ($name, $passwd, $uid);&lt;BR /&gt;&lt;BR /&gt;while (($name, $passwd, $uid) = getpwent) {&lt;BR /&gt;    if (crypt ($defpass, $passwd) eq $passwd) {&lt;BR /&gt;        print $name, "(id=", $uid, ") is using default password\n";&lt;BR /&gt;    }&lt;BR /&gt;}&lt;BR /&gt;1;&lt;BR /&gt;&lt;BR /&gt;...Name the script "defpws" (or anything you want) and do:&lt;BR /&gt;&lt;BR /&gt;# ./defpws sillypw&lt;BR /&gt;&lt;BR /&gt;...This will examine your password database and report any and all users using a password of "sillypw".  The output would look like:&lt;BR /&gt;&lt;BR /&gt;dummy(id=1001) is using default password&lt;BR /&gt;dummy2(id=1002) is using default password&lt;BR /&gt;&lt;BR /&gt;Regards!&lt;BR /&gt;&lt;BR /&gt;...JRF...</description>
      <pubDate>Tue, 16 May 2006 19:02:49 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/checking-password-entry-for-common-patter/m-p/3789128#M264692</guid>
      <dc:creator>James R. Ferguson</dc:creator>
      <dc:date>2006-05-16T19:02:49Z</dc:date>
    </item>
    <item>
      <title>Re: Checking password entry for common patter</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/checking-password-entry-for-common-patter/m-p/3789129#M264693</link>
      <description>Thanks Clay and James.  We have perl on our systems, so I'll take your scripts and try to develop something that works.&lt;BR /&gt;&lt;BR /&gt;I appreciate the head start.&lt;BR /&gt;&lt;BR /&gt;Stuart</description>
      <pubDate>Wed, 17 May 2006 06:58:06 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/checking-password-entry-for-common-patter/m-p/3789129#M264693</guid>
      <dc:creator>Stuart Powell</dc:creator>
      <dc:date>2006-05-17T06:58:06Z</dc:date>
    </item>
  </channel>
</rss>

