Operating System - HP-UX
1827677 Members
3423 Online
109967 Solutions
New Discussion

looking for a password generator for hpux...

 
SOLVED
Go to solution
Manuel Contreras
Regular Advisor

looking for a password generator for hpux...

interested in something similar to pwgen, currently available for linux:

$ pwgen -1
Bu4wefei
$ pwgen -1
Phohj8aM
$ pwgen -1
tae2WeiB
$ pwgen -1
ohL7Eg4m


thanks
8 REPLIES 8
Steven Schweda
Honored Contributor

Re: looking for a password generator for hpux...

> [...] pwgen, currently available for linux:

So it should be open source, so any Web
search engine should be able to find it:

http://sourceforge.net/projects/pwgen/
http://sourceforge.net/project/showfiles.php?group_id=28391

Have you tried building it from the source?
James R. Ferguson
Acclaimed Contributor
Solution

Re: looking for a password generator for hpux...

Hi Manuel:

Perl makes this easy:

# ./pwgen
#!/usr/bin/perl
use strict;
use warnings;
my @chars = ( 'A'.. 'Z', 'a' ..'h', 0..9, qw(! @ $ % ^ & *) );
my $pass = join( '', @chars[ map { rand @chars } ( 1..8 ) ] );
print "$pass\n";
1;

...for example:

# ./pwgen
@7UGRIGc
# ./pwgen
L1!VS1FQ
# ./pwgen
FdP2V6KS


Regards!

...JRF...
Manuel Contreras
Regular Advisor

Re: looking for a password generator for hpux...

I like, don't know if the users are going to :P

> ./pwgen
ENB*6M&@

> ./pwgen
$5%Y^BG2

> ./pwgen
T581%ZH%

> ./pwgen
@ESI9%8^
Manuel Contreras
Regular Advisor

Re: looking for a password generator for hpux...

If I wanted to remove the special char...do I simply remove the qw(! @ $ % ^ & *)?
Patrick Wallek
Honored Contributor

Re: looking for a password generator for hpux...

I use the attached expect script extensively.

It is very customizable with regards to password length, characters required, etc. The script is fairly well documented.
James R. Ferguson
Acclaimed Contributor

Re: looking for a password generator for hpux...

HI (again):

> If I wanted to remove the special char...do I simply remove the qw(! @ $ % ^ & *)?

Yes:

my @chars = ( 'A'.. 'Z', 'a' ..'h', 0..9 );

...or whatever you want.

Regards!

...JRF...
Manuel Contreras
Regular Advisor

Re: looking for a password generator for hpux...

somehow I think they will like this version better:)

> ./pwgen
4HHE7TN7

> ./pwgen
BcUWhH86

> ./pwgen
Z0fDEAZT

> ./pwgen
IaCg8EEW

> ./pwgen
SEONKd17

> ./pwgen
SCeI4LXb

Thanks again
Manuel Contreras
Regular Advisor

Re: looking for a password generator for hpux...

itrc rocks :)