[97293] in RedHat Linux List

home help back first fref pref prev next nref lref last post

Re: OT: Perl

daemon@ATHENA.MIT.EDU (Bryan Liles)
Mon Nov 2 13:33:30 1998

Date: Mon, 2 Nov 1998 11:52:46 -0500
From: Bryan Liles <Bryan_Liles@dfree.com>
To: redhat-list@redhat.com
In-Reply-To: <19981030013305.23807.qmail@hotmail.com>; from Joe Tseng on Thu, Oct 29, 1998 at 05:33:05PM -0800
Resent-From: redhat-list@redhat.com
Reply-To: redhat-list@redhat.com

Thus spake Joe Tseng (joe_tseng@hotmail.com):

> 1.  I am interested in refreshing my Perl DB programming skills, so I 
> have been looking for a PostgreSQL interpreter for Perl (perhaps similar 
> to oraperl which I used previously).  I went to www.postgresql.org but I 
> could not find anything of use.  Everything else I have found was for 
> Postgres95.

ok try looking here:
http://www.cpan.org/modules/by-category/07_Database_Interfaces/Postgres/
> 
> 2.  Is there some library function for Perl that can encode passwords to 
> use for matching strings against /etc/passwd?
> 
yep...

have a look at this short example...

#!/usr/bin/perl

$user = $ARGV[0];
$pass = $ARGV[1];

$pwd = (getpwnam $user)[1];
$salt = substr $pwd, 0, 2;

print crypt($pass, $salt), "\n";

> Joe Tseng

if you have any questions feel free to send me some email...


-- 
  PLEASE read the Red Hat FAQ, Tips, Errata and the MAILING LIST ARCHIVES!
		http://www.redhat.com http://archive.redhat.com
         To unsubscribe: mail redhat-list-request@redhat.com with 
                       "unsubscribe" as the Subject.


home help back first fref pref prev next nref lref last post