Beefy Boxes and Bandwidth Generously Provided by pair Networks
Perl-Sensitive Sunglasses
 
PerlMonks  

Re^2: need to auto generate user/password info

by Seumas (Curate)
on Jun 20, 2004 at 09:19 UTC ( #368256=note: print w/replies, xml ) Need Help??


in reply to Re: need to auto generate user/password info
in thread need to auto generate user/password info

I just call passwdgen to generate my passwords. It may not be as portable but it does offer a ton of flexibility.
sub generatePassword { my $password = `passwdgen -pa --length=6`; $password =~ s/Your password is: (.*)/$1/; chomp $password; return $password; }

Replies are listed 'Best First'.
Re: need to auto generate user/password info
by b10m (Vicar) on Jun 20, 2004 at 15:01 UTC

    Of course you could also use something like Crypt::PassGen (Crypt::PassGen - Generate a random password that looks like a real word). The generated passwords aren't perfect, but it usually suits me for non-critical things and the generated passwords are usually quite easy to remember, for the look like real words.

    --
    b10m

    All code is usually tested, but rarely trusted.
      Cool, I'll have to play with that a bit. I, of course, allow users to create their own passwords but I use an authorization process that requires them to use the system generated password to initialize their account. I chose passwdgen without too much thought, because it works and I'm familiar with it and needed a quick solution to the cruddy little hacked-up generator I had written from scratch.

      Thanks for the tip!

Log In?
Username:
Password:

What's my password?
Create A New User
Node Status?
node history
Node Type: note [id://368256]
help
Chatterbox?
[marto]: some hardware/makey thing
[Corion]: marto: Ah, I'm currently drifting to that again, over"painting" (well with Inkscape) one of my photographs and thinking about vectorizing some other images ...
[marto]: Corion, yes something 'artistic', so that or some music. Even combine some things, build a musical instrument :)
[Corion]: marto: Naah, I'm avoiding that rabbit hole ;) Sometimes I think of using Perl to create MIDI to generate music, or at least the harmonies to which I could jam, but then that would eat even more into available time ;-))

How do I use this? | Other CB clients
Other Users?
Others having an uproarious good time at the Monastery: (2)
As of 2017-07-27 07:51 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?
    I came, I saw, I ...
























    Results (404 votes). Check out past polls.